File tree 5 files changed +66
-13
lines changed
5 files changed +66
-13
lines changed Original file line number Diff line number Diff line change 61
61
"@vue/cli-plugin-eslint" : " ^3.0.0-rc.3" ,
62
62
"@vue/cli-service" : " ^3.0.0-rc.3" ,
63
63
"@vue/eslint-config-standard" : " ^3.0.0-rc.3" ,
64
- "@vue/ui" : " ^0.4.5 " ,
64
+ "@vue/ui" : " ^0.4.6 " ,
65
65
"ansi_up" : " ^2.0.2" ,
66
66
"cross-env" : " ^5.1.5" ,
67
67
"eslint" : " ^4.16.0" ,
Original file line number Diff line number Diff line change 4
4
:title =" $t('org.vue.views.project-configurations.title')"
5
5
class =" limit-width"
6
6
>
7
+ <template slot="actions">
8
+ <VueInput
9
+ v-model =" search"
10
+ icon-left =" search"
11
+ class =" round"
12
+ />
13
+ </template >
14
+
7
15
<ApolloQuery
8
16
:query =" require('../graphql/configurations.gql')"
9
17
class =" fill-height"
@@ -49,6 +57,12 @@ export default {
49
57
}
50
58
},
51
59
60
+ data () {
61
+ return {
62
+ search: ' '
63
+ }
64
+ },
65
+
52
66
bus: {
53
67
quickOpenProject (project ) {
54
68
this .$apollo .getClient ().writeQuery ({
@@ -63,7 +77,11 @@ export default {
63
77
methods: {
64
78
generateItems (configurations ) {
65
79
if (! configurations) return []
66
- return configurations .map (
80
+
81
+ const reg = this .search && new RegExp (this .search , ' i' )
82
+ return configurations .filter (
83
+ item => ! reg || item .name .match (reg) || item .description .match (reg)
84
+ ).map (
67
85
configuration => ({
68
86
route: {
69
87
name: ' project-configuration-details' ,
Original file line number Diff line number Diff line change 5
5
class =" limit-width"
6
6
>
7
7
<template slot="actions">
8
+ <VueInput
9
+ v-model =" search"
10
+ icon-left =" search"
11
+ class =" round"
12
+ />
13
+
8
14
<VueButton
9
15
icon-left =" add"
10
16
:label =" $t('org.vue.views.project-plugins.button')"
39
45
class =" overlay"
40
46
/>
41
47
42
- <div v-else-if =" data" class =" plugins" >
43
- <ProjectPluginItem
44
- v-for =" plugin of data.plugins"
45
- :key =" plugin.id"
46
- :plugin =" plugin"
47
- />
48
- </div >
48
+ <ListFilter
49
+ v-else-if =" data"
50
+ class =" plugins"
51
+ :list =" data.plugins"
52
+ :filter =" item => !search || item.id.includes(search)"
53
+ >
54
+ <template slot-scope="{ list }">
55
+ <ProjectPluginItem
56
+ v-for =" plugin of list"
57
+ :key =" plugin.id"
58
+ :plugin =" plugin"
59
+ />
60
+ </template >
61
+ </ListFilter >
49
62
</template >
50
63
</ApolloQuery >
51
64
</ContentView >
@@ -69,6 +82,12 @@ export default {
69
82
}
70
83
},
71
84
85
+ data () {
86
+ return {
87
+ search: ' '
88
+ }
89
+ },
90
+
72
91
apollo: {
73
92
projectCurrent: PROJECT_CURRENT
74
93
},
Original file line number Diff line number Diff line change 3
3
<ContentView
4
4
:title =" $t('org.vue.views.project-tasks.title')"
5
5
>
6
+ <template slot="actions">
7
+ <VueInput
8
+ v-model =" search"
9
+ icon-left =" search"
10
+ class =" round"
11
+ />
12
+ </template >
13
+
6
14
<ApolloQuery
7
15
:query =" require('../graphql/tasks.gql')"
8
16
class =" fill-height"
@@ -50,6 +58,12 @@ export default {
50
58
}
51
59
},
52
60
61
+ data () {
62
+ return {
63
+ search: ' '
64
+ }
65
+ },
66
+
53
67
apollo: {
54
68
$subscribe: {
55
69
taskChanged: {
@@ -72,7 +86,9 @@ export default {
72
86
methods: {
73
87
generateItems (tasks ) {
74
88
if (! tasks) return []
75
- return tasks .map (
89
+ return tasks .filter (
90
+ item => ! this .search || item .name .includes (this .search )
91
+ ).map (
76
92
task => ({
77
93
route: {
78
94
name: ' project-task-details' ,
Original file line number Diff line number Diff line change 1048
1048
dependencies :
1049
1049
lodash "^4.17.4"
1050
1050
1051
- " @vue/ui@^0.4.5 " :
1052
- version "0.4.5 "
1053
- resolved "https://registry.yarnpkg.com/@vue/ui/-/ui-0.4.5 .tgz#003334fd98e42ef600e8f3f3fbd98733e9a9fadd "
1051
+ " @vue/ui@^0.4.6 " :
1052
+ version "0.4.6 "
1053
+ resolved "https://registry.yarnpkg.com/@vue/ui/-/ui-0.4.6 .tgz#bba955547435d7471fdb9c5379ac5cc19d45605d "
1054
1054
dependencies :
1055
1055
focus-visible "^4.1.4"
1056
1056
material-design-icons "^3.0.1"
You can’t perform that action at this time.
0 commit comments