hippofish/src/client/app/mobile/api/choose-drive-folder.ts

18 lines
374 B
TypeScript
Raw Normal View History

2018-02-21 18:00:30 +01:00
import Chooser from '../views/components/drive-folder-chooser.vue';
export default function(opts) {
return new Promise((res, rej) => {
const o = opts || {};
const w = new Chooser({
propsData: {
title: o.title,
initFolder: o.currentFolder
}
}).$mount();
w.$once('selected', folder => {
res(folder);
});
document.body.appendChild(w.$el);
});
}