From 5ed0a6f7f464ac33ecf378431e617b4b581747f1 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Sun, 8 Nov 2020 02:26:29 +0300 Subject: [PATCH] Iterate over list of tags to render tags moderation in Multiple Users menu --- .../users/components/MultipleUsersMenu.vue | 131 +++++++----------- 1 file changed, 49 insertions(+), 82 deletions(-) diff --git a/src/views/users/components/MultipleUsersMenu.vue b/src/views/users/components/MultipleUsersMenu.vue index bdf65006..a0224645 100644 --- a/src/views/users/components/MultipleUsersMenu.vue +++ b/src/views/users/components/MultipleUsersMenu.vue @@ -61,83 +61,27 @@ @click.native="requirePasswordReset"> {{ $t('users.requirePasswordReset') }} - -
- {{ $t('users.forceNsfw') }} - - - {{ $t('users.apply') }} - - - {{ $t('users.remove') }} - - -
-
- -
- {{ $t('users.stripMedia') }} - - - {{ $t('users.apply') }} - - - {{ $t('users.remove') }} - - -
-
- -
- {{ $t('users.forceUnlisted') }} - - - {{ $t('users.apply') }} - - - {{ $t('users.remove') }} - - -
-
- -
- {{ $t('users.sandbox') }} - - - {{ $t('users.apply') }} - - - {{ $t('users.remove') }} - - -
-
- -
- {{ $t('users.disableRemoteSubscriptionForMultiple') }} - - - {{ $t('users.apply') }} - - - {{ $t('users.remove') }} - - -
-
- -
- {{ $t('users.disableAnySubscriptionForMultiple') }} - - - {{ $t('users.apply') }} - - - {{ $t('users.remove') }} - - -
+ + +
+ {{ $t('users.tags') }} +
+ + +
+ {{ option.label }} + + + {{ $t('users.apply') }} + + + {{ $t('users.remove') }} + + +
+
+
+
0 }, tagPolicyEnabled() { return this.$store.state.users.mrfPolicies.includes('Pleroma.Web.ActivityPub.MRF.TagPolicy') + }, + tags() { + return this.$store.state.users.tags.map(tag => { + if (this.mapTags[tag]) { + return { tag, label: this.mapTags[tag] } + } else { + return { tag, label: tag.charAt(0).toUpperCase() + tag.slice(1) } + } + }, {}) } }, methods: { @@ -406,6 +370,14 @@ export default { .el-icon-edit { margin-right: 5px; } + .multiple-tags-moderation { + width: 100%; + } + .no-hover:hover { + color: #606266; + background-color: white; + cursor: auto; + } .tag-container { display: flex; justify-content: space-between; @@ -414,9 +386,4 @@ export default { .tag-text { padding-right: 20px; } - .no-hover:hover { - color: #606266; - background-color: white; - cursor: auto; - }