Improve usability
This commit is contained in:
parent
4c6fb60dd2
commit
6819eb3b4d
11 changed files with 72 additions and 45 deletions
|
|
@ -1,24 +0,0 @@
|
|||
import PostForm from '../views/components/post-form.vue';
|
||||
|
||||
export default (os) => (opts) => {
|
||||
const o = opts || {};
|
||||
|
||||
const app = document.getElementById('app');
|
||||
app.style.display = 'none';
|
||||
|
||||
function recover() {
|
||||
app.style.display = 'block';
|
||||
}
|
||||
|
||||
const vm = new PostForm({
|
||||
parent: os.app,
|
||||
propsData: {
|
||||
reply: o.reply,
|
||||
renote: o.renote
|
||||
}
|
||||
}).$mount();
|
||||
vm.$once('cancel', recover);
|
||||
vm.$once('posted', recover);
|
||||
document.body.appendChild(vm.$el);
|
||||
(vm as any).focus();
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue