mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-22 16:24:17 +02:00
整理した
This commit is contained in:
18
src/client/app/mobile/api/choose-drive-file.ts
Normal file
18
src/client/app/mobile/api/choose-drive-file.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import Chooser from '../views/components/drive-file-chooser.vue';
|
||||
|
||||
export default function(opts) {
|
||||
return new Promise((res, rej) => {
|
||||
const o = opts || {};
|
||||
const w = new Chooser({
|
||||
propsData: {
|
||||
title: o.title,
|
||||
multiple: o.multiple,
|
||||
initFolder: o.currentFolder
|
||||
}
|
||||
}).$mount();
|
||||
w.$once('selected', file => {
|
||||
res(file);
|
||||
});
|
||||
document.body.appendChild(w.$el);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user