33 lines
899 B
JavaScript
33 lines
899 B
JavaScript
let m = require('mithril')
|
|
let post = require('../models/post')
|
|
let listAdmin = require('./listAdmin')
|
|
let secondaryNav = require('./secondaryNav')
|
|
|
|
var showPost = {
|
|
interval: 10000,
|
|
oninit: function(vnode) {
|
|
post.curStatus = vnode.attrs.status
|
|
post.loadList()
|
|
window.intv = setInterval(function() {
|
|
post.loadList()
|
|
}, showPost.interval)
|
|
},
|
|
view: function() {
|
|
return m('main.documentation', m('#nouser', {
|
|
style: 'text-align:left;width:100%'
|
|
}, m('div', {
|
|
style: 'background:#FFF;text-align:left;width:100%;padding:10vh 0 0;'
|
|
}, [
|
|
m('#secondaryNav', m(secondaryNav)),
|
|
m('#mit', {
|
|
style: 'padding: 0 .6em'
|
|
}, m(listAdmin))
|
|
])))
|
|
},
|
|
onremove: function() {
|
|
clearInterval(window.intv)
|
|
}
|
|
}
|
|
|
|
module.exports = showPost
|