Browse Source

feat: add share base button to top right

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/3573/head
mertmit 2 years ago
parent
commit
a986984bae
  1. 15
      packages/nc-gui/components/general/ShareBaseButton.vue
  2. 1
      packages/nc-gui/pages/[projectType]/[projectId]/index/index.vue
  3. 4
      tests/playwright/pages/Dashboard/Settings/Teams.ts

15
packages/nc-gui/components/general/ShareBaseButton.vue

@ -37,13 +37,16 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
</script>
<template>
<div class="flex items-center w-full pl-3 hover:(text-primary bg-primary bg-opacity-5)" @click="showUserModal = true">
<div class="flex items-center h-full" @click="showUserModal = true">
<div v-if="isShareBaseAllowed">
<div class="flex items-center space-x-1">
<MdiAccountPlusOutline class="mr-1 nc-share-base" />
<div>{{ $t('activity.inviteTeam') }}</div>
</div>
<a-tooltip placement="left">
<template #title>
<span class="text-xs">{{ $t('activity.inviteTeam') }}</span>
</template>
<div class="flex items-center space-x-1 cursor-pointer">
<MdiAccountPlusOutline class="mr-1 nc-share-base text-gray-300 hover:text-accent" />
</div>
</a-tooltip>
</div>
<LazyTabsAuthUserManagementUsersModal :show="showUserModal" @closed="showUserModal = false" />

1
packages/nc-gui/pages/[projectType]/[projectId]/index/index.vue

@ -75,6 +75,7 @@ function onEdit(targetKey: number, action: 'add' | 'remove' | string) {
</div>
</div>
<LazyGeneralShareBaseButton />
<LazyGeneralFullScreen class="nc-fullscreen-icon" />
</div>

4
tests/playwright/pages/Dashboard/Settings/Teams.ts

@ -28,6 +28,10 @@ export class TeamsPage extends BasePage {
return this.rootPage.getByTestId('nc-share-base-sub-modal');
}
async clickInviteTeamBtn() {
await this.inviteTeamBtn.click();
}
async invite({ email, role, skipOpeningModal }: { email: string; role: string; skipOpeningModal?: boolean }) {
email = this.prefixEmail(email);

Loading…
Cancel
Save