diff --git a/packages/web/src/appobj/DatabaseObjectAppObject.svelte b/packages/web/src/appobj/DatabaseObjectAppObject.svelte index 028565f0..ba84a753 100644 --- a/packages/web/src/appobj/DatabaseObjectAppObject.svelte +++ b/packages/web/src/appobj/DatabaseObjectAppObject.svelte @@ -39,6 +39,7 @@ { label: 'Open structure', tab: 'TableStructureTab', + icon: 'img table-structure', }, { label: 'Drop table', @@ -113,6 +114,7 @@ { label: 'Open structure', tab: 'TableStructureTab', + icon: 'img view-structure', }, { label: 'Drop view', @@ -325,7 +327,8 @@ scriptTemplate, { schemaName, pureName, conid, database, objectTypeField }, forceNewTab, - initialData + initialData, + icon ) { const connection = await getConnectionInfo({ conid }); const tooltip = `${getConnectionLabel(connection)}\n${database}\n${fullDisplayName({ @@ -337,7 +340,7 @@ { title: scriptTemplate ? 'Query #' : pureName, tooltip, - icon: scriptTemplate ? 'img sql-file' : databaseObjectIcons[objectTypeField], + icon: icon || (scriptTemplate ? 'img sql-file' : databaseObjectIcons[objectTypeField]), tabComponent: scriptTemplate ? 'QueryTab' : tabComponent, props: { schemaName, @@ -367,6 +370,7 @@ objectTypeField, }, forceNewTab, + null, null ); } @@ -535,7 +539,14 @@ obj.pureName = newName; }); } else { - openDatabaseObjectDetail(menu.tab, menu.scriptTemplate, data, menu.forceNewTab, menu.initialData); + openDatabaseObjectDetail( + menu.tab, + menu.scriptTemplate, + data, + menu.forceNewTab, + menu.initialData, + menu.icon + ); } }, }; diff --git a/packages/web/src/commands/stdCommands.ts b/packages/web/src/commands/stdCommands.ts index d884e657..31e25130 100644 --- a/packages/web/src/commands/stdCommands.ts +++ b/packages/web/src/commands/stdCommands.ts @@ -129,7 +129,7 @@ registerCommand({ openNewTab( { title: 'Table #', - icon: 'img table', + icon: 'img table-structure', tabComponent: 'TableStructureTab', props: { conid: connection._id, diff --git a/packages/web/src/icons/FontIcon.svelte b/packages/web/src/icons/FontIcon.svelte index 2625fc69..86639306 100644 --- a/packages/web/src/icons/FontIcon.svelte +++ b/packages/web/src/icons/FontIcon.svelte @@ -125,6 +125,8 @@ 'img view': 'mdi mdi-table color-icon-magenta', 'img procedure': 'mdi mdi-cog color-icon-blue', 'img function': 'mdi mdi-function-variant', + 'img table-structure': 'mdi mdi-tools color-icon-blue', + 'img view-structure': 'mdi mdi-tools color-icon-magenta', 'img sort-asc': 'mdi mdi-sort-alphabetical-ascending color-icon-green', 'img sort-desc': 'mdi mdi-sort-alphabetical-descending color-icon-green',