1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-29 05:58:31 +09:00
misskey/src/client/app/desktop/api/choose-drive-folder.ts

18 lines
429 B
TypeScript
Raw Normal View History

2018-02-18 12:35:18 +09:00
import MkChooseFolderFromDriveWindow from '../views/components/choose-folder-from-drive-window.vue';
2018-02-17 18:14:23 +09:00
2018-02-18 12:35:18 +09:00
export default function(opts) {
2018-02-17 18:14:23 +09:00
return new Promise((res, rej) => {
const o = opts || {};
const w = new MkChooseFolderFromDriveWindow({
propsData: {
2018-02-18 12:35:18 +09:00
title: o.title,
initFolder: o.currentFolder
2018-02-17 18:14:23 +09:00
}
}).$mount();
w.$once('selected', folder => {
res(folder);
});
document.body.appendChild(w.$el);
});
}