mirror of
https://github.com/dbgate/dbgate
synced 2024-11-23 08:51:02 +00:00
structure tabs have different icons
This commit is contained in:
parent
4d7339d085
commit
13030defc1
@ -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
|
||||
);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -129,7 +129,7 @@ registerCommand({
|
||||
openNewTab(
|
||||
{
|
||||
title: 'Table #',
|
||||
icon: 'img table',
|
||||
icon: 'img table-structure',
|
||||
tabComponent: 'TableStructureTab',
|
||||
props: {
|
||||
conid: connection._id,
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user