Skip to content

Commit 63b0984

Browse files
author
Guillaume Chau
committed
feat(ui): ProjectNavMore + About view
1 parent 5df5427 commit 63b0984

File tree

5 files changed

+119
-9
lines changed

5 files changed

+119
-9
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
:route="route"
1313
/>
1414
</VueGroup>
15+
16+
<ProjectNavMore/>
1517
</div>
1618
</div>
1719
</template>
@@ -105,10 +107,26 @@ export default {
105107
106108
.content
107109
v-box()
110+
height 100%
111+
112+
.vue-ui-group
113+
flex auto 1 1
114+
height 0
115+
overflow hidden
116+
117+
>>> .v-popover .trigger,
118+
>>> .vue-ui-dropdown
119+
display block !important
108120
109121
>>> .vue-ui-button
110122
button-colors(rgba($vue-ui-color-light, .7), transparent)
111123
border-radius 0
124+
padding-left 0
125+
padding-right @padding-left
126+
h-box()
127+
box-center()
128+
width 100%
129+
112130
&:hover, &:active
113131
$bg = darken($vue-ui-color-dark, 70%)
114132
button-colors($vue-ui-color-light, $bg)

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ $bg = darken($vue-ui-color-dark, 70%)
7878
.project-nav-button
7979
position relative
8080
81-
.v-popover >>> .trigger
82-
display block !important
83-
8481
.bullet
8582
position absolute
8683
width 6px
@@ -111,12 +108,6 @@ $bg = darken($vue-ui-color-dark, 70%)
111108
.bullet
112109
border-color darken($bg, 8%)
113110
114-
.icon-button
115-
padding-left 0
116-
padding-right @padding-left
117-
h-box()
118-
box-center()
119-
120111
.image-icon
121112
max-width 24px
122113
max-height @width
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<template>
2+
<div class="project-nav-more">
3+
<VueDropdown placement="right-end">
4+
<VueButton
5+
slot="trigger"
6+
icon-left="more_horiz"
7+
class="icon-button big flat"
8+
/>
9+
10+
<VueDropdownButton
11+
icon-left="work"
12+
:to="{ name: 'project-select' }"
13+
:label="$t('views.project-select.title')"
14+
/>
15+
<VueDropdownButton
16+
icon-left="info"
17+
:to="{ name: 'about' }"
18+
:label="$t('views.about.title')"
19+
/>
20+
</VueDropdown>
21+
</div>
22+
</template>

packages/@vue/cli-ui/src/locales/en.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,13 @@
303303
"parameters": "Parameters",
304304
"more-info": "More Info",
305305
"output": "Output"
306+
},
307+
"about": {
308+
"title": "About",
309+
"description": "<a href=\"https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-ui\" target=\"_blank\">@vue/cli-ui</a> is a built-in package of vue-cli which opens a full-blown UI.",
310+
"quote": "Vue-cli 3.x is a complete rewrite, with a lot of new awesome features. You will be to select features like routing, Vuex or Typescript, then add and upgrade building blocks called \"vue-cli plugins\". But having so much more options also means the tool is now more complex and harder to start using. That's why we thought having a full-blown GUI would help discover the new features, search and install vue-cli plugins and unlock more possibilities overall while not being limited by a terminal interface. To sum up, vue-cli will not only allow you to bootstrap a new project easily, but it will also remain useful for ongoing work afterwards!",
311+
"links": "Useful links",
312+
"back": "Go back"
306313
}
307314
}
308315
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,77 @@
11
<template>
22
<div class="about page">
3+
<h1>{{ $t('views.about.title') }}</h1>
34

5+
<p class="description" v-html="$t('views.about.description')"/>
6+
7+
<blockquote class="quote" v-text="$t('views.about.quote')"/>
8+
9+
<p>- <a href="https://github.com/Akryum" target="_blank">Guillaume Chau</a></p>
10+
11+
<h2>{{ $t('views.about.links') }}</h2>
12+
13+
<div class="links vue-ui-grid default-gap">
14+
<VueButton href="https://github.com/vuejs/vue-cli" target="_blank">Repository</VueButton>
15+
<VueButton href="https://github.com/vuejs/vue-cli/tree/dev/docs#table-of-contents" target="_blank">Documentation</VueButton>
16+
<VueButton href="https://vuejs.org/v2/guide/" target="_blank">Vue.js Guide</VueButton>
17+
<VueButton href="https://vuejs.org/v2/api/" target="_blank">Vue.js API reference</VueButton>
18+
<VueButton href="https://forum.vuejs.org/" target="_blank">Vue.js Forums</VueButton>
19+
<VueButton href="https://chat.vuejs.org/" target="_blank">Vue.js Chat</VueButton>
20+
</div>
21+
22+
<div class="actions">
23+
<VueButton
24+
:to="previousRoute"
25+
class="primary big"
26+
left-icon="arrow_back"
27+
:label="$t('views.about.back')"
28+
/>
29+
</div>
430
</div>
531
</template>
32+
33+
<script>
34+
export default {
35+
metaInfo () {
36+
return {
37+
title: this.$t('views.about.title')
38+
}
39+
},
40+
41+
data () {
42+
return {
43+
previousRoute: { name: 'home' }
44+
}
45+
},
46+
47+
beforeRouteEnter (to, from, next) {
48+
next(vm => {
49+
if (from) vm.previousRoute = from.fullPath
50+
})
51+
}
52+
}
53+
</script>
54+
55+
<style lang="stylus" scoped>
56+
@import "~@/style/imports"
57+
58+
.about
59+
padding 42px
60+
max-width 900px
61+
margin 0 auto
62+
box-sizing border-box
63+
64+
.quote
65+
border-left solid 4px rgba($vue-ui-color-primary, .3)
66+
margin-left 0
67+
padding-left $padding-item
68+
color lighten($vue-ui-color-dark, 30%)
69+
70+
.links
71+
grid-template-columns repeat(auto-fill, 180px)
72+
73+
.actions
74+
margin-top @padding
75+
h-box()
76+
box-center()
77+
</style>

0 commit comments

Comments
 (0)