-
Notifications
You must be signed in to change notification settings - Fork 66
/
PluginsPanel.vue
138 lines (130 loc) · 3.43 KB
/
PluginsPanel.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<template>
<div v-if="pluginsOpen && $q.platform.is.desktop" class="current-section">
<q-layout>
<q-header elevated>
<q-toolbar>
<q-btn flat round dense icon="undo" class="q-mr-sm" @click="openSettings"/>
<q-toolbar-title>{{$t('plugins').toUpperCase()}}</q-toolbar-title>
<q-btn flat round dense icon="close" @click="closeWindow"/>
</q-toolbar>
</q-header>
<q-page-container>
<grid-container>
<div class="item" v-for="plugin in getPluginsList" :key="plugin.uuid">
<plugin :plugin="plugin"></plugin>
</div>
</grid-container>
</q-page-container>
</q-layout>
</div>
<div v-else-if="$q.platform.is.mobile">
<q-list bordered>
<q-item v-for="plugin in getPluginsList" :key="plugin.uuid" class="q-my-sm" clickable v-ripple>
<q-item-section avatar>
<q-avatar color="primary">
<q-icon v-if="plugin.currentPluginStatus == 'RUNNING'" name="check" color="white" />
<q-icon v-else name="stop" color="white" />
</q-avatar>
</q-item-section>
<q-item-section>
<q-item-label>{{ plugin.pluginName}}</q-item-label>
</q-item-section>
<q-item-section side>
<q-icon name="keyboard_arrow_right" color="green" />
</q-item-section>
</q-item>
</q-list>
</div>
</template>
<script>
import Plugin from './Plugin.vue'
//import Marketplace from './Marketplace.vue'
import GridContainer from './common/GridContainer.vue'
export default {
components: {
'plugin': Plugin,
//'marketplace': Marketplace,
GridContainer
},
mounted: function () {
this.$store.dispatch('getPluginsList')
//this.$store.dispatch('getMarketplaceCategoriesList')
},
computed: {
pluginsOpen: function () {
return this.$store.state.pluginsOpen
},
getPluginsList: function () {
return this.$store.state.pluginsList.filter((plugin) => {
return this.hiddenPlugins.indexOf(plugin.pluginName) === -1
})
}
},
data () {
return {
hiddenPlugins: [
'Application Server',
'Delayer',
'Plugins Remote Controller',
'RestAPI v3',
'Scheduler',
'Successful Test'
]
}
},
methods: {
openSettings: function () {
this.$store.commit('showSetup')
},
closeWindow: function () {
this.$store.commit('closeSection')
},
showDynamicComponentModal () {
this.$modal.show(Marketplace, {
text: ''
},
{
name: 'marketplaceModal',
draggable: true,
adaptive: true,
resizable: true,
scrollable: true,
clickToClose: false,
width: '65%',
height: 'auto',
minWidth: 500
})
}
}
}
</script>
<style scoped>
.current-section {
position: fixed;
top: 1%;
bottom: 1%;
left: 1%;
right: 1%;
background: white;
border-radius: 4px;
z-index: 10;
color: black;
display: flex;
flex-direction: column;
align-items: flex-start;
overflow-y: scroll;
margin: auto;
}
#action-container {
text-align: center;
cursor: pointer;
background-color: transparent;
margin-top: 50%;
}
.small-icon {
width: 24px;
margin: 1%;
cursor: pointer;
background:transparent;
}
</style>