This commit is contained in:
syuilo
2017-02-18 08:37:30 +09:00
parent bb507d0be1
commit d9e90e97f8
3 changed files with 24 additions and 20 deletions

View File

@@ -0,0 +1,23 @@
const riot = require('riot');
module.exports = me => {
if (me) {
require('./scripts/stream.ls')(me);
}
require('./scripts/ui.ls');
riot.mixin('open-post-form', {
openPostForm: opts => {
const app = document.getElementById('app');
app.style.display = 'none';
const form = riot.mount(document.body.appendChild(document.createElement('mk-post-form')), opts)[0];
function recover() {
app.style.display = 'block';
}
form
.on('cancel', recover)
.on('post', recover);
}
});
};