Add option to enable TagPolicy from moderation dropdown
This commit is contained in:
parent
9de860eaac
commit
b5a3a29539
3 changed files with 21 additions and 12 deletions
|
@ -273,7 +273,8 @@ export default {
|
||||||
linkToResetPassword: 'You can also use this link to reset password:',
|
linkToResetPassword: 'You can also use this link to reset password:',
|
||||||
registrationReason: 'Registration Reason',
|
registrationReason: 'Registration Reason',
|
||||||
service: 'Service',
|
service: 'Service',
|
||||||
person: 'Person'
|
person: 'Person',
|
||||||
|
enableTagPolicy: 'Enable MRF TagPolicy to manage user tags'
|
||||||
},
|
},
|
||||||
statuses: {
|
statuses: {
|
||||||
statuses: 'Statuses',
|
statuses: 'Statuses',
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
{{ $t('users.resendConfirmation') }}
|
{{ $t('users.resendConfirmation') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
:disabled="tagPolicyDisabled"
|
v-if="tagPolicyEnabled"
|
||||||
:divided="showAdminAction(user)"
|
:divided="showAdminAction(user)"
|
||||||
:class="{ 'active-tag': user.tags.includes('mrf_tag:media-force-nsfw') }"
|
:class="{ 'active-tag': user.tags.includes('mrf_tag:media-force-nsfw') }"
|
||||||
@click.native="toggleTag(user, 'mrf_tag:media-force-nsfw')">
|
@click.native="toggleTag(user, 'mrf_tag:media-force-nsfw')">
|
||||||
|
@ -76,42 +76,47 @@
|
||||||
<i v-if="user.tags.includes('mrf_tag:media-force-nsfw')" class="el-icon-check"/>
|
<i v-if="user.tags.includes('mrf_tag:media-force-nsfw')" class="el-icon-check"/>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
:disabled="tagPolicyDisabled"
|
v-if="tagPolicyEnabled"
|
||||||
:class="{ 'active-tag': user.tags.includes('mrf_tag:media-strip') }"
|
:class="{ 'active-tag': user.tags.includes('mrf_tag:media-strip') }"
|
||||||
@click.native="toggleTag(user, 'mrf_tag:media-strip')">
|
@click.native="toggleTag(user, 'mrf_tag:media-strip')">
|
||||||
{{ $t('users.stripMedia') }}
|
{{ $t('users.stripMedia') }}
|
||||||
<i v-if="user.tags.includes('mrf_tag:media-strip')" class="el-icon-check"/>
|
<i v-if="user.tags.includes('mrf_tag:media-strip')" class="el-icon-check"/>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
:disabled="tagPolicyDisabled"
|
v-if="tagPolicyEnabled"
|
||||||
:class="{ 'active-tag': user.tags.includes('mrf_tag:force-unlisted') }"
|
:class="{ 'active-tag': user.tags.includes('mrf_tag:force-unlisted') }"
|
||||||
@click.native="toggleTag(user, 'mrf_tag:force-unlisted')">
|
@click.native="toggleTag(user, 'mrf_tag:force-unlisted')">
|
||||||
{{ $t('users.forceUnlisted') }}
|
{{ $t('users.forceUnlisted') }}
|
||||||
<i v-if="user.tags.includes('mrf_tag:force-unlisted')" class="el-icon-check"/>
|
<i v-if="user.tags.includes('mrf_tag:force-unlisted')" class="el-icon-check"/>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
:disabled="tagPolicyDisabled"
|
v-if="tagPolicyEnabled"
|
||||||
:class="{ 'active-tag': user.tags.includes('mrf_tag:sandbox') }"
|
:class="{ 'active-tag': user.tags.includes('mrf_tag:sandbox') }"
|
||||||
@click.native="toggleTag(user, 'mrf_tag:sandbox')">
|
@click.native="toggleTag(user, 'mrf_tag:sandbox')">
|
||||||
{{ $t('users.sandbox') }}
|
{{ $t('users.sandbox') }}
|
||||||
<i v-if="user.tags.includes('mrf_tag:sandbox')" class="el-icon-check"/>
|
<i v-if="user.tags.includes('mrf_tag:sandbox')" class="el-icon-check"/>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="user.local"
|
v-if="user.local && tagPolicyEnabled"
|
||||||
:disabled="tagPolicyDisabled"
|
|
||||||
:class="{ 'active-tag': user.tags.includes('mrf_tag:disable-remote-subscription') }"
|
:class="{ 'active-tag': user.tags.includes('mrf_tag:disable-remote-subscription') }"
|
||||||
@click.native="toggleTag(user, 'mrf_tag:disable-remote-subscription')">
|
@click.native="toggleTag(user, 'mrf_tag:disable-remote-subscription')">
|
||||||
{{ $t('users.disableRemoteSubscription') }}
|
{{ $t('users.disableRemoteSubscription') }}
|
||||||
<i v-if="user.tags.includes('mrf_tag:disable-remote-subscription')" class="el-icon-check"/>
|
<i v-if="user.tags.includes('mrf_tag:disable-remote-subscription')" class="el-icon-check"/>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="user.local"
|
v-if="user.local && tagPolicyEnabled"
|
||||||
:disabled="tagPolicyDisabled"
|
|
||||||
:class="{ 'active-tag': user.tags.includes('mrf_tag:disable-any-subscription') }"
|
:class="{ 'active-tag': user.tags.includes('mrf_tag:disable-any-subscription') }"
|
||||||
@click.native="toggleTag(user, 'mrf_tag:disable-any-subscription')">
|
@click.native="toggleTag(user, 'mrf_tag:disable-any-subscription')">
|
||||||
{{ $t('users.disableAnySubscription') }}
|
{{ $t('users.disableAnySubscription') }}
|
||||||
<i v-if="user.tags.includes('mrf_tag:disable-any-subscription')" class="el-icon-check"/>
|
<i v-if="user.tags.includes('mrf_tag:disable-any-subscription')" class="el-icon-check"/>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
v-if="!tagPolicyEnabled"
|
||||||
|
divided
|
||||||
|
class="no-hover"
|
||||||
|
@click.native="enableTagPolicy">
|
||||||
|
{{ $t('users.enableTagPolicy') }}
|
||||||
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="user.local"
|
v-if="user.local"
|
||||||
divided
|
divided
|
||||||
|
@ -168,14 +173,17 @@ export default {
|
||||||
isDesktop() {
|
isDesktop() {
|
||||||
return this.$store.state.app.device === 'desktop'
|
return this.$store.state.app.device === 'desktop'
|
||||||
},
|
},
|
||||||
tagPolicyDisabled() {
|
tagPolicyEnabled() {
|
||||||
return this.$store.state.users.tagPolicyDisabled
|
return this.$store.state.users.tagPolicies.includes('Pleroma.Web.ActivityPub.MRF.TagPolicy')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
disableMfa(nickname) {
|
disableMfa(nickname) {
|
||||||
this.$store.dispatch('DisableMfa', nickname)
|
this.$store.dispatch('DisableMfa', nickname)
|
||||||
},
|
},
|
||||||
|
enableTagPolicy() {
|
||||||
|
this.$store.dispatch('EnableTagPolicy')
|
||||||
|
},
|
||||||
getPasswordResetToken(nickname) {
|
getPasswordResetToken(nickname) {
|
||||||
this.$emit('open-reset-token-dialog')
|
this.$emit('open-reset-token-dialog')
|
||||||
this.$store.dispatch('GetPasswordResetToken', nickname)
|
this.$store.dispatch('GetPasswordResetToken', nickname)
|
||||||
|
|
|
@ -140,7 +140,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="tagPolicyDisabled"
|
v-if="!tagPolicyEnabled"
|
||||||
divided
|
divided
|
||||||
@click.native="enableTagPolicy">
|
@click.native="enableTagPolicy">
|
||||||
{{ $t('users.enableTagPolicy') }}
|
{{ $t('users.enableTagPolicy') }}
|
||||||
|
|
Loading…
Reference in a new issue