From de1c758b8adbc2da1b2d29de9c7e13233bfe7847 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Wed, 23 Jan 2019 21:36:12 +0100 Subject: [PATCH] Improved ContentMenu --- components/ContentMenu.vue | 52 +++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/components/ContentMenu.vue b/components/ContentMenu.vue index 9ab85cb12..5eb1647fb 100644 --- a/components/ContentMenu.vue +++ b/components/ContentMenu.vue @@ -8,14 +8,19 @@ slot="default" slot-scope="{toggleMenu}" > - - - + + + +
{ + // eslint-disable-next-line vue/no-side-effects-in-computed-properties + return this.$router.push('/post/edit/p1') + // return this.$router.push(link) + }, + icon: 'edit' + }) + } + + if (!this.isAuthor) { + routes.push({ name: this.$t(`report.${this.context}.title`), callback: this.openReportDialog, icon: 'flag' - } - ] + }) + } + if (this.isModerator) { routes.push({ name: this.$t(`disable.${this.context}.title`), - callback: this.openDisableDialog, + callback: () => {}, icon: 'eye-slash' }) }