mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
export menu changed
This commit is contained in:
parent
677f83cc4b
commit
336929ff3f
@ -313,8 +313,8 @@
|
||||
{ divider: true },
|
||||
isSqlOrDoc &&
|
||||
!connection.isReadOnly &&
|
||||
hasPermission(`dbops/import`) && { onClick: handleImport, text: 'Import wizard' },
|
||||
isSqlOrDoc && hasPermission(`dbops/export`) && { onClick: handleExport, text: 'Export wizard' },
|
||||
hasPermission(`dbops/import`) && { onClick: handleImport, text: 'Import' },
|
||||
isSqlOrDoc && hasPermission(`dbops/export`) && { onClick: handleExport, text: 'Export' },
|
||||
driver?.databaseEngineTypes?.includes('sql') &&
|
||||
hasPermission(`dbops/sql-dump/import`) &&
|
||||
!connection.isReadOnly && { onClick: handleSqlRestore, text: 'Restore/import SQL dump' },
|
||||
|
@ -5,6 +5,11 @@ import hasPermission from './hasPermission';
|
||||
export function createQuickExportMenuItems(handler: (fmt: QuickExportDefinition) => Function, advancedExportMenuItem) {
|
||||
const extensions = getExtensions();
|
||||
return [
|
||||
{
|
||||
text: 'Export advanced...',
|
||||
...advancedExportMenuItem,
|
||||
},
|
||||
{ divider: true },
|
||||
...extensions.quickExports.map(fmt => ({
|
||||
text: fmt.label,
|
||||
onClick: handler(fmt),
|
||||
@ -25,11 +30,6 @@ export function createQuickExportMenuItems(handler: (fmt: QuickExportDefinition)
|
||||
}),
|
||||
}),
|
||||
},
|
||||
{ divider: true },
|
||||
{
|
||||
text: 'More...',
|
||||
...advancedExportMenuItem,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user