From a757da68384731f71847d26872dcacada4e37ea4 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 22 Dec 2022 17:39:36 +0530 Subject: [PATCH] fix(gui):shared view creation bug and show icon in shared view Signed-off-by: Pranav C --- .../components/smartsheet/sidebar/MenuTop.vue | 1 + .../smartsheet/sidebar/RenameableMenuItem.vue | 16 ++++++++++++---- packages/nc-gui/composables/useSharedView.ts | 7 +++++-- packages/nc-gui/layouts/shared-view.vue | 3 ++- packages/nocodb/src/lib/models/View.ts | 12 +++++++++--- packages/nocodb/src/lib/utils/modelUtils.ts | 18 ++++++++++-------- 6 files changed, 39 insertions(+), 18 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/sidebar/MenuTop.vue b/packages/nc-gui/components/smartsheet/sidebar/MenuTop.vue index a08eed3735..5fe7476271 100644 --- a/packages/nc-gui/components/smartsheet/sidebar/MenuTop.vue +++ b/packages/nc-gui/components/smartsheet/sidebar/MenuTop.vue @@ -216,6 +216,7 @@ function openDeleteDialog(view: ViewType) { const setIcon = async (icon: string, view: ViewType) => { try { + // modify the icon property in meta view.meta = { ...(view.meta || {}), icon, diff --git a/packages/nc-gui/components/smartsheet/sidebar/RenameableMenuItem.vue b/packages/nc-gui/components/smartsheet/sidebar/RenameableMenuItem.vue index 3d5646d57c..3d4cafa757 100644 --- a/packages/nc-gui/components/smartsheet/sidebar/RenameableMenuItem.vue +++ b/packages/nc-gui/components/smartsheet/sidebar/RenameableMenuItem.vue @@ -12,6 +12,8 @@ import { useVModel, } from '#imports' +import { Tooltip } from 'ant-design-vue' + interface Props { view: ViewType onValidate: (view: ViewType) => boolean | string @@ -173,10 +175,14 @@ function onStopEdit() { @dblclick.stop="onDblClick" @click.stop="onClick" > -
+
- + + + + -