15
src/web/app/mobile/scripts/open-post-form.js
Normal file
15
src/web/app/mobile/scripts/open-post-form.js
Normal file
@ -0,0 +1,15 @@
|
||||
import * as riot from 'riot';
|
||||
|
||||
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);
|
||||
};
|
@ -1,11 +0,0 @@
|
||||
const stream = require('../../common/scripts/stream');
|
||||
const riot = require('riot');
|
||||
|
||||
module.exports = me => {
|
||||
const s = stream(me);
|
||||
riot.mixin('stream', {
|
||||
stream: s.event,
|
||||
getStreamState: s.getState,
|
||||
streamStateEv: s.stateEv
|
||||
});
|
||||
};
|
5
src/web/app/mobile/scripts/ui-event.js
Normal file
5
src/web/app/mobile/scripts/ui-event.js
Normal file
@ -0,0 +1,5 @@
|
||||
import * as riot from 'riot';
|
||||
|
||||
const ev = riot.observable();
|
||||
|
||||
export default ev;
|
@ -1,7 +0,0 @@
|
||||
const riot = require('riot');
|
||||
|
||||
const ui = riot.observable();
|
||||
|
||||
riot.mixin('ui', {
|
||||
ui: ui
|
||||
});
|
Reference in New Issue
Block a user