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.
52 lines
1.5 KiB
52 lines
1.5 KiB
<script setup lang="ts"> |
|
import { IsPublicInj, useSmartsheetStoreOrThrow } from '#imports' |
|
import AddRow from '~/components/smartsheet/sidebar/toolbar/AddRow.vue' |
|
import Reload from '~/components/smartsheet/sidebar/toolbar/Reload.vue' |
|
import ToggleDrawer from '~/components/smartsheet/sidebar/toolbar/ToggleDrawer.vue' |
|
|
|
const { isGrid, isForm, isGallery } = useSmartsheetStoreOrThrow() |
|
const isPublic = inject(IsPublicInj, ref(false)) |
|
const { allowCSVDownload } = useSharedView() |
|
|
|
const { isOpen } = useSidebar() |
|
</script> |
|
|
|
<template> |
|
<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 |
|
v-if="(isGrid && !isPublic) || (isGrid && isPublic && allowCSVDownload)" |
|
:show-system-fields="false" |
|
class="ml-1" |
|
/> |
|
|
|
<SmartsheetToolbarFieldsMenu v-if="isGrid || isGallery" :show-system-fields="false" class="ml-1" /> |
|
|
|
<SmartsheetToolbarColumnFilterMenu v-if="isGrid || isGallery" /> |
|
|
|
<SmartsheetToolbarSortListMenu v-if="isGrid || isGallery" /> |
|
|
|
<SmartsheetToolbarShareView v-if="(isForm || isGrid) && !isPublic" /> |
|
|
|
<div class="flex-1" /> |
|
|
|
<Reload /> |
|
<AddRow /> |
|
|
|
<SmartsheetToolbarSearchData v-if="(isGrid || isGallery) && !isPublic" class="shrink mr-2 ml-2" /> |
|
|
|
<ToggleDrawer v-if="!isOpen" class="mr-2" /> |
|
</div> |
|
</template> |
|
|
|
<style scoped> |
|
:deep(.nc-toolbar-btn) { |
|
@apply border-0 !text-xs font-semibold px-2; |
|
} |
|
|
|
.nc-table-toolbar { |
|
border-color: #f0f0f0 !important; |
|
} |
|
</style>
|
|
|