Browse Source

feat: Removed Create View button from sidebar

pull/6474/head
Muhammed Mustafa 1 year ago
parent
commit
6c0603b386
  1. 9
      packages/nc-gui/components/dashboard/TreeView/TableNode.vue
  2. 25
      packages/nc-gui/components/dashboard/TreeView/ViewsList.vue

9
packages/nc-gui/components/dashboard/TreeView/TableNode.vue

@ -263,7 +263,14 @@ const isTableOpened = computed(() => {
</template> </template>
</NcDropdown> </NcDropdown>
<DashboardTreeViewCreateViewBtn v-if="isUIAllowed('viewCreateOrEdit')"> <DashboardTreeViewCreateViewBtn v-if="isUIAllowed('viewCreateOrEdit')">
<NcButton type="text" size="xxsmall" class="nc-create-view-btn nc-sidebar-node-btn"> <NcButton
type="text"
size="xxsmall"
class="nc-create-view-btn nc-sidebar-node-btn"
:class="{
'!md:(visible opacity-100)': openedTableId === table.id,
}"
>
<GeneralIcon icon="plus" class="text-xl leading-5" style="-webkit-text-stroke: 0.15px" /> <GeneralIcon icon="plus" class="text-xl leading-5" style="-webkit-text-stroke: 0.15px" />
</NcButton> </NcButton>
</DashboardTreeViewCreateViewBtn> </DashboardTreeViewCreateViewBtn>

25
packages/nc-gui/components/dashboard/TreeView/ViewsList.vue

@ -346,32 +346,9 @@ function onOpenModal({
</script> </script>
<template> <template>
<DashboardTreeViewCreateViewBtn
v-if="isUIAllowed('viewCreateOrEdit')"
class="!sm:hidden"
:overlay-class-name="isDefaultBase ? '!left-18 !min-w-42' : '!left-25 !min-w-42'"
>
<NcButton
type="text"
size="xsmall"
class="!w-full !py-0 !h-7 !text-gray-500 !hover:(bg-transparent font-normal text-brand-500) !font-normal !text-sm"
:centered="false"
>
<GeneralIcon
icon="plus"
class="mr-2"
:class="{
'ml-18.75': isDefaultBase,
'ml-24.25': !isDefaultBase,
}"
/>
<span class="text-sm">New View</span>
</NcButton>
</DashboardTreeViewCreateViewBtn>
<div <div
v-if="!views.length" v-if="!views.length"
class="text-gray-500 my-1.5 md:hidden" class="text-gray-500 my-1.5"
:class="{ :class="{
'ml-19.25': isDefaultBase, 'ml-19.25': isDefaultBase,
'ml-24.75': !isDefaultBase, 'ml-24.75': !isDefaultBase,

Loading…
Cancel
Save