mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-29 18:16:44 -06:00
13 lines
289 B
TypeScript
13 lines
289 B
TypeScript
|
import DriveWindow from '../components/drive-window.vue';
|
||
|
|
||
|
export function selectDriveFile($root: any, multiple) {
|
||
|
return new Promise((res, rej) => {
|
||
|
const w = $root.new(DriveWindow, {
|
||
|
multiple
|
||
|
});
|
||
|
w.$once('selected', files => {
|
||
|
res(multiple ? files : files[0]);
|
||
|
});
|
||
|
});
|
||
|
}
|