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. 13
      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

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

@ -37,13 +37,16 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
</script> </script>
<template> <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 v-if="isShareBaseAllowed">
<div class="flex items-center space-x-1"> <a-tooltip placement="left">
<MdiAccountPlusOutline class="mr-1 nc-share-base" /> <template #title>
<span class="text-xs">{{ $t('activity.inviteTeam') }}</span>
<div>{{ $t('activity.inviteTeam') }}</div> </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> </div>
</a-tooltip>
</div> </div>
<LazyTabsAuthUserManagementUsersModal :show="showUserModal" @closed="showUserModal = false" /> <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>
</div> </div>
<LazyGeneralShareBaseButton />
<LazyGeneralFullScreen class="nc-fullscreen-icon" /> <LazyGeneralFullScreen class="nc-fullscreen-icon" />
</div> </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'); 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 }) { async invite({ email, role, skipOpeningModal }: { email: string; role: string; skipOpeningModal?: boolean }) {
email = this.prefixEmail(email); email = this.prefixEmail(email);

Loading…
Cancel
Save