From 2898279c9834c58a1cad7d6ed5b093d9972df22c Mon Sep 17 00:00:00 2001 From: Christoph Wurst <christoph@winzerhof-wurst.at> Date: Thu, 6 Sep 2018 17:06:17 +0200 Subject: [PATCH] Add account settings view Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> --- js/mixins/SidebarItems.js | 8 +++++++- js/router.js | 6 ++++++ js/views/AccountSettings.vue | 31 +++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 js/views/AccountSettings.vue diff --git a/js/mixins/SidebarItems.js b/js/mixins/SidebarItems.js index 30f3088b4..4c57dca52 100644 --- a/js/mixins/SidebarItems.js +++ b/js/mixins/SidebarItems.js @@ -11,7 +11,13 @@ export default { id: 'account' + account.id, key: 'account' + account.id, text: account.name, - bullet: account.bullet // TODO + bullet: account.bullet, // TODO + router: { + 'name': 'accountSettings', + params: { + accountId: account.id, + } + } }) } diff --git a/js/router.js b/js/router.js index d4faa957b..acc7d36e6 100644 --- a/js/router.js +++ b/js/router.js @@ -1,6 +1,7 @@ import Vue from 'vue' import Router from 'vue-router' +import AccountSettings from './views/AccountSettings'; import Home from './views/Home' import NewMessage from './views/NewMessage'; import Setup from './views/Setup'; @@ -26,6 +27,11 @@ export default new Router({ name: 'folder', component: Home }, + { + path: '/accounts/:accountId/settings', + name: 'accountSettings', + component: AccountSettings + }, { path: '/setup', name: 'setup', diff --git a/js/views/AccountSettings.vue b/js/views/AccountSettings.vue new file mode 100644 index 000000000..2d5eadcb7 --- /dev/null +++ b/js/views/AccountSettings.vue @@ -0,0 +1,31 @@ +<template> + <div id="content" class="mail"> + <app-navigation :menu="menu"> + <AppSettingsMenu slot="settings-content"/> + </app-navigation> + <div id="app-content"> + TODO: implement account settings + </div> + </div> +</template> + +<script> + import AppNavigation from "../components/core/appNavigation"; + import AppSettingsMenu from "../components/AppSettingsMenu"; + + import SidebarItems from "../mixins/SidebarItems"; + + export default { + name: "AccountSettings", + extends: SidebarItems, + components: { + AppNavigation, + AppSettingsMenu, + }, + computed: { + menu () { + return this.buildMenu(this.$store.state.accounts); + } + } + } +</script> -- GitLab