misskey/src/web/app/mobile/api/post.ts

15 lines
318 B
TypeScript
Raw Normal View History

2018-02-21 18:00:30 +01:00
export default opts => {
const app = document.getElementById('app');
app.style.display = 'none';
function recover() {
app.style.display = 'block';
}
const form = riot.mount(document.body.appendChild(document.createElement('mk-post-form')), opts)[0];
form
.on('cancel', recover)
.on('post', recover);
};