mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
webui: menu in gui mode fixed
This commit is contained in:
parent
a11cd25517
commit
dfa2cba045
@ -62,10 +62,10 @@ function Page(menu){
|
||||
}),
|
||||
]);
|
||||
} else {
|
||||
if ("waiting_init|waiting_startup".match(runstate.runstate)) {
|
||||
if (runstate.runstate.match("waiting_init|waiting_startup")) {
|
||||
return m("h2","server starting ...")
|
||||
} else if("waiting_account_select|running_ok.*".match(runstate.runstate)) {
|
||||
if (runst === undefined || runst.match(runstate.runstate)) {
|
||||
} else if(runstate.runstate.match("waiting_account_select|running_ok.*")) {
|
||||
if (runst === undefined || runstate.runstate.match(runst)) {
|
||||
return m("div", {
|
||||
style: {
|
||||
height: "100%",
|
||||
|
@ -11,8 +11,9 @@ function goback(){
|
||||
|
||||
function buildmenu(menu, tagname, runstate, ignore){
|
||||
if (
|
||||
(menu.runstate === undefined || runstate.match(menu.runstate)!=null)
|
||||
&& (!ignore.match(menu.name))
|
||||
(menu.runstate === undefined
|
||||
|| runstate.match("^(" + menu.runstate + ")$")!=null)
|
||||
&& (!menu.name.match(ignore))
|
||||
&& (menu.path === undefined || menu.path.match(":")==null)
|
||||
&& (menu.show === undefined || menu.show)
|
||||
) {
|
||||
@ -36,13 +37,15 @@ function buildmenu(menu, tagname, runstate, ignore){
|
||||
|
||||
module.exports = {view: function(){
|
||||
var runstate = rs("control/runstate");
|
||||
if (runstate === undefined || runstate.runstate === undefined || runstate.runstate == null)
|
||||
if (runstate === undefined
|
||||
|| runstate.runstate === undefined
|
||||
|| runstate.runstate == null)
|
||||
return m("div.nav","menu: waiting for server ...");
|
||||
if (m.route() != "/")
|
||||
return m("span",[
|
||||
m("span"," | "),
|
||||
mnodes.nodes.map(function(menu){
|
||||
var item = buildmenu(menu,"span.menu", runstate.runstate, "");
|
||||
var item = buildmenu(menu,"span.menu", runstate.runstate, "-");
|
||||
if (item != null){
|
||||
return [
|
||||
item,
|
||||
|
Loading…
Reference in New Issue
Block a user