mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 11:33:59 +00:00
structure tabs have different icons
This commit is contained in:
@@ -39,6 +39,7 @@
|
|||||||
{
|
{
|
||||||
label: 'Open structure',
|
label: 'Open structure',
|
||||||
tab: 'TableStructureTab',
|
tab: 'TableStructureTab',
|
||||||
|
icon: 'img table-structure',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Drop table',
|
label: 'Drop table',
|
||||||
@@ -113,6 +114,7 @@
|
|||||||
{
|
{
|
||||||
label: 'Open structure',
|
label: 'Open structure',
|
||||||
tab: 'TableStructureTab',
|
tab: 'TableStructureTab',
|
||||||
|
icon: 'img view-structure',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Drop view',
|
label: 'Drop view',
|
||||||
@@ -325,7 +327,8 @@
|
|||||||
scriptTemplate,
|
scriptTemplate,
|
||||||
{ schemaName, pureName, conid, database, objectTypeField },
|
{ schemaName, pureName, conid, database, objectTypeField },
|
||||||
forceNewTab,
|
forceNewTab,
|
||||||
initialData
|
initialData,
|
||||||
|
icon
|
||||||
) {
|
) {
|
||||||
const connection = await getConnectionInfo({ conid });
|
const connection = await getConnectionInfo({ conid });
|
||||||
const tooltip = `${getConnectionLabel(connection)}\n${database}\n${fullDisplayName({
|
const tooltip = `${getConnectionLabel(connection)}\n${database}\n${fullDisplayName({
|
||||||
@@ -337,7 +340,7 @@
|
|||||||
{
|
{
|
||||||
title: scriptTemplate ? 'Query #' : pureName,
|
title: scriptTemplate ? 'Query #' : pureName,
|
||||||
tooltip,
|
tooltip,
|
||||||
icon: scriptTemplate ? 'img sql-file' : databaseObjectIcons[objectTypeField],
|
icon: icon || (scriptTemplate ? 'img sql-file' : databaseObjectIcons[objectTypeField]),
|
||||||
tabComponent: scriptTemplate ? 'QueryTab' : tabComponent,
|
tabComponent: scriptTemplate ? 'QueryTab' : tabComponent,
|
||||||
props: {
|
props: {
|
||||||
schemaName,
|
schemaName,
|
||||||
@@ -367,6 +370,7 @@
|
|||||||
objectTypeField,
|
objectTypeField,
|
||||||
},
|
},
|
||||||
forceNewTab,
|
forceNewTab,
|
||||||
|
null,
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -535,7 +539,14 @@
|
|||||||
obj.pureName = newName;
|
obj.pureName = newName;
|
||||||
});
|
});
|
||||||
} else {
|
} 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(
|
openNewTab(
|
||||||
{
|
{
|
||||||
title: 'Table #',
|
title: 'Table #',
|
||||||
icon: 'img table',
|
icon: 'img table-structure',
|
||||||
tabComponent: 'TableStructureTab',
|
tabComponent: 'TableStructureTab',
|
||||||
props: {
|
props: {
|
||||||
conid: connection._id,
|
conid: connection._id,
|
||||||
|
|||||||
@@ -125,6 +125,8 @@
|
|||||||
'img view': 'mdi mdi-table color-icon-magenta',
|
'img view': 'mdi mdi-table color-icon-magenta',
|
||||||
'img procedure': 'mdi mdi-cog color-icon-blue',
|
'img procedure': 'mdi mdi-cog color-icon-blue',
|
||||||
'img function': 'mdi mdi-function-variant',
|
'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-asc': 'mdi mdi-sort-alphabetical-ascending color-icon-green',
|
||||||
'img sort-desc': 'mdi mdi-sort-alphabetical-descending color-icon-green',
|
'img sort-desc': 'mdi mdi-sort-alphabetical-descending color-icon-green',
|
||||||
|
|||||||
Reference in New Issue
Block a user