mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 17:53:59 +00:00
export menu changed
This commit is contained in:
@@ -313,8 +313,8 @@
|
|||||||
{ divider: true },
|
{ divider: true },
|
||||||
isSqlOrDoc &&
|
isSqlOrDoc &&
|
||||||
!connection.isReadOnly &&
|
!connection.isReadOnly &&
|
||||||
hasPermission(`dbops/import`) && { onClick: handleImport, text: 'Import wizard' },
|
hasPermission(`dbops/import`) && { onClick: handleImport, text: 'Import' },
|
||||||
isSqlOrDoc && hasPermission(`dbops/export`) && { onClick: handleExport, text: 'Export wizard' },
|
isSqlOrDoc && hasPermission(`dbops/export`) && { onClick: handleExport, text: 'Export' },
|
||||||
driver?.databaseEngineTypes?.includes('sql') &&
|
driver?.databaseEngineTypes?.includes('sql') &&
|
||||||
hasPermission(`dbops/sql-dump/import`) &&
|
hasPermission(`dbops/sql-dump/import`) &&
|
||||||
!connection.isReadOnly && { onClick: handleSqlRestore, text: 'Restore/import SQL dump' },
|
!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) {
|
export function createQuickExportMenuItems(handler: (fmt: QuickExportDefinition) => Function, advancedExportMenuItem) {
|
||||||
const extensions = getExtensions();
|
const extensions = getExtensions();
|
||||||
return [
|
return [
|
||||||
|
{
|
||||||
|
text: 'Export advanced...',
|
||||||
|
...advancedExportMenuItem,
|
||||||
|
},
|
||||||
|
{ divider: true },
|
||||||
...extensions.quickExports.map(fmt => ({
|
...extensions.quickExports.map(fmt => ({
|
||||||
text: fmt.label,
|
text: fmt.label,
|
||||||
onClick: handler(fmt),
|
onClick: handler(fmt),
|
||||||
@@ -25,11 +30,6 @@ export function createQuickExportMenuItems(handler: (fmt: QuickExportDefinition)
|
|||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{ divider: true },
|
|
||||||
{
|
|
||||||
text: 'More...',
|
|
||||||
...advancedExportMenuItem,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user