mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 17:06:01 +00:00
archive folder supports links
This commit is contained in:
14
packages/web/src/utility/openArchiveFolder.ts
Normal file
14
packages/web/src/utility/openArchiveFolder.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { get } from 'svelte/store';
|
||||
import getElectron from './getElectron';
|
||||
import { extensions } from '../stores';
|
||||
import axiosInstance from '../utility/axiosInstance';
|
||||
|
||||
export function openArchiveFolder() {
|
||||
const electron = getElectron();
|
||||
const ext = get(extensions);
|
||||
const filePaths = electron.remote.dialog.showOpenDialogSync(electron.remote.getCurrentWindow(), {
|
||||
properties: ['openDirectory'],
|
||||
});
|
||||
const linkedFolder = filePaths && filePaths[0];
|
||||
axiosInstance.post('archive/create-link', { linkedFolder });
|
||||
}
|
||||
Reference in New Issue
Block a user