Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix additional user data loading #8555

Merged
merged 2 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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