Skip to content

Commit 5a80c24

Browse files
author
Guillaume Chau
committed
feat(ui): tasks list
1 parent 120c13d commit 5a80c24

25 files changed

+403
-26
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default {
2020
props: {
2121
title: {
2222
type: String,
23-
default: false
23+
default: null
2424
}
2525
}
2626
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export default {
115115
editingPath: false,
116116
editedPath: '',
117117
folderCurrent: {},
118-
foldersFavorite: [],
118+
foldersFavorite: []
119119
}
120120
},
121121

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default {
3535
3636
computed: {
3737
query: {
38-
get() {
38+
get () {
3939
return this.searchStore.query
4040
},
4141
set (value) {

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,14 @@ export default {
9191
await this.$apollo.mutate({
9292
mutation: CONSOLE_LOGS_CLEAR,
9393
update: store => {
94-
store.writeQuery({ query: CONSOLE_LOGS, data: { consoleLogs: [] }})
95-
store.writeQuery({ query: CONSOLE_LOG_LAST, data: { consoleLogLast: null }})
94+
store.writeQuery({
95+
query: CONSOLE_LOGS,
96+
data: { consoleLogs: [] }
97+
})
98+
store.writeQuery({
99+
query: CONSOLE_LOG_LAST,
100+
data: { consoleLogLast: null }
101+
})
96102
}
97103
})
98104
this.close()
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<template>
2+
<div class="nav-content">
3+
<NavList
4+
:items="items"
5+
>
6+
<template slot-scope="props">
7+
<slot v-bind="props"/>
8+
</template>
9+
</NavList>
10+
11+
<div class="content vue-ui-disable-scroll">
12+
<router-view/>
13+
</div>
14+
</div>
15+
</template>
16+
17+
<script>
18+
export default {
19+
props: {
20+
items: {
21+
type: Array,
22+
required: true
23+
}
24+
}
25+
}
26+
</script>
27+
28+
<style lang="stylus" scoped>
29+
@import "~@/style/imports"
30+
31+
.nav-content
32+
width 100%
33+
height 100%
34+
display grid
35+
grid-template-columns 300px 1fr
36+
grid-template-rows 1fr
37+
grid-template-areas "nav content"
38+
> .nav-list
39+
grid-area nav
40+
> .content
41+
grid-area content
42+
overflow-x hidden
43+
overflow-y auto
44+
</style>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<template>
2+
<div class="nav-list vue-ui-disable-scroll">
3+
<div class="content">
4+
<div
5+
v-for="item of items"
6+
:key="item.id"
7+
@click="currentRoute = item.route"
8+
>
9+
<slot
10+
:item="item"
11+
:selected="item.route === currentRoute"
12+
/>
13+
</div>
14+
</div>
15+
</div>
16+
</template>
17+
18+
<script>
19+
import { isSameRoute, isIncludedRoute } from '../util/route'
20+
21+
export default {
22+
props: {
23+
items: {
24+
type: Array,
25+
required: true
26+
}
27+
},
28+
29+
computed: {
30+
currentRoute: {
31+
get () {
32+
const currentRoute = this.$route
33+
const item = this.items.find(
34+
item => isIncludedRoute(currentRoute, this.$router.resolve(item.route).route)
35+
)
36+
return item && item.route
37+
},
38+
set (route) {
39+
if (!isSameRoute(this.$route, route)) {
40+
this.$router.push(route)
41+
}
42+
}
43+
}
44+
}
45+
}
46+
</script>
47+
48+
<style lang="stylus" scoped>
49+
@import "~@/style/imports"
50+
51+
.nav-list
52+
overflow-x none
53+
overflow-y auto
54+
background darken($color-light-background, 2%)
55+
</style>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ export default {
105105
max-width 400px
106106
margin-top 24px
107107
108-
109108
&:not(.loading)
110109
.vue-ui-loading-indicator
111110
>>> .animation

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default {
7676
data () {
7777
return {
7878
pluginDetails: null,
79-
pluginLogo:! null,
79+
pluginLogo: null,
8080
updating: false
8181
}
8282
},

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ export default {
126126
}
127127
</script>
128128

129-
130129
<style lang="stylus" scoped>
131130
@import "~@/style/imports"
132131
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<template>
2+
<div
3+
class="task-item list-item"
4+
:class="{
5+
selected
6+
}"
7+
>
8+
<div class="content">
9+
<ItemLogo
10+
icon="assignment"
11+
v-tooltip="status"
12+
/>
13+
14+
<ListItemInfo
15+
:name="task.name"
16+
:description="task.description || status"
17+
:selected="selected"
18+
/>
19+
</div>
20+
</div>
21+
</template>
22+
23+
<script>
24+
export default {
25+
props: {
26+
task: {
27+
type: Object,
28+
required: true
29+
},
30+
31+
selected: {
32+
type: Boolean,
33+
default: false
34+
}
35+
},
36+
37+
computed: {
38+
status () {
39+
return this.$t(`types.task.status.${this.task.status}`)
40+
}
41+
}
42+
}
43+
</script>
44+
45+
<style lang="stylus" scoped>
46+
@import "~@/style/imports"
47+
48+
.task-item
49+
padding $padding-item
50+
51+
.content
52+
h-box()
53+
box-center()
54+
55+
.list-item-info
56+
flex 100% 1 1
57+
width 0
58+
</style>

0 commit comments

Comments
 (0)