Skip to content

Commit

Permalink
Fix additional user data loading (#8555)
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen authored Mar 7, 2023
1 parent e6f7f31 commit 574bba1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ We've added the batch edit quota functionality to the admin panel for users pers
https://github.com/owncloud/web/pull/8387
https://github.com/owncloud/web/pull/8430
https://github.com/owncloud/web/pull/8438
https://github.com/owncloud/web/pull/8555
https://github.com/owncloud/web/issues/8417
16 changes: 12 additions & 4 deletions packages/web-app-admin-settings/src/components/Users/UsersList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,23 +149,31 @@ export default defineComponent({
}
const showDetails = (user) => {
selectUser(user)
if (!isUserSelected(user)) {
selectUser(user)
}
eventBus.publish(SideBarEventTopics.open)
}
const showEditPanel = (user) => {
selectUser(user)
if (!isUserSelected(user)) {
selectUser(user)
}
eventBus.publish(SideBarEventTopics.openWithPanel, 'EditPanel')
}
const showGroupAssigmentPanel = (user) => {
selectUser(user)
if (!isUserSelected(user)) {
selectUser(user)
}
eventBus.publish(SideBarEventTopics.openWithPanel, 'GroupAssignmentsPanel')
}
const rowClicked = (data) => {
const user = data[0]
selectUser(user)
if (!isUserSelected(user)) {
selectUser(user)
}
}
const showContextMenuOnBtnClick = (data, user) => {
const { dropdown, event } = data
Expand Down
11 changes: 3 additions & 8 deletions packages/web-app-admin-settings/src/views/Users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,6 @@ export default defineComponent({
console.debug('Failed to load additional user data', failedRequests)
}
if (unref(selectedUsers).length === 1) {
loadedUser.value = unref(selectedUsers)[0]
sideBarLoading.value = false
return
}
loadedUser.value = null
sideBarLoading.value = false
selectedPersonalDrives.value.splice(0, unref(selectedPersonalDrives).length)
unref(selectedUsers).forEach((user) => {
const drive = toRaw(user.drive)
Expand All @@ -305,6 +297,9 @@ export default defineComponent({
} as SpaceResource
selectedPersonalDrives.value.push(spaceResource)
})
loadedUser.value = unref(selectedUsers).length === 1 ? unref(selectedUsers)[0] : null
sideBarLoading.value = false
})
const calculateListHeaderPosition = () => {
Expand Down

0 comments on commit 574bba1

Please sign in to comment.