forked from AkkomaGang/admin-fe
Add ability to collapse tags
This commit is contained in:
parent
f7e9e727ac
commit
36239cd16f
2 changed files with 79 additions and 50 deletions
|
@ -282,7 +282,8 @@ export default {
|
||||||
enableTagPolicy: 'Enable MRF TagPolicy to manage user tags',
|
enableTagPolicy: 'Enable MRF TagPolicy to manage user tags',
|
||||||
confirmEnablingTagPolicy: 'Are you sure you want to add TagPolicy to the list of enabled MRF policies?',
|
confirmEnablingTagPolicy: 'Are you sure you want to add TagPolicy to the list of enabled MRF policies?',
|
||||||
enableTagPolicySuccessMessage: 'MRF TagPolicy was enabled',
|
enableTagPolicySuccessMessage: 'MRF TagPolicy was enabled',
|
||||||
createCustomTag: 'Create custom tag'
|
createCustomTag: 'Create custom tag',
|
||||||
|
moderateTags: 'Moderate Tags'
|
||||||
},
|
},
|
||||||
statuses: {
|
statuses: {
|
||||||
statuses: 'Statuses',
|
statuses: 'Statuses',
|
||||||
|
|
|
@ -67,55 +67,59 @@
|
||||||
@click.native="handleConfirmationResend(user)">
|
@click.native="handleConfirmationResend(user)">
|
||||||
{{ $t('users.resendConfirmation') }}
|
{{ $t('users.resendConfirmation') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-collapse accordion class="moderate-tags">
|
||||||
v-if="tagPolicyEnabled"
|
<el-collapse-item :title="$t('users.moderateTags')" name="open-tags">
|
||||||
:divided="showAdminAction(user)"
|
<el-dropdown-item
|
||||||
:class="{ 'active-tag': user.tags.includes('mrf_tag:media-force-nsfw') }"
|
v-if="tagPolicyEnabled"
|
||||||
@click.native="toggleTag(user, 'mrf_tag:media-force-nsfw')">
|
:divided="showAdminAction(user)"
|
||||||
{{ $t('users.forceNsfw') }}
|
:class="{ 'active-tag': user.tags.includes('mrf_tag:media-force-nsfw') }"
|
||||||
<i v-if="user.tags.includes('mrf_tag:media-force-nsfw')" class="el-icon-check"/>
|
@click.native="toggleTag(user, 'mrf_tag:media-force-nsfw')">
|
||||||
</el-dropdown-item>
|
{{ $t('users.forceNsfw') }}
|
||||||
<el-dropdown-item
|
<i v-if="user.tags.includes('mrf_tag:media-force-nsfw')" class="el-icon-check"/>
|
||||||
v-if="tagPolicyEnabled"
|
</el-dropdown-item>
|
||||||
:class="{ 'active-tag': user.tags.includes('mrf_tag:media-strip') }"
|
<el-dropdown-item
|
||||||
@click.native="toggleTag(user, 'mrf_tag:media-strip')">
|
v-if="tagPolicyEnabled"
|
||||||
{{ $t('users.stripMedia') }}
|
:class="{ 'active-tag': user.tags.includes('mrf_tag:media-strip') }"
|
||||||
<i v-if="user.tags.includes('mrf_tag:media-strip')" class="el-icon-check"/>
|
@click.native="toggleTag(user, 'mrf_tag:media-strip')">
|
||||||
</el-dropdown-item>
|
{{ $t('users.stripMedia') }}
|
||||||
<el-dropdown-item
|
<i v-if="user.tags.includes('mrf_tag:media-strip')" class="el-icon-check"/>
|
||||||
v-if="tagPolicyEnabled"
|
</el-dropdown-item>
|
||||||
:class="{ 'active-tag': user.tags.includes('mrf_tag:force-unlisted') }"
|
<el-dropdown-item
|
||||||
@click.native="toggleTag(user, 'mrf_tag:force-unlisted')">
|
v-if="tagPolicyEnabled"
|
||||||
{{ $t('users.forceUnlisted') }}
|
:class="{ 'active-tag': user.tags.includes('mrf_tag:force-unlisted') }"
|
||||||
<i v-if="user.tags.includes('mrf_tag:force-unlisted')" class="el-icon-check"/>
|
@click.native="toggleTag(user, 'mrf_tag:force-unlisted')">
|
||||||
</el-dropdown-item>
|
{{ $t('users.forceUnlisted') }}
|
||||||
<el-dropdown-item
|
<i v-if="user.tags.includes('mrf_tag:force-unlisted')" class="el-icon-check"/>
|
||||||
v-if="tagPolicyEnabled"
|
</el-dropdown-item>
|
||||||
:class="{ 'active-tag': user.tags.includes('mrf_tag:sandbox') }"
|
<el-dropdown-item
|
||||||
@click.native="toggleTag(user, 'mrf_tag:sandbox')">
|
v-if="tagPolicyEnabled"
|
||||||
{{ $t('users.sandbox') }}
|
:class="{ 'active-tag': user.tags.includes('mrf_tag:sandbox') }"
|
||||||
<i v-if="user.tags.includes('mrf_tag:sandbox')" class="el-icon-check"/>
|
@click.native="toggleTag(user, 'mrf_tag:sandbox')">
|
||||||
</el-dropdown-item>
|
{{ $t('users.sandbox') }}
|
||||||
<el-dropdown-item
|
<i v-if="user.tags.includes('mrf_tag:sandbox')" class="el-icon-check"/>
|
||||||
v-if="user.local && tagPolicyEnabled"
|
</el-dropdown-item>
|
||||||
:class="{ 'active-tag': user.tags.includes('mrf_tag:disable-remote-subscription') }"
|
<el-dropdown-item
|
||||||
@click.native="toggleTag(user, 'mrf_tag:disable-remote-subscription')">
|
v-if="user.local && tagPolicyEnabled"
|
||||||
{{ $t('users.disableRemoteSubscription') }}
|
:class="{ 'active-tag': user.tags.includes('mrf_tag:disable-remote-subscription') }"
|
||||||
<i v-if="user.tags.includes('mrf_tag:disable-remote-subscription')" class="el-icon-check"/>
|
@click.native="toggleTag(user, 'mrf_tag:disable-remote-subscription')">
|
||||||
</el-dropdown-item>
|
{{ $t('users.disableRemoteSubscription') }}
|
||||||
<el-dropdown-item
|
<i v-if="user.tags.includes('mrf_tag:disable-remote-subscription')" class="el-icon-check"/>
|
||||||
v-if="user.local && tagPolicyEnabled"
|
</el-dropdown-item>
|
||||||
:class="{ 'active-tag': user.tags.includes('mrf_tag:disable-any-subscription') }"
|
<el-dropdown-item
|
||||||
@click.native="toggleTag(user, 'mrf_tag:disable-any-subscription')">
|
v-if="user.local && tagPolicyEnabled"
|
||||||
{{ $t('users.disableAnySubscription') }}
|
:class="{ 'active-tag': user.tags.includes('mrf_tag:disable-any-subscription') }"
|
||||||
<i v-if="user.tags.includes('mrf_tag:disable-any-subscription')" class="el-icon-check"/>
|
@click.native="toggleTag(user, 'mrf_tag:disable-any-subscription')">
|
||||||
</el-dropdown-item>
|
{{ $t('users.disableAnySubscription') }}
|
||||||
<el-dropdown-item
|
<i v-if="user.tags.includes('mrf_tag:disable-any-subscription')" class="el-icon-check"/>
|
||||||
v-if="user.local && tagPolicyEnabled"
|
</el-dropdown-item>
|
||||||
icon="el-icon-plus"
|
<el-dropdown-item
|
||||||
@click.native="$emit('open-custom-tag-dialog')">
|
v-if="user.local && tagPolicyEnabled"
|
||||||
{{ $t('users.createCustomTag') }}
|
icon="el-icon-plus"
|
||||||
</el-dropdown-item>
|
@click.native="$emit('open-custom-tag-dialog')">
|
||||||
|
{{ $t('users.createCustomTag') }}
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-collapse-item>
|
||||||
|
</el-collapse>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="!tagPolicyEnabled"
|
v-if="!tagPolicyEnabled"
|
||||||
divided
|
divided
|
||||||
|
@ -162,6 +166,11 @@ export default {
|
||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tagsOpen: []
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
actorType: {
|
actorType: {
|
||||||
get() {
|
get() {
|
||||||
|
@ -328,8 +337,27 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
.moderate-tags {
|
||||||
|
.el-collapse-item__content {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
.el-collapse-item__header {
|
||||||
|
height: 23px;
|
||||||
|
margin-top: 4px;
|
||||||
|
padding-left: 15px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #606266;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.el-collapse-item__wrap {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
.moderation-dropdown-menu {
|
.moderation-dropdown-menu {
|
||||||
width: 350px;
|
width: 350px;
|
||||||
|
.el-dropdown-menu--small .el-dropdown-menu__item.el-dropdown-menu__item--divided {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@media only screen and (max-width:480px) {
|
@media only screen and (max-width:480px) {
|
||||||
.moderate-user-button {
|
.moderate-user-button {
|
||||||
|
|
Loading…
Reference in a new issue