From 1479bb49755afe0b7df28ca226298ec0f218d56f Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 19 Aug 2024 11:40:41 +0000 Subject: [PATCH] refactor: add leave workspace option and after leaving workspace navigate to the first workspace in list --- .../components/workspace/CollaboratorsList.vue | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/packages/nc-gui/components/workspace/CollaboratorsList.vue b/packages/nc-gui/components/workspace/CollaboratorsList.vue index a2ed3d6822..76385e45be 100644 --- a/packages/nc-gui/components/workspace/CollaboratorsList.vue +++ b/packages/nc-gui/components/workspace/CollaboratorsList.vue @@ -7,6 +7,8 @@ const props = defineProps<{ const { workspaceRoles } = useRoles() +const { user } = useGlobal() + const workspaceStore = useWorkspace() const { removeCollaborator, updateCollaborator: _updateCollaborator, loadWorkspace } = workspaceStore @@ -289,24 +291,13 @@ const isDeleteOrUpdateAllowed = (user) => { - - - {{ $t('labels.assignAs') }} - - - - Remove user + {{ record.id === user.id ? 'Leave workspace' : 'Remove user' }}