mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-17 02:49:01 +01:00
13 lines
336 B
TypeScript
13 lines
336 B
TypeScript
export function selectDriveFile($root: any, multiple) {
|
|
return new Promise((res, rej) => {
|
|
import('../components/drive-window.vue').then(m => m.default).then(dialog => {
|
|
const w = $root.new(dialog, {
|
|
type: 'file',
|
|
multiple
|
|
});
|
|
w.$once('selected', files => {
|
|
res(multiple ? files : files[0]);
|
|
});
|
|
});
|
|
});
|
|
}
|