From 5d74d68c50282df017c58e43d299048e40813764 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Sat, 28 Sep 2019 01:27:46 +0300 Subject: [PATCH] Pass account instead of report to dropdown that moderates user --- .../components/ModerateUserDropdown.vue | 52 +++++++++---------- src/views/reports/components/Report.vue | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/views/reports/components/ModerateUserDropdown.vue b/src/views/reports/components/ModerateUserDropdown.vue index 141b2afe..2d368999 100644 --- a/src/views/reports/components/ModerateUserDropdown.vue +++ b/src/views/reports/components/ModerateUserDropdown.vue @@ -5,53 +5,53 @@ - {{ report.account.deactivated ? $t('users.activateAccount') : $t('users.deactivateAccount') }} + v-if="showDeactivatedButton(account)" + @click.native="handleDeactivation(account)"> + {{ account.deactivated ? $t('users.activateAccount') : $t('users.deactivateAccount') }} + v-if="showDeactivatedButton(account.id)" + @click.native="handleDeletion(account.id)"> {{ $t('users.deleteAccount') }} + :class="{ 'active-tag': account.tags.includes('force_nsfw') }" + @click.native="toggleTag(account, 'force_nsfw')"> {{ $t('users.forceNsfw') }} - + + :class="{ 'active-tag': account.tags.includes('strip_media') }" + @click.native="toggleTag(account, 'strip_media')"> {{ $t('users.stripMedia') }} - + + :class="{ 'active-tag': account.tags.includes('force_unlisted') }" + @click.native="toggleTag(account, 'force_unlisted')"> {{ $t('users.forceUnlisted') }} - + + :class="{ 'active-tag': account.tags.includes('sandbox') }" + @click.native="toggleTag(account, 'sandbox')"> {{ $t('users.sandbox') }} - + + v-if="account.local" + :class="{ 'active-tag': account.tags.includes('disable_remote_subscription') }" + @click.native="toggleTag(account, 'disable_remote_subscription')"> {{ $t('users.disableRemoteSubscription') }} - + + v-if="account.local" + :class="{ 'active-tag': account.tags.includes('disable_any_subscription') }" + @click.native="toggleTag(account, 'disable_any_subscription')"> {{ $t('users.disableAnySubscription') }} - + @@ -61,7 +61,7 @@ export default { name: 'ModerateUserDropdown', props: { - report: { + account: { type: Object, required: true } diff --git a/src/views/reports/components/Report.vue b/src/views/reports/components/Report.vue index 418284d3..819b21de 100644 --- a/src/views/reports/components/Report.vue +++ b/src/views/reports/components/Report.vue @@ -16,7 +16,7 @@ {{ $t('reports.close') }} - +