mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
create table from database ctx menu
This commit is contained in:
parent
5de231dc1c
commit
a9216eda89
@ -17,6 +17,27 @@
|
||||
});
|
||||
};
|
||||
|
||||
const handleNewTable = () => {
|
||||
const tooltip = `${getConnectionLabel(connection)}\n${name}`;
|
||||
openNewTab(
|
||||
{
|
||||
title: 'Table #',
|
||||
tooltip,
|
||||
icon: 'img table-structure',
|
||||
tabComponent: 'TableStructureTab',
|
||||
props: {
|
||||
conid: connection._id,
|
||||
database: name,
|
||||
},
|
||||
},
|
||||
{
|
||||
editor: {
|
||||
columns: [],
|
||||
},
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
const handleImport = () => {
|
||||
showModal(ImportExportModal, {
|
||||
initialValues: {
|
||||
@ -83,6 +104,8 @@
|
||||
|
||||
return [
|
||||
{ onClick: handleNewQuery, text: 'New query', isNewQuery: true },
|
||||
{ onClick: handleNewTable, text: 'New table' },
|
||||
{ divider: true },
|
||||
{ onClick: handleImport, text: 'Import' },
|
||||
{ onClick: handleExport, text: 'Export' },
|
||||
{ onClick: handleSqlGenerator, text: 'SQL Generator' },
|
||||
|
Loading…
Reference in New Issue
Block a user