Show advanced sidebar links by default in advanced mode (ticket #1996)

This commit is contained in:
str4d
2017-07-07 21:24:23 +00:00
parent e83d31f749
commit 5c670fc57f
3 changed files with 21 additions and 2 deletions

View File

@ -36,7 +36,7 @@ public class ConfigSummaryHandler extends FormHandler {
return;
}
} else if (_action.equals(_t("Restore full default"))) {
_context.router().saveConfig(SummaryHelper.PROP_SUMMARYBAR + "default", SummaryHelper.DEFAULT_FULL);
_context.router().saveConfig(SummaryHelper.PROP_SUMMARYBAR + "default", isAdvanced() ? SummaryHelper.DEFAULT_FULL_ADVANCED : SummaryHelper.DEFAULT_FULL);
addFormNotice(_t("Full summary bar default restored.") + " " +
_t("Summary bar will refresh shortly."));
} else if (_action.equals(_t("Restore minimal default"))) {

View File

@ -59,6 +59,24 @@ public class SummaryHelper extends HelperBase {
"Destinations" + S +
"";
static final String DEFAULT_FULL_ADVANCED =
"HelpAndFAQ" + S +
"ShortGeneral" + S +
"Bandwidth" + S +
"UpdateStatus" + S +
"FirewallAndReseedStatus" + S +
"NetworkReachability" + S +
"I2PServices" + S +
"I2PInternals" + S +
"Advanced" + S +
"Peers" + S +
"Tunnels" + S +
"TunnelStatus" + S +
"Congestion" + S +
"RestartStatus" + S +
"Destinations" + S +
"";
static final String DEFAULT_MINIMAL =
"ShortGeneral" + S +
"Bandwidth" + S +
@ -916,7 +934,7 @@ public class SummaryHelper extends HelperBase {
} else {
config = _context.getProperty(PROP_SUMMARYBAR + page);
if (config == null)
config = _context.getProperty(PROP_SUMMARYBAR + "default", DEFAULT_FULL);
config = _context.getProperty(PROP_SUMMARYBAR + "default", isAdvanced() ? DEFAULT_FULL_ADVANCED : DEFAULT_FULL);
}
return Arrays.asList(DataHelper.split(config, SS));
}

View File

@ -2,6 +2,7 @@
* Console:
- /configlogging: Fix log file size config bug (ticket #1996)
- /logs: Correctly format unavailable crypto warnings (ticket #1996)
- Show advanced sidebar links by default in advanced mode (ticket #1996)
2017-07-02 str4d
* Console: