1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-17 16:18:23 +09:00
MisskeyIO/src/client/scripts/select-drive-file.ts

13 lines
289 B
TypeScript
Raw Normal View History

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