webui: layout improvements

This commit is contained in:
zeners 2016-01-09 11:54:01 +01:00
parent c9d6cb6a07
commit 4c66bb87bb
4 changed files with 10 additions and 10 deletions

View File

@ -68,4 +68,4 @@
&.text &.text
padding-left: $author_width padding-left: $author_width
top: 0px top: 0px
left: $author_width left: $author_width

View File

@ -27,12 +27,12 @@ module.exports = {view: function(){
if (curraccount == null) { if (curraccount == null) {
accountMap.clear(); accountMap.clear();
return m("div", [ return m("div", [
m("h2","accounts:"), m("h2","login:"),
m("hr"), m("hr"),
accounts.map(function(account){ accounts.map(function(account){
accountMap.set(account.id,account); accountMap.set(account.id,account);
return [ return [
m("div", {onclick: m.withAttr("account", selAccount), account:account.id }, account.location + " (" + account.name + ")"), m("div.btn2", {onclick: m.withAttr("account", selAccount), account:account.id }, account.location + " (" + account.name + ")"),
m("br") m("br")
] ]
})]); })]);

View File

@ -23,20 +23,20 @@ function Page(content, runst){
var needpasswd = rs("control/password"); var needpasswd = rs("control/password");
//console.log("runstate: " + (runstate === undefined ? runstate : runstate.runstate)); //console.log("runstate: " + (runstate === undefined ? runstate : runstate.runstate));
if(runstate === undefined){ if(runstate === undefined){
return m("div", "waiting_server ... "); return m("h2", "waiting_server ... ");
} else if (runstate.runstate == null){ } else if (runstate.runstate == null){
return m("div", "server down"); return m("h2", "server down");
} else if (needpasswd != undefined && needpasswd.want_password === true){ } else if (needpasswd != undefined && needpasswd.want_password === true){
return m("div",[ return m("div",[
m("div","password required"), m("h2","password required"),
m("div",needpasswd.key_name), m("h3",needpasswd.key_name),
m("input",{type:"password", onchange:m.withAttr("value", setPasswd)}), m("input",{type:"password", onchange:m.withAttr("value", setPasswd)}),
m("br"), m("br"),
m("button",{onclick: function(){sendPassword(needpasswd);}},"send password"), m("input[type=button][value=send password]",{onclick: function(){sendPassword(needpasswd);}}),
]); ]);
} else { } else {
if ("waiting_init|waiting_startup".match(runstate.runstate)) { if ("waiting_init|waiting_startup".match(runstate.runstate)) {
return m("div","server starting ...") return m("h2","server starting ...")
} else if("waiting_account_select|running_ok*") { } else if("waiting_account_select|running_ok*") {
if (runst === undefined || runst.match(runstate.runstate)) { if (runst === undefined || runst.match(runstate.runstate)) {
return m("div", [ return m("div", [

View File

@ -36,7 +36,7 @@ module.exports = {
} }
} }
return m("div",[ return m("div",[
m("p","turtle file search"), m("h2","turtle file search"),
m("div", [ m("div", [
m("input[type=text]", {onchange:m.withAttr("value", updateText)}), m("input[type=text]", {onchange:m.withAttr("value", updateText)}),
m("input[type=button][value=search]",{onclick:dosearch}) m("input[type=button][value=search]",{onclick:dosearch})