Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2021-07-10 10:44:07 +0300
committerdartcafe <github@dartcafe.de>2021-07-10 10:44:07 +0300
commite72ccd97ebad7e5b45f4678de78447e4dc196c31 (patch)
treeacb14483457d0321852bf93f123158b95fd0d8c3 /src
parent124a4af5f6965b1de6fb1cb3d22251c695ef4348 (diff)
tidy
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src')
-rw-r--r--src/js/App.vue11
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 {