From b29189f0c3dddb35cbfa6ff1ebc06ffa933b08b5 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 23 Mar 2023 18:38:21 +0530 Subject: [PATCH] refactor: move all icons to iconMap (WIP) Signed-off-by: Pranav C --- .../components/account/ResetPassword.vue | 4 +- .../nc-gui/components/account/UsersModal.vue | 2 +- packages/nc-gui/components/cell/GeoData.vue | 15 +++-- .../nc-gui/components/cell/MultiSelect.vue | 3 +- .../nc-gui/components/cell/SingleSelect.vue | 3 +- .../components/cell/attachment/Image.vue | 2 +- .../dashboard/settings/DataSources.vue | 2 +- .../dashboard/settings/Metadata.vue | 2 +- .../components/dashboard/settings/Modal.vue | 2 +- .../nc-gui/components/dlg/QuickImport.vue | 6 +- .../nc-gui/components/general/PreviewAs.vue | 2 +- .../nc-gui/components/smartsheet/Gallery.vue | 3 +- .../nc-gui/components/smartsheet/Kanban.vue | 2 +- .../components/smartsheet/Pagination.vue | 4 +- .../smartsheet/column/FormulaOptions.vue | 5 +- .../smartsheet/column/SelectOptions.vue | 3 +- .../smartsheet/expanded-form/Header.vue | 15 ++--- .../smartsheet/expanded-form/index.vue | 5 +- .../components/smartsheet/header/Menu.vue | 12 ++-- .../smartsheet/sidebar/RenameableMenuItem.vue | 6 +- .../sidebar/toolbar/DeleteCache.vue | 4 +- .../sidebar/toolbar/ExportCache.vue | 4 +- .../components/smartsheet/toolbar/Export.vue | 8 ++- .../smartsheet/toolbar/FieldsMenu.vue | 4 +- .../toolbar/KanbanStackEditOrAdd.vue | 5 +- .../smartsheet/toolbar/MappedBy.vue | 3 +- .../smartsheet/toolbar/QrScannerButton.vue | 4 +- .../smartsheet/toolbar/ShareView.vue | 2 +- .../smartsheet/toolbar/StackedBy.vue | 3 +- .../components/tabs/auth/UserManagement.vue | 8 +-- .../tabs/auth/user-management/UsersModal.vue | 2 +- .../nc-gui/components/template/Editor.vue | 26 ++++++--- .../virtual-cell/components/ItemChip.vue | 7 ++- .../components/ListChildItems.vue | 5 +- packages/nc-gui/components/webhook/Editor.vue | 7 ++- packages/nc-gui/layouts/base.vue | 4 +- .../pages/[projectType]/[projectId]/index.vue | 3 +- .../form/[viewId]/index/index.vue | 4 +- .../form/[viewId]/index/survey.vue | 9 ++- packages/nc-gui/pages/forgot-password.vue | 4 +- .../nc-gui/pages/index/index/[projectId].vue | 3 +- .../pages/index/index/create-external.vue | 2 +- packages/nc-gui/pages/index/index/create.vue | 3 +- packages/nc-gui/pages/index/index/index.vue | 10 +++- packages/nc-gui/pages/index/index/user.vue | 6 +- packages/nc-gui/pages/projects/index.vue | 3 +- .../nc-gui/pages/projects/index/index.vue | 9 +-- packages/nc-gui/pages/projects/index/list.vue | 7 ++- packages/nc-gui/pages/signin.vue | 15 ++++- packages/nc-gui/utils/iconUtils.ts | 57 ++++++++++++++++++- 50 files changed, 223 insertions(+), 106 deletions(-) diff --git a/packages/nc-gui/components/account/ResetPassword.vue b/packages/nc-gui/components/account/ResetPassword.vue index dc3d17fb55..af0c8c3f33 100644 --- a/packages/nc-gui/components/account/ResetPassword.vue +++ b/packages/nc-gui/components/account/ResetPassword.vue @@ -1,5 +1,5 @@ + - +
diff --git a/packages/nc-gui/components/smartsheet/toolbar/KanbanStackEditOrAdd.vue b/packages/nc-gui/components/smartsheet/toolbar/KanbanStackEditOrAdd.vue index 7a3f3a35a4..bfc7ea706c 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/KanbanStackEditOrAdd.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/KanbanStackEditOrAdd.vue @@ -3,6 +3,7 @@ import { IsKanbanInj, IsLockedInj, IsPublicInj, + iconMap, inject, provide, ref, @@ -44,11 +45,11 @@ provide(IsKanbanInj, ref(true)) :disabled="isLocked" >
- + {{ $t('activity.kanban.addOrEditStack') }} - +
diff --git a/packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue b/packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue index cc1b016848..c005c576e9 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue @@ -9,6 +9,7 @@ import { MetaInj, ReloadViewDataHookInj, computed, + iconMap, inject, ref, useViewColumns, @@ -84,7 +85,7 @@ const handleChange = () => { {{ $t('activity.map.mappedBy') }} {{ geoDataFieldColumn?.title }} - + diff --git a/packages/nc-gui/components/smartsheet/toolbar/QrScannerButton.vue b/packages/nc-gui/components/smartsheet/toolbar/QrScannerButton.vue index 25f8a1729f..3bba7e71dc 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/QrScannerButton.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/QrScannerButton.vue @@ -4,7 +4,7 @@ import { ref } from 'vue' import { StreamBarcodeReader } from 'vue-barcode-reader' import type { ColumnType } from 'nocodb-sdk' import { UITypes } from 'nocodb-sdk' -import { NOCO, storeToRefs } from '#imports' +import { NOCO, iconMap, storeToRefs } from '#imports' const meta = inject(MetaInj, ref()) @@ -125,7 +125,7 @@ const onDecode = async (codeValue: string) => {
- + {{ $t('activity.findRowByCodeScan') }}
diff --git a/packages/nc-gui/components/smartsheet/toolbar/ShareView.vue b/packages/nc-gui/components/smartsheet/toolbar/ShareView.vue index f2c799f589..534dc1daa9 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/ShareView.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/ShareView.vue @@ -288,7 +288,7 @@ const copyIframeCode = async () => { class="flex gap-1 items-center pb-1 text-gray-500 cursor-pointer font-weight-medium mb-2 mt-4 pl-1" @click="copyIframeCode" > - + Embed this view in your site
diff --git a/packages/nc-gui/components/smartsheet/toolbar/StackedBy.vue b/packages/nc-gui/components/smartsheet/toolbar/StackedBy.vue index 60ce79502f..fc9079547a 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/StackedBy.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/StackedBy.vue @@ -9,6 +9,7 @@ import { MetaInj, ReloadViewDataHookInj, computed, + iconMap, inject, ref, useKanbanViewStoreOrThrow, @@ -94,7 +95,7 @@ const handleChange = () => { {{ $t('activity.kanban.stackedBy') }} {{ groupingField }} - + diff --git a/packages/nc-gui/components/tabs/auth/UserManagement.vue b/packages/nc-gui/components/tabs/auth/UserManagement.vue index 366ecba0b8..1dd5b4c037 100644 --- a/packages/nc-gui/components/tabs/auth/UserManagement.vue +++ b/packages/nc-gui/components/tabs/auth/UserManagement.vue @@ -245,7 +245,7 @@ const isSuperAdmin = (user: { main_roles?: string }) => { @click="onInvite" >
- +
{{ $t('activity.inviteTeam') }}
@@ -255,12 +255,12 @@ const isSuperAdmin = (user: { main_roles?: string }) => {
- +
{{ $t('labels.email') }}
- +
{{ $t('objects.role') }}
@@ -350,7 +350,7 @@ const isSuperAdmin = (user: { main_roles?: string }) => {
- +
{{ $t('activity.resendInvite') }}
diff --git a/packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue b/packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue index cc83012225..48386e9b86 100644 --- a/packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue +++ b/packages/nc-gui/components/tabs/auth/user-management/UsersModal.vue @@ -192,7 +192,7 @@ watch( - + @@ -727,7 +732,7 @@ function isSelectDisabled(uidt: string, disableSelect = false) { /> - + {{ table.table_name }} @@ -738,7 +743,12 @@ function isSelectDisabled(uidt: string, disableSelect = false) { Delete Table - +
- +
@@ -850,7 +860,7 @@ function isSelectDisabled(uidt: string, disableSelect = false) {
- +
@@ -863,7 +873,7 @@ function isSelectDisabled(uidt: string, disableSelect = false) {
- +
@@ -876,7 +886,7 @@ function isSelectDisabled(uidt: string, disableSelect = false) {
- +
diff --git a/packages/nc-gui/components/virtual-cell/components/ItemChip.vue b/packages/nc-gui/components/virtual-cell/components/ItemChip.vue index 6665dd9187..1202bd19a3 100644 --- a/packages/nc-gui/components/virtual-cell/components/ItemChip.vue +++ b/packages/nc-gui/components/virtual-cell/components/ItemChip.vue @@ -4,6 +4,7 @@ import { IsFormInj, IsLockedInj, ReadonlyInj, + iconMap, inject, ref, useExpandedFormDetached, @@ -62,7 +63,11 @@ export default { {{ value }}
- +
diff --git a/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue b/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue index 474f490deb..a06d8ed36f 100644 --- a/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue +++ b/packages/nc-gui/components/virtual-cell/components/ListChildItems.vue @@ -130,7 +130,7 @@ const onClick = (row: Row) => { @click="emit('attachRecord')" >
- + Link to ' {{ relatedTableMeta.title }}' @@ -153,7 +153,8 @@ const onClick = (row: Row) => {
- {
- + {{ $t('general.save') }}
@@ -520,9 +521,9 @@ onMounted(async () => { >
- + - + diff --git a/packages/nc-gui/layouts/base.vue b/packages/nc-gui/layouts/base.vue index 61465fe8da..16f41326e9 100644 --- a/packages/nc-gui/layouts/base.vue +++ b/packages/nc-gui/layouts/base.vue @@ -89,7 +89,7 @@ hooks.hook('page:finish', () => { -   +  
Account
{{ email }}
@@ -115,7 +115,7 @@ hooks.hook('page:finish', () => {
-   +   {{ $t('general.signOut') }} diff --git a/packages/nc-gui/pages/[projectType]/[projectId]/index.vue b/packages/nc-gui/pages/[projectType]/[projectId]/index.vue index f8d23b6dc6..4ccd03274e 100644 --- a/packages/nc-gui/pages/[projectType]/[projectId]/index.vue +++ b/packages/nc-gui/pages/[projectType]/[projectId]/index.vue @@ -316,8 +316,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
{{ project.title }}
- - +