{{ $t('users.disableRemoteSubscriptionForMultiple') }}
-
+
{{ $t('users.apply') }}
-
+
{{ $t('users.remove') }}
@@ -121,10 +121,10 @@
{{ $t('users.disableAnySubscriptionForMultiple') }}
-
+
{{ $t('users.apply') }}
-
+
{{ $t('users.remove') }}
@@ -198,7 +198,7 @@ export default {
},
addTag: (tag) => () => {
const filtered = this.selectedUsers.filter(user =>
- tag === 'disable_remote_subscription' || tag === 'disable_any_subscription'
+ tag === 'mrf_tag:disable-remote-subscription' || tag === 'mrf_tag:disable-any-subscription'
? this.isLocalUser(user) && !user.tags.includes(tag)
: user.nickname && !user.tags.includes(tag))
const addTagFn = async(users) => await this.$store.dispatch('AddTag', { users, tag })
@@ -206,7 +206,7 @@ export default {
},
removeTag: (tag) => async() => {
const filtered = this.selectedUsers.filter(user =>
- tag === 'disable_remote_subscription' || tag === 'disable_any_subscription'
+ tag === 'mrf_tag:disable-remote-subscription' || tag === 'mrf_tag:disable-any-subscription'
? this.isLocalUser(user) && user.tags.includes(tag)
: user.nickname && user.tags.includes(tag))
const removeTagFn = async(users) => await this.$store.dispatch('RemoveTag', { users, tag })
diff --git a/src/views/users/show.vue b/src/views/users/show.vue
index 70b645a3..c77c710c 100644
--- a/src/views/users/show.vue
+++ b/src/views/users/show.vue
@@ -169,12 +169,12 @@ export default {
},
humanizeTag(tag) {
const mapTags = {
- 'force_nsfw': 'Force NSFW',
- 'strip_media': 'Strip Media',
- 'force_unlisted': 'Force Unlisted',
- 'sandbox': 'Sandbox',
- 'disable_remote_subscription': 'Disable remote subscription',
- 'disable_any_subscription': 'Disable any subscription'
+ 'mrf_tag:media-force-nsfw': 'Force NSFW',
+ 'mrf_tag:media-strip': 'Strip Media',
+ 'mrf_tag:force-unlisted': 'Force Unlisted',
+ 'mrf_tag:sandbox': 'Sandbox',
+ 'mrf_tag:disable-remote-subscription': 'Disable remote subscription',
+ 'mrf_tag:disable-any-subscription': 'Disable any subscription'
}
return mapTags[tag]
},
diff --git a/test/views/users/index.test.js b/test/views/users/index.test.js
index 847de253..6afd901b 100644
--- a/test/views/users/index.test.js
+++ b/test/views/users/index.test.js
@@ -159,7 +159,7 @@ describe('Users actions', () => {
expect(store.state.users.fetchedUsers[1].deactivated).toBe(false)
wrapper.find(htmlElement(2, 2)).trigger('click')
- store.dispatch('DeleteUsers', { users: [{ active: true, deactivated: false, id: '10', nickname: 'bob', local: false, external: true, roles: { admin: false, moderator: false }, tags: ['sandbox'] }] })
+ store.dispatch('DeleteUsers', { users: [{ active: true, deactivated: false, id: '10', nickname: 'bob', local: false, external: true, roles: { admin: false, moderator: false }, tags: ['mrf_tag:sandbox'] }] })
await flushPromises()
expect(store.state.users.fetchedUsers[1].deactivated).toBe(true)
diff --git a/test/views/users/multipleUsersMenu.test.js b/test/views/users/multipleUsersMenu.test.js
index c956bed4..1408ea56 100644
--- a/test/views/users/multipleUsersMenu.test.js
+++ b/test/views/users/multipleUsersMenu.test.js
@@ -249,22 +249,22 @@ describe('Apply users actions to multiple users', () => {
wrapper.find(`.el-dropdown-menu__item:nth-child(11) button:nth-child(1)`).trigger('click')
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalled()
- expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalledWith('force_nsfw')
+ expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalledWith('mrf_tag:media-force-nsfw')
wrapper.find(`.el-dropdown-menu__item:nth-child(13) button:nth-child(1)`).trigger('click')
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalled()
- expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalledWith('force_unlisted')
+ expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalledWith('mrf_tag:force-unlisted')
wrapper.find(`.el-dropdown-menu__item:nth-child(15 ) button:nth-child(1)`).trigger('click')
expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalled()
- expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalledWith('disable_remote_subscription')
+ expect(wrapper.vm.addTagForMultipleUsers).toHaveBeenCalledWith('mrf_tag:disable-remote-subscription')
const addTag = wrapper.vm.mappers().addTag
const user1 = store.state.users.fetchedUsers[0]
const user2 = store.state.users.fetchedUsers[1]
expect(user1.tags.length).toBe(0)
expect(user2.tags.length).toBe(1)
- addTag('strip_media')()
+ addTag('mrf_tag:media-strip')()
const updatedUser1 = store.state.users.fetchedUsers[0]
const updatedUser2 = store.state.users.fetchedUsers[1]
@@ -289,22 +289,22 @@ describe('Apply users actions to multiple users', () => {
wrapper.find(`.el-dropdown-menu__item:nth-child(12) button:nth-child(2)`).trigger('click')
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalled()
- expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalledWith('strip_media')
+ expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalledWith('mrf_tag:media-strip')
wrapper.find(`.el-dropdown-menu__item:nth-child(14) button:nth-child(2)`).trigger('click')
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalled()
- expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalledWith('sandbox')
+ expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalledWith('mrf_tag:sandbox')
wrapper.find(`.el-dropdown-menu__item:nth-child(16) button:nth-child(2)`).trigger('click')
expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalled()
- expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalledWith('disable_any_subscription')
+ expect(wrapper.vm.removeTagFromMultipleUsers).toHaveBeenCalledWith('mrf_tag:disable-any-subscription')
const removeTag = wrapper.vm.mappers().removeTag
const user1 = store.state.users.fetchedUsers[1]
const user2 = store.state.users.fetchedUsers[2]
expect(user1.tags.length).toBe(1)
expect(user2.tags.length).toBe(1)
- removeTag('strip_media')()
+ removeTag('mrf_tag:media-strip')()
const updatedUser1 = store.state.users.fetchedUsers[1]
const updatedUser2 = store.state.users.fetchedUsers[2]