Changeset f8f6375


Ignore:
Timestamp:
Nov 13, 2018 5:46:18 PM (21 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
2bfbcf1a
Parents:
c0744671
Message:

New install setup wizard
Work in progress, run on first install disabled.
Language and bw settings should work,
other panes todo.

Location:
apps/routerconsole
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigNetHandler.java

    rc0744671 rf8f6375  
    478478    }
    479479   
    480     private static final int DEF_BURST_PCT = 10;
    481     private static final int DEF_BURST_TIME = 20;
     480    static final int DEF_BURST_PCT = 10;
     481    static final int DEF_BURST_TIME = 20;
    482482
    483483    /**
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/SummaryBarRenderer.java

    rc0744671 rf8f6375  
    186186           .append("\">")
    187187           .append(nbsp(_t("Reachability")))
     188           .append("</a>\n" +
     189
     190                   "<a href=\"/welcome\" target=\"_top\" title=\"")
     191           .append(_t("New Install Wizard"))
     192           .append("\">")
     193           .append(nbsp(_t("Setup")))
    188194           .append("</a>\n" +
    189195
  • apps/routerconsole/jsp/index.jsp

    rc0744671 rf8f6375  
    2222    if (!req.endsWith("/"))
    2323        buf.append('/');
    24     boolean oldHome = net.i2p.I2PAppContext.getGlobalContext().getBooleanProperty("routerconsole.oldHomePage");
    25     if (oldHome)
    26         buf.append("console");
    27     else
    28         buf.append("home");
     24    net.i2p.I2PAppContext ctx = net.i2p.I2PAppContext.getGlobalContext();
     25    boolean oldHome = ctx.getBooleanProperty("routerconsole.oldHomePage");
     26    boolean wizRun = ctx.getBooleanProperty("routerconsole.welcomeWizardComplete");
     27    String firstVersion = ctx.getProperty("router.firstVersion");
     28    String tgt;
     29    final boolean ENABLE_WIZARD_ON_FIRST_RUN = false;
     30    if (oldHome) {
     31        tgt = "console";
     32    } else if (ENABLE_WIZARD_ON_FIRST_RUN && (wizRun || firstVersion == null)) {
     33        // wizard already run
     34        tgt = "home";
     35    } else {
     36        String version = net.i2p.CoreVersion.VERSION;
     37        if (version.equals("0.9.37")) {
     38            // dev builds, force everyone to run it once for testing
     39            tgt = "welcome";
     40        } else if (version.equals(firstVersion)) {
     41            // first install 38 or later, still on same version
     42            tgt = "welcome";
     43        } else {
     44            // they already upgraded
     45            tgt = "home";
     46        }
     47    }
     48    buf.append(tgt);
    2949    String query = request.getQueryString();
    3050    if (query != null)
Note: See TracChangeset for help on using the changeset viewer.