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() { isAdmin() {
this.$store.state.users.currentUser.role === 'admin' this.$store.state.users.currentUser.role === 'admin'
} },
}, },
methods: { methods: {
canGrantRole(name, value) { canGrantRole(name, value) {
const setEntry = `${value ? '!' : ''}rights:${name}` const setEntry = `${value ? '!' : ''}rights:${name}`
return ( return this.isAdmin && this.totalSet.has(setEntry)
this.isAdmin &&
this.totalSet.has(setEntry)
)
}, },
canChangeState(name, value) { canChangeState(name, value) {
const setEntry = `${value ? '!' : ''}state:${name}` const setEntry = `${value ? '!' : ''}state:${name}`

View file

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

View file

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

View file

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

View file

@ -822,7 +822,9 @@ const statuses = {
'addNewUsers', 'addNewUsers',
data.statuses.map((s) => s.user).filter((u) => u), 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 return data
}) })
}, },

View file

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