forked from AkkomaGang/admin-fe
Rename tagPolicies to mrfPolicies
This commit is contained in:
parent
2e397f8790
commit
fc4a48c1d1
4 changed files with 9 additions and 9 deletions
|
@ -26,7 +26,7 @@ const users = {
|
||||||
fetchedUsers: [],
|
fetchedUsers: [],
|
||||||
loading: true,
|
loading: true,
|
||||||
searchQuery: '',
|
searchQuery: '',
|
||||||
tagPolicies: [],
|
mrfPolicies: [],
|
||||||
totalUsersCount: 0,
|
totalUsersCount: 0,
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 50,
|
pageSize: 50,
|
||||||
|
@ -80,8 +80,8 @@ const users = {
|
||||||
SET_SEARCH_QUERY: (state, query) => {
|
SET_SEARCH_QUERY: (state, query) => {
|
||||||
state.searchQuery = query
|
state.searchQuery = query
|
||||||
},
|
},
|
||||||
SET_TAG_POLICY: (state, tagPolicies) => {
|
SET_TAG_POLICY: (state, mrfPolicies) => {
|
||||||
state.tagPolicies = tagPolicies
|
state.mrfPolicies = mrfPolicies
|
||||||
},
|
},
|
||||||
SET_USERS_FILTERS: (state, filters) => {
|
SET_USERS_FILTERS: (state, filters) => {
|
||||||
state.filters = filters
|
state.filters = filters
|
||||||
|
@ -215,7 +215,7 @@ const users = {
|
||||||
const configs = [{
|
const configs = [{
|
||||||
group: ':pleroma',
|
group: ':pleroma',
|
||||||
key: ':mrf',
|
key: ':mrf',
|
||||||
value: [{ tuple: [':policies', [...state.tagPolicies, 'Pleroma.Web.ActivityPub.MRF.TagPolicy']] }]
|
value: [{ tuple: [':policies', [...state.mrfPolicies, 'Pleroma.Web.ActivityPub.MRF.TagPolicy']] }]
|
||||||
}]
|
}]
|
||||||
await updateSettings(configs, getters.authHost, getters.token)
|
await updateSettings(configs, getters.authHost, getters.token)
|
||||||
|
|
||||||
|
@ -223,11 +223,11 @@ const users = {
|
||||||
},
|
},
|
||||||
async FetchTagPolicySetting({ commit, getters }) {
|
async FetchTagPolicySetting({ commit, getters }) {
|
||||||
const { data } = await fetchSettings(getters.authHost, getters.token)
|
const { data } = await fetchSettings(getters.authHost, getters.token)
|
||||||
const tagPolicies = data.configs
|
const mrfPolicies = data.configs
|
||||||
.find(el => el.key === ':mrf').value
|
.find(el => el.key === ':mrf').value
|
||||||
.find(el => el.tuple[0] === ':policies').tuple[1] || []
|
.find(el => el.tuple[0] === ':policies').tuple[1] || []
|
||||||
|
|
||||||
commit('SET_TAG_POLICY', Array.isArray(tagPolicies) ? tagPolicies : [tagPolicies])
|
commit('SET_TAG_POLICY', Array.isArray(mrfPolicies) ? mrfPolicies : [mrfPolicies])
|
||||||
},
|
},
|
||||||
async FetchUsers({ commit, dispatch, getters, state }, { page }) {
|
async FetchUsers({ commit, dispatch, getters, state }, { page }) {
|
||||||
commit('SET_LOADING', true)
|
commit('SET_LOADING', true)
|
||||||
|
|
|
@ -174,7 +174,7 @@ export default {
|
||||||
return this.$store.state.app.device === 'desktop'
|
return this.$store.state.app.device === 'desktop'
|
||||||
},
|
},
|
||||||
tagPolicyEnabled() {
|
tagPolicyEnabled() {
|
||||||
return this.$store.state.users.tagPolicies.includes('Pleroma.Web.ActivityPub.MRF.TagPolicy')
|
return this.$store.state.users.mrfPolicies.includes('Pleroma.Web.ActivityPub.MRF.TagPolicy')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -172,7 +172,7 @@ export default {
|
||||||
return this.$props.selectedUsers.length > 0
|
return this.$props.selectedUsers.length > 0
|
||||||
},
|
},
|
||||||
tagPolicyEnabled() {
|
tagPolicyEnabled() {
|
||||||
return this.$store.state.users.tagPolicies.includes('Pleroma.Web.ActivityPub.MRF.TagPolicy')
|
return this.$store.state.users.mrfPolicies.includes('Pleroma.Web.ActivityPub.MRF.TagPolicy')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -22,7 +22,7 @@ export const storeWithTagPolicy = {
|
||||||
settings,
|
settings,
|
||||||
user,
|
user,
|
||||||
userProfile,
|
userProfile,
|
||||||
users: { ...users, state: { ...users.state, tagPolicies: ['Pleroma.Web.ActivityPub.MRF.TagPolicy'] }}
|
users: { ...users, state: { ...users.state, mrfPolicies: ['Pleroma.Web.ActivityPub.MRF.TagPolicy'] }}
|
||||||
},
|
},
|
||||||
getters
|
getters
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue