Browse Source

fix: Hide export btn on toolbar when on viewer permision

pull/7089/head
Muhammed Mustafa 12 months ago
parent
commit
2e00a0fa2a
  1. 2
      packages/nc-gui/components/smartsheet/Toolbar.vue
  2. 8
      packages/nc-gui/components/smartsheet/toolbar/ViewActionMenu.vue

2
packages/nc-gui/components/smartsheet/Toolbar.vue

@ -39,7 +39,7 @@ const { allowCSVDownload } = useSharedView()
<!-- <LazySmartsheetToolbarQrScannerButton v-if="isMobileMode && (isGrid || isKanban || isGallery)" /> --> <!-- <LazySmartsheetToolbarQrScannerButton v-if="isMobileMode && (isGrid || isKanban || isGallery)" /> -->
<LazySmartsheetToolbarExport v-if="(!isPublic && !isUIAllowed('dataInsert')) || (isPublic && allowCSVDownload)" /> <LazySmartsheetToolbarExport v-if="isPublic && allowCSVDownload" />
<div class="flex-1" /> <div class="flex-1" />
</template> </template>

8
packages/nc-gui/components/smartsheet/toolbar/ViewActionMenu.vue

@ -239,10 +239,12 @@ const onDelete = async () => {
<LazySmartsheetToolbarExportSubActions /> <LazySmartsheetToolbarExportSubActions />
</NcSubMenu> </NcSubMenu>
<NcDivider />
</template> </template>
<NcSubMenu v-if="isUIAllowed('viewCreateOrEdit')" key="lock-type" class="scrollbar-thin-dull max-h-90vh overflow-auto !py-0"> <template v-if="isUIAllowed('viewCreateOrEdit')">
<NcDivider />
<NcSubMenu key="lock-type" class="scrollbar-thin-dull max-h-90vh overflow-auto !py-0">
<template #title> <template #title>
<div <div
v-e="[ v-e="[
@ -277,6 +279,8 @@ const onDelete = async () => {
<LazySmartsheetToolbarLockType :type="LockType.Locked" @click="changeLockType(LockType.Locked)" /> <LazySmartsheetToolbarLockType :type="LockType.Locked" @click="changeLockType(LockType.Locked)" />
</a-menu-item> </a-menu-item>
</NcSubMenu> </NcSubMenu>
</template>
<template v-if="!view.is_default"> <template v-if="!view.is_default">
<NcDivider /> <NcDivider />
<NcTooltip v-if="lockType === LockType.Locked"> <NcTooltip v-if="lockType === LockType.Locked">

Loading…
Cancel
Save