2020-01-29 20:37:25 +01:00
|
|
|
export function selectDriveFile($root: any, multiple) {
|
|
|
|
return new Promise((res, rej) => {
|
2020-04-22 12:36:28 +02:00
|
|
|
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]);
|
|
|
|
});
|
2020-01-29 20:37:25 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|