mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 09:36:01 +00:00
quick export - current archive
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { QuickExportDefinition } from 'dbgate-types';
|
||||
import { getExtensions } from '../stores';
|
||||
import { currentArchive, getCurrentArchive, getExtensions } from '../stores';
|
||||
|
||||
export function createQuickExportMenuItems(handler: (fmt: QuickExportDefinition) => Function, advancedExportMenuItem) {
|
||||
const extensions = getExtensions();
|
||||
@@ -9,6 +9,22 @@ export function createQuickExportMenuItems(handler: (fmt: QuickExportDefinition)
|
||||
onClick: handler(fmt),
|
||||
})),
|
||||
{ divider: true },
|
||||
{
|
||||
text: 'Current archive',
|
||||
onClick: handler({
|
||||
extension: 'jsonl',
|
||||
label: 'Current archive',
|
||||
noFilenameDependency: true,
|
||||
createWriter: (fileName, dataName) => ({
|
||||
functionName: 'archiveWriter',
|
||||
props: {
|
||||
fileName: dataName,
|
||||
folderName: getCurrentArchive(),
|
||||
},
|
||||
}),
|
||||
}),
|
||||
},
|
||||
{ divider: true },
|
||||
{
|
||||
text: 'More...',
|
||||
...advancedExportMenuItem,
|
||||
|
||||
Reference in New Issue
Block a user