|
|
@ -11,7 +11,8 @@ import {
|
|
|
|
login_request_handler,
|
|
|
|
login_request_handler,
|
|
|
|
logout_request_handler,
|
|
|
|
logout_request_handler,
|
|
|
|
username_change_handler,
|
|
|
|
username_change_handler,
|
|
|
|
password_change_handler
|
|
|
|
password_change_handler,
|
|
|
|
|
|
|
|
choose_bin_handler
|
|
|
|
} from './handlers/App.js';
|
|
|
|
} from './handlers/App.js';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -22,6 +23,7 @@ function App(vnode_init){
|
|
|
|
view: function(vnode){
|
|
|
|
view: function(vnode){
|
|
|
|
const s = vnode.attrs.state;
|
|
|
|
const s = vnode.attrs.state;
|
|
|
|
const o = function(handler){ return handler.bind(null, s, dispatch); }
|
|
|
|
const o = function(handler){ return handler.bind(null, s, dispatch); }
|
|
|
|
|
|
|
|
const o1 = function(handler, p1){ return handler.bind(null, s, dispatch, p1); }
|
|
|
|
return m('.app', {key: 'app'}, [
|
|
|
|
return m('.app', {key: 'app'}, [
|
|
|
|
m('.top', {key: 'top'}, [
|
|
|
|
m('.top', {key: 'top'}, [
|
|
|
|
m('.top-left', {key: 'top-left'}, [
|
|
|
|
m('.top-left', {key: 'top-left'}, [
|
|
|
@ -59,7 +61,7 @@ function App(vnode_init){
|
|
|
|
)
|
|
|
|
)
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
m('ul.bin-list', {key:'bin-list'}, s.login.bins.map(b=>
|
|
|
|
m('ul.bin-list', {key:'bin-list'}, s.login.bins.map(b=>
|
|
|
|
m('li.bin', b.name)
|
|
|
|
m('li.bin', {key:b.id, onclick:o1(choose_bin_handler, b.id)}, b.name)
|
|
|
|
))
|
|
|
|
))
|
|
|
|
])
|
|
|
|
])
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|