From 7b748bd49ca8bdd011e9755309f871237685793b Mon Sep 17 00:00:00 2001 From: lesion Date: Thu, 16 May 2024 23:34:41 +0200 Subject: [PATCH] fix: Add option to transfer anon event ownership, fix #394 --- components/EventAdmin.vue | 13 ++++++-- components/EventAssignAuthor.vue | 57 ++++++++++++++++++++++++++++++++ components/EventMapDialog.vue | 2 +- locales/en.json | 2 ++ pages/event/_slug.vue | 7 +++- server/api/controller/event.js | 17 ++++++++++ server/api/index.js | 1 + 7 files changed, 94 insertions(+), 5 deletions(-) create mode 100644 components/EventAssignAuthor.vue diff --git a/components/EventAdmin.vue b/components/EventAdmin.vue index d9c6c6b6..7abe83c2 100644 --- a/components/EventAdmin.vue +++ b/components/EventAdmin.vue @@ -48,6 +48,12 @@ span v-list-item-content v-list-item-title(v-text="$t('event.disable_author')") + v-list-item(v-if='event.isAnon && $auth?.user?.is_admin' @click='$emit("openAssignAuthor")') + v-list-item-icon + v-icon(v-text='mdiClipboardAccount') + v-list-item-content + v-list-item-title(v-text="$t('event.assign_to_user')") + template(v-if='event.parentId') v-list-item.text-overline(v-html="$t('common.recurring_event_actions')") @@ -58,7 +64,6 @@ span v-list-item-content v-list-item-title(v-text="$t(`common.${event.parent.is_visible ? 'pause': 'start'}`)") - //- Edit event v-list-item(:to='`/add/${event.parentId}`') v-list-item-icon @@ -76,13 +81,15 @@ span diff --git a/components/EventMapDialog.vue b/components/EventMapDialog.vue index 77688dc7..4bae03b6 100644 --- a/components/EventMapDialog.vue +++ b/components/EventMapDialog.vue @@ -12,7 +12,7 @@ v-card v-card-actions.py-4 HowToArriveNav.pl-1(:place='place') v-spacer - v-btn(@click='$emit("close")' outlined) Close + v-btn(@click='$emit("close")' outlined) {{ $t('common.close') }}