archive folder supports links

This commit is contained in:
Jan Prochazka
2021-10-14 19:51:46 +02:00
parent 8f54a6b03d
commit 2e196178ab
12 changed files with 74 additions and 22 deletions

View 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 });
}