|
|
@ -56,67 +56,59 @@ onMounted(async () => { |
|
|
|
<div v-if="!filterCollaborators?.length" class="w-full h-full flex flex-col items-center justify-center mt-36"> |
|
|
|
<div v-if="!filterCollaborators?.length" class="w-full h-full flex flex-col items-center justify-center mt-36"> |
|
|
|
<Empty description="No members found" /> |
|
|
|
<Empty description="No members found" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<table v-else class="nc-collaborators-list-table !nc-scrollbar-md"> |
|
|
|
<div v-else class="nc-collaborators-list !mt-10 nc-scrollbar-md rounded-md"> |
|
|
|
<thead> |
|
|
|
<div class="nc-collaborators-list-header bg-gray-50 rounded-t-md"> |
|
|
|
<tr> |
|
|
|
<div class="flex w-2/5 text-gray-600">Users</div> |
|
|
|
<th class="w-1/5">Users</th> |
|
|
|
<div class="flex w-2/5 text-gray-600">Date Joined</div> |
|
|
|
<th class="w-1/5">Date Joined</th> |
|
|
|
<div class="flex w-2/5 text-gray-600">Access</div> |
|
|
|
<th class="w-1/5">Access</th> |
|
|
|
<div class="flex w-2/5 text-gray-600">Added By</div> |
|
|
|
<th class="w-1/5"></th> |
|
|
|
<div class="flex w-1/5 text-gray-600">Action</div> |
|
|
|
<th class="w-1/5"></th> |
|
|
|
</div> |
|
|
|
<th></th> |
|
|
|
<div class="flex flex-col nc-scrollbar-md"> |
|
|
|
</tr> |
|
|
|
<div v-for="(collab, i) of filterCollaborators" :key="i" |
|
|
|
</thead> |
|
|
|
class="relative w-full nc-collaborators nc-collaborators-list-row"> |
|
|
|
<tbody> |
|
|
|
<div class="!py-0 w-2/5 email truncate"> |
|
|
|
<tr v-for="(collab, i) of filterCollaborators" :key="i" class="relative w-full nc-collaborators"> |
|
|
|
|
|
|
|
<td class="!py-0 w-1/5 email"> |
|
|
|
|
|
|
|
<div class="flex items-center gap-2"> |
|
|
|
<div class="flex items-center gap-2"> |
|
|
|
<span class="color-band" :style="{ backgroundColor: stringToColour(collab.email) }">{{ |
|
|
|
<span class="color-band" :style="{ backgroundColor: stringToColour(collab.email) }">{{ |
|
|
|
collab.email.slice(0, 2) |
|
|
|
collab.email.slice(0, 2) |
|
|
|
}}</span> |
|
|
|
}}</span> |
|
|
|
{{ collab.email }} |
|
|
|
<span class="truncate"> |
|
|
|
|
|
|
|
{{ collab.email }} |
|
|
|
|
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
<td class="text-gray-500 text-xs w-1/5 created-at"> |
|
|
|
<div class="text-gray-500 text-xs w-2/5 created-at truncate"> |
|
|
|
{{ timeAgo(collab.created_at) }} |
|
|
|
{{ timeAgo(collab.created_at) }} |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
<td class="w-1/5 roles"> |
|
|
|
<div class="w-2/5 roles"> |
|
|
|
<div class="nc-collaborator-role-select"> |
|
|
|
<div class="nc-collaborator-role-select"> |
|
|
|
<template v-if="accessibleRoles.includes(collab.roles)"> |
|
|
|
<template v-if="accessibleRoles.includes(collab.roles)"> |
|
|
|
<RolesSelector |
|
|
|
<RolesSelector :role="collab.roles" :roles="accessibleRoles" :description="false" |
|
|
|
:role="collab.roles" |
|
|
|
:on-role-change="(role: WorkspaceUserRoles) => updateCollaborator(collab, role)" /> |
|
|
|
:roles="accessibleRoles" |
|
|
|
|
|
|
|
:description="false" |
|
|
|
|
|
|
|
:on-role-change="(role: WorkspaceUserRoles) => updateCollaborator(collab, role)" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<template v-else> |
|
|
|
<RolesBadge class="!bg-white" :role="collab.roles" /> |
|
|
|
<RolesBadge class="!bg-white" :role="collab.roles" /> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
<td class="w-1/5"> |
|
|
|
<div class="w-2/5"></div> |
|
|
|
<div class="-left-2.5 top-5"> |
|
|
|
<div class="w-1/5 pl-5"> |
|
|
|
<NcDropdown v-if="collab.roles !== WorkspaceUserRoles.OWNER" :trigger="['click']"> |
|
|
|
<NcDropdown v-if="collab.roles !== WorkspaceUserRoles.OWNER" :trigger="['click']"> |
|
|
|
<MdiDotsVertical |
|
|
|
<MdiDotsVertical |
|
|
|
class="border-1 !text-gray-600 h-5.5 w-5.5 rounded outline-0 p-0.5 nc-workspace-menu transform transition-transform !text-gray-400 cursor-pointer hover:(!text-gray-500 bg-gray-100)" |
|
|
|
class="border-1 !text-gray-600 h-5.5 w-5.5 rounded outline-0 p-0.5 nc-workspace-menu transform transition-transform !text-gray-400 cursor-pointer hover:(!text-gray-500 bg-gray-100)" /> |
|
|
|
/> |
|
|
|
<template #overlay> |
|
|
|
<template #overlay> |
|
|
|
<NcMenu> |
|
|
|
<NcMenu> |
|
|
|
<NcMenuItem class="!text-red-500 !hover:bg-red-50" @click="removeCollaborator(collab.id)"> |
|
|
|
<NcMenuItem class="!text-red-500 !hover:bg-red-50" @click="removeCollaborator(collab.id)"> |
|
|
|
<MaterialSymbolsDeleteOutlineRounded /> |
|
|
|
<MaterialSymbolsDeleteOutlineRounded /> |
|
|
|
Remove user |
|
|
|
Remove user |
|
|
|
</NcMenuItem> |
|
|
|
</NcMenuItem> |
|
|
|
</NcMenu> |
|
|
|
</NcMenu> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</NcDropdown> |
|
|
|
</NcDropdown> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
</div> |
|
|
|
<td class="w-1/5 padding"></td> |
|
|
|
</div> |
|
|
|
<td class="w-1/5 padding"></td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
</tbody> |
|
|
|
|
|
|
|
</table> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@ -125,6 +117,32 @@ onMounted(async () => { |
|
|
|
@apply text-[14px] pt-1 text-center; |
|
|
|
@apply text-[14px] pt-1 text-center; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.nc-collaborators-list { |
|
|
|
|
|
|
|
@apply border-2 shadow-sm border-gray-100 mt-1 flex flex-col w-full; |
|
|
|
|
|
|
|
// todo: replace/remove 120px with proper value while updating invite ui |
|
|
|
|
|
|
|
height: calc(100vh - calc(var(--topbar-height) + 9rem + 120px)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.nc-collaborators-list-header { |
|
|
|
|
|
|
|
@apply flex flex-row justify-between items-center min-h-10 border-b-2 shadow-sm border-gray-100 pl-4; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.nc-collaborators-list-row { |
|
|
|
|
|
|
|
@apply flex flex-row justify-between items-center min-h-16 border-b-2 shadow-sm border-gray-100 pl-4; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.color-band { |
|
|
|
|
|
|
|
@apply w-6 h-6 left-0 top-[10px] rounded-full flex justify-center uppercase text-white font-weight-bold text-xs items-center; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.nc-collaborator-role-select .ant-select-selector) { |
|
|
|
|
|
|
|
@apply !rounded; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.ant-select-selection-item) { |
|
|
|
|
|
|
|
@apply mt-0.75; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.nc-collaborators-list-table { |
|
|
|
.nc-collaborators-list-table { |
|
|
|
@apply min-w-[700px] !w-full border-gray-100 mt-1; |
|
|
|
@apply min-w-[700px] !w-full border-gray-100 mt-1; |
|
|
|
|
|
|
|
|
|
|
@ -154,26 +172,21 @@ onMounted(async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.color-band { |
|
|
|
|
|
|
|
@apply w-6 h-6 left-0 top-[10px] rounded-full flex justify-center uppercase text-white font-weight-bold text-xs items-center; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.nc-collaborator-role-select .ant-select-selector) { |
|
|
|
|
|
|
|
@apply !rounded; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
table { |
|
|
|
table { |
|
|
|
display: block; |
|
|
|
display: block; |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
thead { |
|
|
|
thead { |
|
|
|
display: block; |
|
|
|
display: block; |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tr { |
|
|
|
tr { |
|
|
|
display: block; |
|
|
|
display: block; |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tbody { |
|
|
|
tbody { |
|
|
|
display: block; |
|
|
|
display: block; |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
@ -183,32 +196,35 @@ tbody { |
|
|
|
&::-webkit-scrollbar { |
|
|
|
&::-webkit-scrollbar { |
|
|
|
width: 4px; |
|
|
|
width: 4px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&::-webkit-scrollbar-track { |
|
|
|
&::-webkit-scrollbar-track { |
|
|
|
background: #f6f6f600 !important; |
|
|
|
background: #f6f6f600 !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&::-webkit-scrollbar-thumb { |
|
|
|
&::-webkit-scrollbar-thumb { |
|
|
|
background: #f6f6f600; |
|
|
|
background: #f6f6f600; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&::-webkit-scrollbar-thumb:hover { |
|
|
|
&::-webkit-scrollbar-thumb:hover { |
|
|
|
background: #f6f6f600; |
|
|
|
background: #f6f6f600; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tbody { |
|
|
|
tbody { |
|
|
|
&::-webkit-scrollbar { |
|
|
|
&::-webkit-scrollbar { |
|
|
|
width: 4px; |
|
|
|
width: 4px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&::-webkit-scrollbar-track { |
|
|
|
&::-webkit-scrollbar-track { |
|
|
|
background: #f6f6f600 !important; |
|
|
|
background: #f6f6f600 !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&::-webkit-scrollbar-thumb { |
|
|
|
&::-webkit-scrollbar-thumb { |
|
|
|
background: rgb(215, 215, 215); |
|
|
|
background: rgb(215, 215, 215); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&::-webkit-scrollbar-thumb:hover { |
|
|
|
&::-webkit-scrollbar-thumb:hover { |
|
|
|
background: rgb(203, 203, 203); |
|
|
|
background: rgb(203, 203, 203); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.ant-select-selection-item) { |
|
|
|
|
|
|
|
@apply mt-0.75; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
</style> |
|
|
|