mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.9 KiB
62 lines
1.9 KiB
2 years ago
|
<script setup lang="ts">
|
||
2 years ago
|
import { IsPublicInj, useSharedView, useSmartsheetStoreOrThrow } from '#imports'
|
||
2 years ago
|
import ToggleDrawer from '~/components/smartsheet/sidebar/toolbar/ToggleDrawer.vue'
|
||
2 years ago
|
|
||
2 years ago
|
const { isGrid, isForm, isGallery, isSqlView } = useSmartsheetStoreOrThrow()
|
||
2 years ago
|
|
||
2 years ago
|
const isPublic = inject(IsPublicInj, ref(false))
|
||
2 years ago
|
|
||
2 years ago
|
const { isUIAllowed } = useUIPermission()
|
||
2 years ago
|
|
||
2 years ago
|
const { isOpen } = useSidebar()
|
||
2 years ago
|
|
||
|
const { allowCSVDownload } = useSharedView()
|
||
2 years ago
|
</script>
|
||
|
|
||
2 years ago
|
<template>
|
||
2 years ago
|
<div
|
||
|
class="nc-table-toolbar w-full py-1 flex gap-1 items-center h-[var(--toolbar-height)] px-2 border-b overflow-x-hidden"
|
||
|
style="z-index: 7"
|
||
|
>
|
||
|
<SmartsheetToolbarViewActions
|
||
2 years ago
|
v-if="(isGrid || isGallery) && !isPublic && isUIAllowed('dataInsert')"
|
||
2 years ago
|
:show-system-fields="false"
|
||
|
class="ml-1"
|
||
|
/>
|
||
2 years ago
|
|
||
2 years ago
|
<SmartsheetToolbarViewInfo v-if="!isUIAllowed('dataInsert') && !isPublic" />
|
||
|
|
||
2 years ago
|
<SmartsheetToolbarFieldsMenu v-if="isGrid || isGallery" :show-system-fields="false" class="ml-1" />
|
||
2 years ago
|
|
||
2 years ago
|
<SmartsheetToolbarColumnFilterMenu v-if="isGrid || isGallery" />
|
||
2 years ago
|
|
||
2 years ago
|
<SmartsheetToolbarSortListMenu v-if="isGrid || isGallery" />
|
||
2 years ago
|
|
||
2 years ago
|
<SmartsheetToolbarShareView v-if="(isForm || isGrid) && !isPublic" />
|
||
2 years ago
|
|
||
2 years ago
|
<SmartsheetToolbarExport v-if="(!isPublic && !isUIAllowed('dataInsert')) || (isPublic && allowCSVDownload)" />
|
||
2 years ago
|
<div class="flex-1" />
|
||
2 years ago
|
|
||
2 years ago
|
<SmartsheetToolbarReload v-if="!isPublic && !isForm" class="mx-1" />
|
||
2 years ago
|
|
||
2 years ago
|
<SmartsheetToolbarAddRow v-if="isUIAllowed('dataInsert') && !isPublic && !isForm && !isSqlView" class="mx-1" />
|
||
2 years ago
|
|
||
|
<SmartsheetToolbarSearchData v-if="(isGrid || isGallery) && !isPublic" class="shrink mr-2 ml-2" />
|
||
2 years ago
|
<template v-if="!isOpen && !isPublic">
|
||
|
<div class="border-l-1 pl-3">
|
||
|
<ToggleDrawer class="mr-2" />
|
||
|
</div>
|
||
|
</template>
|
||
2 years ago
|
</div>
|
||
2 years ago
|
</template>
|
||
|
|
||
2 years ago
|
<style scoped>
|
||
|
:deep(.nc-toolbar-btn) {
|
||
|
@apply border-0 !text-xs font-semibold px-2;
|
||
|
}
|
||
2 years ago
|
|
||
|
.nc-table-toolbar {
|
||
|
border-color: #f0f0f0 !important;
|
||
|
}
|
||
2 years ago
|
</style>
|