export menu changed

This commit is contained in:
SPRINX0\prochazka 2024-09-17 16:56:41 +02:00
parent 677f83cc4b
commit 336929ff3f
2 changed files with 7 additions and 7 deletions

View File

@ -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' },

View File

@ -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,
},
];
}