mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 23:53:57 +00:00
toggle left panel command + menu
This commit is contained in:
@@ -28,6 +28,15 @@
|
|||||||
onClick: () => getCurrentEditor().switchToView('table'),
|
onClick: () => getCurrentEditor().switchToView('table'),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
registerCommand({
|
||||||
|
id: 'dataGrid.toggleLeftPanel',
|
||||||
|
category: 'Data grid',
|
||||||
|
name: 'Toggle left panel',
|
||||||
|
keyText: 'Ctrl+L',
|
||||||
|
testEnabled: () => getCurrentEditor() != null,
|
||||||
|
onClick: () => getCurrentEditor().toggleLeftPanel(),
|
||||||
|
});
|
||||||
|
|
||||||
function extractMacroValuesForMacro(macroValues, macro) {
|
function extractMacroValuesForMacro(macroValues, macro) {
|
||||||
// return {};
|
// return {};
|
||||||
if (!macro) return {};
|
if (!macro) return {};
|
||||||
@@ -121,10 +130,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function toggleLeftPanel() {
|
||||||
|
collapsedLeftColumnStore.update(x => !x);
|
||||||
|
}
|
||||||
|
|
||||||
registerMenu(
|
registerMenu(
|
||||||
{ command: 'dataGrid.switchToForm', tag: 'switch', hideDisabled: true },
|
{ command: 'dataGrid.switchToForm', tag: 'switch', hideDisabled: true },
|
||||||
{ command: 'dataGrid.switchToTable', tag: 'switch', hideDisabled: true },
|
{ command: 'dataGrid.switchToTable', tag: 'switch', hideDisabled: true },
|
||||||
{ command: 'dataGrid.switchToJson', tag: 'switch', hideDisabled: true }
|
{ command: 'dataGrid.switchToJson', tag: 'switch', hideDisabled: true },
|
||||||
|
{ command: 'dataGrid.toggleLeftPanel', tag: 'switch' }
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user