summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/DashboardPage.vue
diff options
context:
space:
mode:
authorUdo Walter2018-08-03 23:51:11 +0200
committerUdo Walter2018-08-03 23:51:11 +0200
commit344a0502ab3800e69712bff15d4026550d50ab76 (patch)
treefd6b9c771fc89be5524eac25f2a5667eebb05faf /webapp/src/components/DashboardPage.vue
parent[groups] icon fix (diff)
downloadbas-344a0502ab3800e69712bff15d4026550d50ab76.tar.gz
bas-344a0502ab3800e69712bff15d4026550d50ab76.tar.xz
bas-344a0502ab3800e69712bff15d4026550d50ab76.zip
[webapp] everythiing configurable (dashboardmodule, stores and global i18n messages is now in the config folder; router rework: modules can now set their own subroutes
Diffstat (limited to 'webapp/src/components/DashboardPage.vue')
-rw-r--r--webapp/src/components/DashboardPage.vue32
1 files changed, 11 insertions, 21 deletions
diff --git a/webapp/src/components/DashboardPage.vue b/webapp/src/components/DashboardPage.vue
index 3fef1e9..d400f9f 100644
--- a/webapp/src/components/DashboardPage.vue
+++ b/webapp/src/components/DashboardPage.vue
@@ -1,18 +1,12 @@
<i18n>
{
"en": {
- "group": "Groups / Clients",
- "backend": "External Backends",
- "permission": "Permissions",
"title": "Boot Selection Server",
"account": "Account",
"settings": "Settings",
"logout": "Logout"
},
"de": {
- "group": "Gruppen / Clienten",
- "backend": "Externe Backends",
- "permission": "Rechteverwaltung",
"title": "Boot Auswahl Server",
"account": "Konto",
"settings": "Einstellungen",
@@ -53,12 +47,12 @@
>
<div class="drawer-header grey darken-4 hidden-lg-and-up"><img class="logo" src="@/assets/logo.svg" /></div>
<v-list>
- <v-list-tile ripple v-for="child in $options.dashboardModules" :key="child.path" :to="'/dashboard/' + child.path">
+ <v-list-tile ripple v-for="module in modules" :key="module.path" :to="'/dashboard/' + module.path">
<v-list-tile-action>
- <v-icon v-html="child.dashboardIcon"></v-icon>
+ <v-icon v-html="module.icon"></v-icon>
</v-list-tile-action>
<v-list-tile-content>
- <v-list-tile-title v-text="$t(child.path)"></v-list-tile-title>
+ <v-list-tile-title v-text="$t('$dashboardModules.' + module.path)"></v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
</v-list>
@@ -119,25 +113,21 @@
<script>
import { mapState, mapGetters, mapMutations } from 'vuex'
-import GroupModule from '@/components/GroupModule'
-import BackendModule from '@/components/BackendModule'
-import PermissionModule from '@/components/PermissionModule'
import AccountModule from '@/components/AccountModule'
import SettingsModule from '@/components/SettingsModule'
+import dashboardModules from '@/config/dashboard'
export default {
name: 'DashboardPage',
- dashboardModules: [
- { path: 'group', component: GroupModule, dashboardIcon: 'category' },
- { path: 'backend', component: BackendModule, dashboardIcon: 'cloud' },
- { path: 'permission', component: PermissionModule, dashboardIcon: 'lock_open' }
- ],
- hiddenModules: [
- { path: 'account', component: AccountModule },
- { path: 'settings', component: SettingsModule }
- ],
+ routes () {
+ return [
+ { path: 'account', component: AccountModule },
+ { path: 'settings', component: SettingsModule }
+ ]
+ },
data () {
return {
+ modules: dashboardModules,
snackbarsInQueue: false,
showSnackbar: false,
snackbarText: 'MESSAGE',