Skip to content

Commit

Permalink
Merge pull request #11059 from owncloud/fix/admin-settings-reactivity
Browse files Browse the repository at this point in the history
fix: updating admin-settings ui after saving changes
  • Loading branch information
JammingBen committed Jun 18, 2024
2 parents 8ad811d + 51273f5 commit aae373a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Admin settings UI update after save

We've fixed a bug where the UI would not display changes made in the admin settings until re-loading the entire page.

https://github.com/owncloud/web/pull/11059
https://github.com/owncloud/web/issues/11033
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export const useGroupSettingsStore = defineStore('groupSettings', () => {
}

const upsertGroup = (group: Group) => {
const existing = unref(groups).some(({ id }) => id === group.id)
const existing = unref(groups).find(({ id }) => id === group.id)
if (existing) {
Object.assign(existing, { ...group, members: [] })
Object.assign(existing, group)
return
}
unref(groups).push({ ...group, members: [] })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const useSpaceSettingsStore = defineStore('spaceSettings', () => {
}

const upsertSpace = (space: SpaceResource) => {
const existing = unref(spaces).some(({ id }) => id === space.id)
const existing = unref(spaces).find(({ id }) => id === space.id)
if (existing) {
Object.assign(existing, space)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const useUserSettingsStore = defineStore('userSettings', () => {
}

const upsertUser = (user: User) => {
const existing = unref(users).some(({ id }) => id === user.id)
const existing = unref(users).find(({ id }) => id === user.id)
if (existing) {
Object.assign(existing, user)
return
Expand Down

0 comments on commit aae373a

Please sign in to comment.