diff options
author | dartcafe <github@dartcafe.de> | 2021-07-10 10:44:07 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-07-10 10:44:07 +0300 |
commit | e72ccd97ebad7e5b45f4678de78447e4dc196c31 (patch) | |
tree | acb14483457d0321852bf93f123158b95fd0d8c3 /src/js | |
parent | 124a4af5f6965b1de6fb1cb3d22251c695ef4348 (diff) |
tidy
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/App.vue | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/js/App.vue b/src/js/App.vue index 1a828d90..e3482453 100644 --- a/src/js/App.vue +++ b/src/js/App.vue @@ -21,10 +21,10 @@ --> <template> - <Content app-name="polls" :style="appStyle" :class="[transitionClass, { 'edit': acl.allowEdit, 'experimental': settings.experimental, 'bgimage': settings.useImage, 'bgcolored': settings.experimental }]"> + <Content app-name="polls" :style="appStyle" :class="[transitionClass, { 'edit': allowEdit, 'experimental': settings.experimental, 'bgimage': settings.useImage, 'bgcolored': settings.experimental }]"> <router-view name="navigation" :class="{ 'glassy': settings.glassyNavigation }" /> <router-view /> - <router-view v-if="sideBarOpen && $store.state.poll.id && (acl.allowEdit || poll.allowComment)" + <router-view v-if="showSidebar" name="sidebar" :active="activeTab" :class="{ 'glassy': settings.glassySidebar }" /> @@ -76,8 +76,13 @@ export default { ...mapState({ settings: (state) => state.settings.user, poll: (state) => state.poll, - acl: (state) => state.poll.acl, + allowEdit: (state) => state.poll.acl.allowEdit, }), + + showSidebar() { + return this.sideBarOpen && this.poll.id && (this.allowEdit || this.poll.allowComment) + }, + appStyle() { if (this.settings.useImage && this.settings.experimental) { return { |