Skip to content

Commit db67f1e

Browse files
author
Guillaume Chau
committed
feat(ui): Project select hide tabs when creating project
1 parent d59b35e commit db67f1e

File tree

4 files changed

+24
-13
lines changed

4 files changed

+24
-13
lines changed

packages/@vue/cli-ui/src/components/StepWizard.vue

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<template>
2-
<div class="step-wizard">
2+
<div
3+
class="step-wizard"
4+
:class="{
5+
'hide-tabs': hideTabs
6+
}"
7+
>
38
<div class="header">
49
<div v-if="title" class="title">{{ title }}</div>
510
</div>
@@ -24,6 +29,11 @@ export default {
2429
inheritAttrs: false,
2530
2631
props: {
32+
hideTabs: {
33+
type: Boolean,
34+
default: false
35+
},
36+
2737
title: {
2838
type: String,
2939
default: null
@@ -38,12 +48,11 @@ export default {
3848
previous () {
3949
const tabs = this.$refs.tabs
4050
tabs.activateChild(tabs.activeChildIndex - 1)
41-
},
51+
}
4252
}
4353
}
4454
</script>
4555

46-
4756
<style lang="stylus" scoped>
4857
@import "~@/style/imports"
4958
@@ -86,4 +95,8 @@ export default {
8695
text-align center
8796
font-weight lighter
8897
98+
&.hide-tabs
99+
>>> .tabs
100+
display none
101+
89102
</style>

packages/@vue/cli-ui/src/graphql/projectInitCreate.gql

-7
This file was deleted.

packages/@vue/cli-ui/src/views/ProjectCreate.vue

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<div class="project-details vue-grid col-1 big-gap">
1515
<VueFormField
1616
title="Project folder"
17+
:subtitle="cwd"
1718
>
1819
<VueInput
1920
v-model="formData.folder"
@@ -24,7 +25,7 @@
2425

2526
<VueButton
2627
label="Change current working directory"
27-
:to="{ name: 'project-select', query: { tab: 'create' } }"
28+
:to="{ name: 'project-select', query: { tab: 'create', hideTabs: true } }"
2829
/>
2930
</VueFormField>
3031

@@ -265,8 +266,8 @@ import ProjectPresetItem from '../components/ProjectPresetItem'
265266
import StatusBar from '../components/StatusBar'
266267
import StepWizard from '../components/StepWizard'
267268
269+
import CWD from '../graphql/cwd.gql'
268270
import PROJECT_CREATION from '../graphql/projectCreation.gql'
269-
import PROJECT_INIT_CREATE from '../graphql/projectInitCreate.gql'
270271
271272
function formDataFactory () {
272273
return {
@@ -292,13 +293,15 @@ export default {
292293
data () {
293294
return {
294295
formData: formData,
296+
cwd: '',
295297
projectCreation: null,
296298
showCancel: false,
297299
showRemotePreset: false
298300
}
299301
},
300302
301303
apollo: {
304+
cwd: CWD,
302305
projectCreation: PROJECT_CREATION
303306
},
304307

packages/@vue/cli-ui/src/views/ProjectSelect.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<StepWizard
44
:tab-id.sync="tab"
55
title="Vue Project Manager"
6+
:hide-tabs="hideTabs"
67
>
78
<VueTab
89
id="existing"
@@ -70,7 +71,8 @@ export default {
7071
data () {
7172
return {
7273
folderCurrent: {},
73-
tab: undefined
74+
tab: undefined,
75+
hideTabs: this.$route.query.hideTabs
7476
}
7577
},
7678

0 commit comments

Comments
 (0)