Files
nocodb/packages/nc-gui/components/general/OpenLeftSidebarBtn.vue
Ramesh Mane 9cc1f3cb30 Nc Fix: UI improvements - left sidebar (#8244)
* fix(nc-gui); update toolbar menu text grom GroupBy to Group

* fix(nc-gui): move sidebar base, table expand icon to the right side

* fix(nc-gui): sidebar base, table, view menu options padding issue

* fix(nc-gui): add background color for row on hover in grid view

* fix(nc-gui): reduce width of index column

* fix(nc-gui): on hover grid row bg opacity issue

* fix(nc-gui): reduce font size and grid cell height

* fix(nc-gui): sidebar view menu alignment issue on mobile screen

* fix(nc-gui): reduce font size

* fix(nc-gui): set column default width to 180px

* fix(nc-gui): keep only sidebar changes & revert all other changes

* fix(nc-gui): change table icon

* fix(nc-gui): trim base, table, view title while saving it

* fix(nc-gui): increate left sidebar max width

* fix(nc-gui): show truncated base/table/view name until standard end

* fix(nc-gui): oss sidebar base menu options alignment issue

* fix(nc-gui): use valid classname

* fix(nc-gui): sidebar external db source menu ui fixes

* fix(nc-gui): small changes

* chore(nc-gui): lint

* fix(nc-gui): pw test fail issue

* fix(nc-gui): trim title while creating base, table, view

* fix(nc-gui): some of the sidebar pw test fail issues

* fix(test): sidebar test fail issue

* fix(test): projectCollaboration test fail issue

* fix(nc-gui): change font size of view menu option view mode chip text

* fix(nc-gui): grayed out create view dropdown plus icon color

* fix(nc-gui): grayed out table icon and reduce width of default view context menu

* fix(nc-gui): remove copyright text from user menu

* fix(nc-gui):  chevron icon and show/hide sidebar icon should be gray in color
2024-04-15 09:11:12 +05:30

41 lines
1.3 KiB
Vue

<script lang="ts" setup>
const { isLeftSidebarOpen } = storeToRefs(useSidebarStore())
const { isMobileMode } = useGlobal()
const onClick = () => {
if (isLeftSidebarOpen.value) return
isLeftSidebarOpen.value = !isLeftSidebarOpen.value
}
</script>
<template>
<div v-e="['c:leftSidebar:hideToggle']">
<NcTooltip
placement="topLeft"
hide-on-click
class="transition-all duration-150"
:class="{
'opacity-0 w-0 pointer-events-none': !isMobileMode && isLeftSidebarOpen,
'opacity-100 max-w-10': isMobileMode || !isLeftSidebarOpen,
}"
>
<template #title>
{{ isLeftSidebarOpen ? `${$t('title.hideSidebar')}` : `${$t('title.showSidebar')}` }}
</template>
<NcButton
:type="isMobileMode ? 'secondary' : 'text'"
:size="isMobileMode ? 'medium' : 'small'"
class="nc-sidebar-left-toggle-icon !text-gray-600 !hover:text-gray-800 w-8"
@click="onClick"
>
<div class="flex items-center text-inherit">
<GeneralIcon v-if="isMobileMode" icon="menu" class="text-lg -mt-0.25" />
<GeneralIcon v-else icon="doubleRightArrow" class="duration-150 transition-all !text-lg -mt-0.25 !text-gray-500/75" />
</div>
</NcButton>
</NcTooltip>
</div>
</template>