mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 05:03:57 +00:00
sql generator ctx menu on database
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import ImportExportModal from '../modals/ImportExportModal.svelte';
|
import ImportExportModal from '../modals/ImportExportModal.svelte';
|
||||||
import { showModal } from '../modals/modalTools';
|
import { showModal } from '../modals/modalTools';
|
||||||
|
import SqlGeneratorModal from '../modals/SqlGeneratorModal.svelte';
|
||||||
import { getDefaultFileFormat } from '../plugins/fileformats';
|
import { getDefaultFileFormat } from '../plugins/fileformats';
|
||||||
import { currentDatabase, extensions } from '../stores';
|
import { currentDatabase, extensions } from '../stores';
|
||||||
import openNewTab from '../utility/openNewTab';
|
import openNewTab from '../utility/openNewTab';
|
||||||
@@ -53,11 +54,21 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleSqlGenerator = () => {
|
||||||
|
const { connection, name } = data;
|
||||||
|
|
||||||
|
showModal(SqlGeneratorModal, {
|
||||||
|
conid: connection._id,
|
||||||
|
database: name,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
function createMenu() {
|
function createMenu() {
|
||||||
return [
|
return [
|
||||||
{ onClick: handleNewQuery, text: 'New query' },
|
{ onClick: handleNewQuery, text: 'New query' },
|
||||||
{ onClick: handleImport, text: 'Import' },
|
{ onClick: handleImport, text: 'Import' },
|
||||||
{ onClick: handleExport, text: 'Export' },
|
{ onClick: handleExport, text: 'Export' },
|
||||||
|
{ onClick: handleSqlGenerator, text: 'SQL Generator' },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user