diff options
author | dartcafe <github@dartcafe.de> | 2021-06-19 21:32:58 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-06-19 21:32:58 +0300 |
commit | ad0b6583c4ba23ff89072cfee94e087e7b838499 (patch) | |
tree | db8c7397333809050ebb416c66f457709b205d9e /src/js/components/SideBar | |
parent | b039458488cc32ff3801e5afd6b82d3b4901bd40 (diff) |
change soft deleted polls to archived polls
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components/SideBar')
-rw-r--r-- | src/js/components/SideBar/SideBarTabConfiguration.vue | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/js/components/SideBar/SideBarTabConfiguration.vue b/src/js/components/SideBar/SideBarTabConfiguration.vue index c09efd44..e904ef6f 100644 --- a/src/js/components/SideBar/SideBarTabConfiguration.vue +++ b/src/js/components/SideBar/SideBarTabConfiguration.vue @@ -59,14 +59,15 @@ <ConfigShowResults @change="writePoll" /> </ConfigBox> - <ButtonDiv :icon="poll.deleted ? 'icon-history' : 'icon-delete'" - :title="poll.deleted ? t('polls', 'Restore poll') : t('polls', 'Delete poll')" - @click="switchDeleted()" /> + <ButtonDiv :icon="poll.deleted ? 'icon-history' : 'icon-category-app-bundles'" + :title="poll.deleted ? t('polls', 'Restore poll') : t('polls', 'Archive poll')" + @click="toggleArchive()" /> + <ButtonDiv v-if="poll.deleted" icon="icon-delete" class="error" - :title="t('polls', 'Delete poll permanently')" - @click="deletePermanently()" /> + :title="t('polls', 'Delete poll')" + @click="deletePoll()" /> </div> </template> @@ -126,7 +127,7 @@ export default { showSuccess(t('polls', '"{pollTitle}" successfully saved', { pollTitle: this.poll.title })) }, 1500), - switchDeleted() { + toggleArchive() { if (this.poll.deleted) { this.$store.commit('poll/setProperty', { deleted: 0 }) } else { @@ -135,7 +136,7 @@ export default { this.writePoll() }, - async deletePermanently() { + async deletePoll() { if (!this.poll.deleted) return try { await this.$store.dispatch('poll/delete', { pollId: this.poll.id }) |