mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 17:46:00 +00:00
Merge branch 'master' into feature/duckdb-2
This commit is contained in:
@@ -47,6 +47,7 @@ import newTable from '../tableeditor/newTable';
|
||||
import { isProApp } from '../utility/proTools';
|
||||
import { openWebLink } from '../utility/simpleTools';
|
||||
import { _t } from '../translations';
|
||||
import ExportImportConnectionsModal from '../modals/ExportImportConnectionsModal.svelte';
|
||||
|
||||
// function themeCommand(theme: ThemeDefinition) {
|
||||
// return {
|
||||
@@ -530,6 +531,44 @@ registerCommand({
|
||||
},
|
||||
});
|
||||
|
||||
registerCommand({
|
||||
id: 'app.exportConnections',
|
||||
category: 'Settings',
|
||||
name: 'Export connections',
|
||||
testEnabled: () => getElectron() != null,
|
||||
onClick: () => {
|
||||
showModal(ExportImportConnectionsModal, {
|
||||
mode: 'export',
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
registerCommand({
|
||||
id: 'app.importConnections',
|
||||
category: 'Settings',
|
||||
name: 'Import connections',
|
||||
testEnabled: () => getElectron() != null,
|
||||
onClick: async () => {
|
||||
const files = await electron.showOpenDialog({
|
||||
properties: ['showHiddenFiles', 'openFile'],
|
||||
filters: [
|
||||
{
|
||||
name: `All supported files`,
|
||||
extensions: ['zip'],
|
||||
},
|
||||
{ name: `ZIP files`, extensions: ['zip'] },
|
||||
],
|
||||
});
|
||||
|
||||
if (files?.length > 0) {
|
||||
showModal(ExportImportConnectionsModal, {
|
||||
mode: 'import',
|
||||
uploadedFilePath: files[0],
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
registerCommand({
|
||||
id: 'file.import',
|
||||
category: 'File',
|
||||
|
||||
Reference in New Issue
Block a user