Merge branch 'admin-users' into shigusegubu-themes3

This commit is contained in:
Henry Jameson 2026-06-11 12:34:21 +03:00
commit b9554dd0d0
6 changed files with 14 additions and 14 deletions

View file

@ -407,16 +407,13 @@ const ModerationTools = {
},
isAdmin() {
this.$store.state.users.currentUser.role === 'admin'
}
},
},
methods: {
canGrantRole(name, value) {
const setEntry = `${value ? '!' : ''}rights:${name}`
return (
this.isAdmin &&
this.totalSet.has(setEntry)
)
return this.isAdmin && this.totalSet.has(setEntry)
},
canChangeState(name, value) {
const setEntry = `${value ? '!' : ''}state:${name}`

View file

@ -103,11 +103,10 @@ const UsersTab = {
},
methods: {
fetchUsers(page) {
return useAdminSettingsStore()
.fetchUsers({
...this.fetchOptions,
page,
})
return useAdminSettingsStore().fetchUsers({
...this.fetchOptions,
page,
})
},
},
watch: {

View file

@ -277,7 +277,7 @@ const SettingsModal = {
watch: {
$route(r) {
this.minimizeModal()
}
},
},
}

View file

@ -45,7 +45,7 @@ const UserProfileAdminView = {
},
userId() {
return this.$route.params.id
}
},
},
methods: {
fetchStatuses(page) {

View file

@ -822,7 +822,9 @@ const statuses = {
'addNewUsers',
data.statuses.map((s) => s.user).filter((u) => u),
)
data.statuses = store.commit('addNewStatuses', { statuses: data.statuses })
data.statuses = store.commit('addNewStatuses', {
statuses: data.statuses,
})
return data
})
},

View file

@ -161,7 +161,9 @@ export const useInterfaceStore = defineStore('interface', {
case 'hidden':
return
default:
throw new Error(`Illegal minimization state of settings modal: ${this.settingsModalState}`)
throw new Error(
`Illegal minimization state of settings modal: ${this.settingsModalState}`,
)
}
},
clearSettingsModalTargetTab() {