mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 14:46:01 +00:00
quick export - added to grids
This commit is contained in:
@@ -38,7 +38,7 @@ function doExtractMenuItems(menu, res) {
|
||||
for (const item of menu) {
|
||||
doExtractMenuItems(item, res);
|
||||
}
|
||||
} else if (_.isPlainObject(menu)) {
|
||||
} else if (_.isPlainObject(menu) && !menu._skip) {
|
||||
res.push(menu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import { ExtensionsDirectory, QuickExportDefinition } from 'dbgate-types';
|
||||
import getElectron from './getElectron';
|
||||
|
||||
export default function createQuickExportMenu(
|
||||
extensions: ExtensionsDirectory,
|
||||
handler: (fmt: QuickExportDefinition) => Function
|
||||
) {
|
||||
const electron = getElectron();
|
||||
if (!electron) {
|
||||
return { _skip: true };
|
||||
}
|
||||
return {
|
||||
text: 'Quick export',
|
||||
submenu: extensions.quickExports.map(fmt => ({
|
||||
|
||||
Reference in New Issue
Block a user