mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-14 21:43:09 +02:00
15 lines
318 B
TypeScript
15 lines
318 B
TypeScript
|
|
||
|
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);
|
||
|
};
|