mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
new diagram, new query design added to menu
This commit is contained in:
parent
8f110355c4
commit
153cba3779
@ -6,6 +6,8 @@ module.exports = ({ editMenu }) => [
|
||||
{ command: 'new.sqliteDatabase', hideDisabled: true },
|
||||
{ divider: true },
|
||||
{ command: 'new.query', hideDisabled: true },
|
||||
{ command: 'new.queryDesign', hideDisabled: true },
|
||||
{ command: 'new.diagram', hideDisabled: true },
|
||||
{ command: 'new.freetable', hideDisabled: true },
|
||||
{ command: 'new.shell', hideDisabled: true },
|
||||
{ command: 'new.jsonl', hideDisabled: true },
|
||||
|
@ -6,7 +6,7 @@ import SettingsModal from '../settings/SettingsModal.svelte';
|
||||
import ImportExportModal from '../modals/ImportExportModal.svelte';
|
||||
import SqlGeneratorModal from '../modals/SqlGeneratorModal.svelte';
|
||||
import { showModal } from '../modals/modalTools';
|
||||
import newQuery from '../query/newQuery';
|
||||
import newQuery, { newDiagram, newQueryDesign } from '../query/newQuery';
|
||||
import saveTabFile from '../utility/saveTabFile';
|
||||
import openNewTab from '../utility/openNewTab';
|
||||
import getElectron from '../utility/getElectron';
|
||||
@ -120,6 +120,24 @@ registerCommand({
|
||||
},
|
||||
});
|
||||
|
||||
registerCommand({
|
||||
id: 'new.queryDesign',
|
||||
category: 'New',
|
||||
icon: 'img query-design',
|
||||
name: 'Query design',
|
||||
menuName: 'New query design',
|
||||
onClick: () => newQueryDesign(),
|
||||
});
|
||||
|
||||
registerCommand({
|
||||
id: 'new.diagram',
|
||||
category: 'New',
|
||||
icon: 'img diagram',
|
||||
name: 'ER Diagram',
|
||||
menuName: 'New ER diagram',
|
||||
onClick: () => newDiagram(),
|
||||
});
|
||||
|
||||
registerCommand({
|
||||
id: 'new.archiveFolder',
|
||||
category: 'New',
|
||||
|
@ -36,3 +36,7 @@ export default function newQuery({
|
||||
export function newQueryDesign() {
|
||||
return newQuery({ tabComponent: 'QueryDesignTab', icon: 'img query-design' });
|
||||
}
|
||||
|
||||
export function newDiagram() {
|
||||
return newQuery({ tabComponent: 'DiagramTab', icon: 'img diagram', title: 'Diagram #' });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user