mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-14 12:23:08 +02:00
14 lines
348 B
TypeScript
14 lines
348 B
TypeScript
|
import DriveWindow from '../components/drive-window.vue';
|
||
|
|
||
|
export function selectDriveFolder($root: any, multiple) {
|
||
|
return new Promise((res, rej) => {
|
||
|
const w = $root.new(DriveWindow, {
|
||
|
type: 'folder',
|
||
|
multiple
|
||
|
});
|
||
|
w.$once('selected', folders => {
|
||
|
res(multiple ? folders : (folders.length === 0 ? null : folders[0]));
|
||
|
});
|
||
|
});
|
||
|
}
|