From b6a6bbee5f39f6a5f7f09bc51ca87ba82fcacc60 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 12 Nov 2024 06:06:48 +0000 Subject: [PATCH] fix: minor ui corrections --- .../dashboard/TreeView/ViewsNode.vue | 9 +++-- .../nc-gui/components/dlg/ReAssign/index.vue | 7 +++- .../smartsheet/toolbar/LockType.vue | 33 +++++-------------- packages/nc-gui/utils/viewUtils.ts | 21 ++++++++++++ 4 files changed, 42 insertions(+), 28 deletions(-) diff --git a/packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue b/packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue index 5dc062272d..be65d3c07a 100644 --- a/packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue +++ b/packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue @@ -1,5 +1,5 @@ @@ -58,10 +39,14 @@ const selectedView = inject(ActiveViewInj) -
+
{{ $t(types[type].subtitle) }}
diff --git a/packages/nc-gui/utils/viewUtils.ts b/packages/nc-gui/utils/viewUtils.ts index d928d6c7dd..737ab2f8e7 100644 --- a/packages/nc-gui/utils/viewUtils.ts +++ b/packages/nc-gui/utils/viewUtils.ts @@ -1,6 +1,9 @@ import { ViewTypes } from 'nocodb-sdk' import { iconMap } from './iconUtils' import type { Language } from '~/lib/types' +import UsersIcon from '~icons/nc-icons/users' +import LockIcon from '~icons/nc-icons/lock' +import PersonalIcon from '~icons/nc-icons/personal' export const viewIcons: Record = { [ViewTypes.GRID]: { icon: iconMap.grid, color: '#36BFFF' }, @@ -43,3 +46,21 @@ export const getViewIcon = (key?: string | number) => { export function applyNonSelectable() { document.body.classList.add('non-selectable') } + +export const viewLockIcons = { + [LockType.Personal]: { + title: 'title.personal', + icon: PersonalIcon, + subtitle: 'msg.info.personalView', + }, + [LockType.Collaborative]: { + title: 'title.collaborative', + icon: UsersIcon, + subtitle: 'msg.info.collabView', + }, + [LockType.Locked]: { + title: 'title.locked', + icon: LockIcon, + subtitle: 'msg.info.lockedView', + }, +}