From 5a991ae994bad5c28044a17d464b6e5988158cb4 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Sat, 7 Oct 2023 10:08:13 +0000 Subject: [PATCH] fix(nc-gui): Data sources table now makes button icon only on small screen and fixed issue with base logo --- .../dashboard/TreeView/ProjectNode.vue | 4 +- .../dashboard/settings/DataSources.vue | 92 ++++++++++++------- .../nc-gui/components/general/BaseLogo.vue | 4 +- .../nc-gui/components/project/AllTables.vue | 4 +- 4 files changed, 66 insertions(+), 38 deletions(-) diff --git a/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue b/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue index bc2c18e4fc..5ca70d8f5b 100644 --- a/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue +++ b/packages/nc-gui/components/dashboard/TreeView/ProjectNode.vue @@ -657,7 +657,7 @@ const projectDelete = () => { class="source-context flex items-center gap-2 text-gray-800 nc-sidebar-node-title" @contextmenu="setMenuContext('source', source)" > - + {{ $t('general.default') }}
{ class="source-context flex flex-grow items-center gap-1.75 text-gray-800 min-w-1/20 max-w-full" @contextmenu="setMenuContext('source', source)" > - +
-
- {{ $t('tooltip.metaSync') }} +
+ {{ $t('tooltip.metaSync') }} +
-
- +
- {{ $t('title.relations') }} +
+ {{ $t('title.relations') }} +
-
- +
- {{ $t('labels.uiAcl') }} +
+ {{ $t('labels.uiAcl') }} +
-
- +
- {{ $t('title.audit') }} +
+ {{ $t('title.audit') }} +
-
+
- - +
@@ -419,12 +432,12 @@ const isEditBaseModalOpen = computed({ -
+
-
-
+ {{ source.is_meta || source.is_local ? $t('general.base') : source.alias }} -
+
@@ -437,56 +450,67 @@ const isEditBaseModalOpen = computed({
-
- {{ $t('title.relations') }} +
+ {{ $t('title.relations') }} +
-
- +
- {{ $t('labels.uiAcl') }} +
+ {{ $t('labels.uiAcl') }} +
-
- +
- {{ $t('tooltip.metaSync') }} +
+ {{ $t('tooltip.metaSync') }} +
-
+
- - - + - +
@@ -550,7 +574,7 @@ const isEditBaseModalOpen = computed({ diff --git a/packages/nc-gui/components/general/BaseLogo.vue b/packages/nc-gui/components/general/BaseLogo.vue index 4655de0625..1720d12083 100644 --- a/packages/nc-gui/components/general/BaseLogo.vue +++ b/packages/nc-gui/components/general/BaseLogo.vue @@ -6,10 +6,10 @@ import SimpleIconsMicrosoftsqlserver from '~icons/simple-icons/microsoftsqlserve import LogosSnowflakeIcon from '~icons/logos/snowflake-icon' import MdiDatabaseOutline from '~icons/mdi/database-outline' -const { baseType } = defineProps<{ baseType?: string }>() +const { sourceType } = defineProps<{ sourceType?: string }>() const baseIcon = computed(() => { - switch (baseType) { + switch (sourceType) { case ClientType.MYSQL: return LogosMysqlIcon case ClientType.PG: diff --git a/packages/nc-gui/components/project/AllTables.vue b/packages/nc-gui/components/project/AllTables.vue index 4affed1129..abd2d4cd13 100644 --- a/packages/nc-gui/components/project/AllTables.vue +++ b/packages/nc-gui/components/project/AllTables.vue @@ -147,8 +147,8 @@ const onCreateBaseClick = () => {
-
-
- +
+ {{ sources.get(table.source_id!)?.alias }}