Better post form
This commit is contained in:
parent
70ac668474
commit
5209a584a2
11 changed files with 184 additions and 83 deletions
23
src/client/app/mobile/api/post.ts
Normal file
23
src/client/app/mobile/api/post.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import PostForm from '../views/components/post-form-dialog.vue';
|
||||
|
||||
export default (os) => (opts) => {
|
||||
const o = opts || {};
|
||||
|
||||
document.documentElement.style.overflow = 'hidden';
|
||||
|
||||
function recover() {
|
||||
document.documentElement.style.overflow = 'auto';
|
||||
}
|
||||
|
||||
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