summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/app.js2
-rw-r--r--webapp/src/components/DashboardPage.vue4
-rw-r--r--webapp/src/components/GroupModule.vue39
-rw-r--r--webapp/src/config/i18n.js12
-rw-r--r--webapp/src/router.js8
5 files changed, 34 insertions, 31 deletions
diff --git a/server/app.js b/server/app.js
index 6ae77e5..cb2823f 100644
--- a/server/app.js
+++ b/server/app.js
@@ -30,7 +30,7 @@ var apiRouter = require(path.join(__dirname, 'router'))
app.use('/api', apiRouter)
app.use(express.static('public'))
-app.use('*', express.static('public/index.html'))
+app.use('*', express.static('public'))
// ############################################################################
// ######################### handle http errors ###############################
diff --git a/webapp/src/components/DashboardPage.vue b/webapp/src/components/DashboardPage.vue
index d9dfcb6..3d8c62f 100644
--- a/webapp/src/components/DashboardPage.vue
+++ b/webapp/src/components/DashboardPage.vue
@@ -47,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="module in modules" :key="module.path" :to="'/dashboard/' + module.path">
+ <v-list-tile ripple v-for="module in modules" :key="module.name" :to="{ name: module.name }">
<v-list-tile-action>
<v-icon v-html="module.icon"></v-icon>
</v-list-tile-action>
<v-list-tile-content>
- <v-list-tile-title v-text="$t('$dashboardModules.' + module.path)"></v-list-tile-title>
+ <v-list-tile-title v-text="$t('$dashboardModules.' + module.name)"></v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
</v-list>
diff --git a/webapp/src/components/GroupModule.vue b/webapp/src/components/GroupModule.vue
index 4d4c765..c163b5a 100644
--- a/webapp/src/components/GroupModule.vue
+++ b/webapp/src/components/GroupModule.vue
@@ -11,26 +11,25 @@
<v-container fill-height>
<v-layout>
<v-flex class="tabs-wrapper" xl10 offset-xl1 lg12>
- <v-card>
- <v-tabs :value="activeTab" @input="setActiveTab" :dark="tabsDark" :color="tabsColor" :slider-color="tabsSliderColor">
- <template v-for="(item, index) in tabChain">
- <v-icon v-if="item.tabType !== 'home'" :key="'arrow' + index">keyboard_arrow_right</v-icon>
- <v-tab ripple :key="'tab' + index">
- <v-icon v-if="item.tabType === 'home'">home</v-icon>
- <v-icon v-if="item.tabType === 'client'" style="margin-right: 10px">computer</v-icon>
- <template v-if="item.tabType !== 'home'">{{ item.name || item.id || ' . . . . . . . . . . ' }}</template>
- </v-tab>
- </template>
- </v-tabs>
- </v-card>
- <v-tabs-items :value="activeTab" @input="setActiveTab" touchless style="padding-bottom: 20px">
- <v-tab-item v-for="(item, index) in tabChain" :key="index">
- <group-module-home-view v-if="item.tabType === 'home'" :home="item" />
- <group-module-group-view v-if="item.tabType === 'group'" :group="item" :tabIndex="index" />
- <group-module-client-view v-if="item.tabType === 'client'" :client="item" :tabIndex="index" />
- </v-tab-item>
- </v-tabs-items>
- <router-view />
+ <v-card>
+ <v-tabs :value="activeTab" @input="setActiveTab" :dark="tabsDark" :color="tabsColor" :slider-color="tabsSliderColor">
+ <template v-for="(item, index) in tabChain">
+ <v-icon v-if="item.tabType !== 'home'" :key="'arrow' + index">keyboard_arrow_right</v-icon>
+ <v-tab ripple :key="'tab' + index">
+ <v-icon v-if="item.tabType === 'home'">home</v-icon>
+ <v-icon v-if="item.tabType === 'client'" style="margin-right: 10px">computer</v-icon>
+ <template v-if="item.tabType !== 'home'">{{ item.name || item.id || ' . . . . . . . . . . ' }}</template>
+ </v-tab>
+ </template>
+ </v-tabs>
+ </v-card>
+ <v-tabs-items :value="activeTab" @input="setActiveTab" touchless style="padding-bottom: 20px">
+ <v-tab-item v-for="(item, index) in tabChain" :key="index">
+ <group-module-home-view v-if="item.tabType === 'home'" :home="item" />
+ <group-module-group-view v-if="item.tabType === 'group'" :group="item" :tabIndex="index" />
+ <group-module-client-view v-if="item.tabType === 'client'" :client="item" :tabIndex="index" />
+ </v-tab-item>
+ </v-tabs-items>
</v-flex>
</v-layout>
<group-module-dialog />
diff --git a/webapp/src/config/i18n.js b/webapp/src/config/i18n.js
index 12aece9..078245d 100644
--- a/webapp/src/config/i18n.js
+++ b/webapp/src/config/i18n.js
@@ -23,9 +23,9 @@ export default {
'noDataText': 'No data available'
},
'$dashboardModules': {
- 'groups': 'Groups / Clients',
- 'backends': 'External Backends',
- 'permissions': 'Permission Manager'
+ 'GroupModule': 'Groups / Clients',
+ 'BackendModule': 'External Backends',
+ 'PermissionModule': 'Permission Manager'
}
},
'de': {
@@ -52,9 +52,9 @@ export default {
'noDataText': 'Keine Daten verfügbar'
},
'$dashboardModules': {
- 'groups': 'Gruppen / Clienten',
- 'backends': 'Externe Backends',
- 'permissions': 'Rechteverwaltung'
+ 'GroupModule': 'Gruppen / Clienten',
+ 'BackendModule': 'Externe Backends',
+ 'PermissionModule': 'Rechteverwaltung'
}
}
}
diff --git a/webapp/src/router.js b/webapp/src/router.js
index 35d0d6a..7c530a9 100644
--- a/webapp/src/router.js
+++ b/webapp/src/router.js
@@ -4,6 +4,10 @@ import LoginPage from '@/components/LoginPage'
import DashboardPage from '@/components/DashboardPage'
import dashboardModules from '@/config/dashboard'
+dashboardModules.forEach(item => {
+ item.name = item.component.name
+})
+
Vue.use(Router)
function setChildren (routes, parent) {
@@ -12,7 +16,7 @@ function setChildren (routes, parent) {
route.children = setChildren(route.component.routes(), route.component)
}
if (route.name && parent && parent.name) route.name = parent.name + '.' + route.name
- else delete route.name
+ else if (parent) delete route.name
})
return routes
}
@@ -29,7 +33,7 @@ var router = new Router({
path: '/dashboard',
name: 'dashboard',
component: DashboardPage,
- children: setChildren(dashboardModules.concat(DashboardPage.routes()), DashboardPage)
+ children: setChildren(dashboardModules.concat(DashboardPage.routes()))
},
{
path: '*',