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