mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-13 14:53:08 +02:00
24 lines
486 B
TypeScript
24 lines
486 B
TypeScript
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('note', recover);
|
|
document.body.appendChild(vm.$el);
|
|
(vm as any).focus();
|
|
};
|