|
|
@@ -175,33 +175,33 @@ const Base = { |
|
|
|
autocomplete: 'off', |
|
|
|
value: localStorage.username, |
|
|
|
} |
|
|
|
const mainStyle = { |
|
|
|
position: 'fixed', |
|
|
|
width: '100%', |
|
|
|
display: 'grid', |
|
|
|
gridTemplateRows: 'auto 1fr', |
|
|
|
height: window.innerHeight + 'px', |
|
|
|
overflow: 'hidden', |
|
|
|
} |
|
|
|
const headerStyle = { |
|
|
|
display: 'grid', |
|
|
|
gridAutoFlow: 'column', |
|
|
|
justifyItems: 'start', |
|
|
|
marginRight: 'auto', |
|
|
|
} |
|
|
|
return m('main', {style: mainStyle}, |
|
|
|
return [ |
|
|
|
m('header', {style: headerStyle}, |
|
|
|
State.isConnected ? Headers.map(h => m(...h)) : [ |
|
|
|
State.isConnected |
|
|
|
? Headers.map(h => m(...h)) |
|
|
|
: [ |
|
|
|
m('form.login', |
|
|
|
{onsubmit: Base.sendLogin}, |
|
|
|
m('input', attrs), |
|
|
|
m('button', 're-join'), |
|
|
|
), |
|
|
|
], |
|
|
|
m('span.error', State.info), |
|
|
|
), |
|
|
|
State.isConnected ? Apps.map(a => m(...a)) : null, |
|
|
|
) |
|
|
|
m('main', {style: {overflow: 'hidden'}}, |
|
|
|
State.isConnected |
|
|
|
? Apps.map(a => m(...a)) |
|
|
|
: [ |
|
|
|
m('span.error', State.info), |
|
|
|
m(Settings), |
|
|
|
], |
|
|
|
), |
|
|
|
] |
|
|
|
}, |
|
|
|
} |
|
|
|
const Headers = [ |