mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 08:16:00 +00:00
15 lines
531 B
TypeScript
15 lines
531 B
TypeScript
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 });
|
|
}
|