Make light the default theme
This commit is contained in:
@ -84,6 +84,7 @@ public class IndexBean {
|
|||||||
static final String CLIENT_NICKNAME = "shared clients";
|
static final String CLIENT_NICKNAME = "shared clients";
|
||||||
|
|
||||||
public static final String PROP_THEME_NAME = "routerconsole.theme";
|
public static final String PROP_THEME_NAME = "routerconsole.theme";
|
||||||
|
public static final String DEFAULT_THEME = "light";
|
||||||
public static final String PROP_CSS_DISABLED = "routerconsole.css.disabled";
|
public static final String PROP_CSS_DISABLED = "routerconsole.css.disabled";
|
||||||
public static final String PROP_JS_DISABLED = "routerconsole.javascript.disabled";
|
public static final String PROP_JS_DISABLED = "routerconsole.javascript.disabled";
|
||||||
|
|
||||||
@ -319,11 +320,8 @@ public class IndexBean {
|
|||||||
////
|
////
|
||||||
|
|
||||||
public String getTheme() {
|
public String getTheme() {
|
||||||
String theme = _context.getProperty(PROP_THEME_NAME);
|
String theme = _context.getProperty(PROP_THEME_NAME, DEFAULT_THEME);
|
||||||
if (theme != null)
|
|
||||||
return "/themes/console/" + theme + "/";
|
return "/themes/console/" + theme + "/";
|
||||||
else
|
|
||||||
return "/themes/console/";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean allowCSS() {
|
public boolean allowCSS() {
|
||||||
|
@ -8,6 +8,7 @@ public class CSSHelper extends HelperBase {
|
|||||||
public CSSHelper() {}
|
public CSSHelper() {}
|
||||||
|
|
||||||
public static final String PROP_THEME_NAME = "routerconsole.theme";
|
public static final String PROP_THEME_NAME = "routerconsole.theme";
|
||||||
|
public static final String DEFAULT_THEME = "light";
|
||||||
private static final String BASE = "/themes/console/";
|
private static final String BASE = "/themes/console/";
|
||||||
private static final String FORCE = "classic";
|
private static final String FORCE = "classic";
|
||||||
|
|
||||||
@ -16,8 +17,7 @@ public class CSSHelper extends HelperBase {
|
|||||||
if (userAgent != null && userAgent.contains("MSIE")) {
|
if (userAgent != null && userAgent.contains("MSIE")) {
|
||||||
url += FORCE + "/";
|
url += FORCE + "/";
|
||||||
} else {
|
} else {
|
||||||
String theme = _context.getProperty(PROP_THEME_NAME);
|
String theme = _context.getProperty(PROP_THEME_NAME, DEFAULT_THEME);
|
||||||
if (theme != null)
|
|
||||||
url += theme + "/";
|
url += theme + "/";
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
|
@ -3,12 +3,11 @@ package net.i2p.router.web;
|
|||||||
public class ConfigUIHelper extends HelperBase {
|
public class ConfigUIHelper extends HelperBase {
|
||||||
public ConfigUIHelper() {}
|
public ConfigUIHelper() {}
|
||||||
|
|
||||||
public static final String PROP_THEME = "routerconsole.theme";
|
|
||||||
private static final String themes[] = {"classic", "dark", "light"};
|
private static final String themes[] = {"classic", "dark", "light"};
|
||||||
|
|
||||||
public String getSettings() {
|
public String getSettings() {
|
||||||
StringBuilder buf = new StringBuilder(512);
|
StringBuilder buf = new StringBuilder(512);
|
||||||
String current = _context.getProperty(PROP_THEME, "default");
|
String current = _context.getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME);
|
||||||
for (String theme : themes) {
|
for (String theme : themes) {
|
||||||
buf.append("<input type=\"radio\" name=\"theme\" ");
|
buf.append("<input type=\"radio\" name=\"theme\" ");
|
||||||
if (theme.equals(current))
|
if (theme.equals(current))
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
2009-07-15 zzz
|
2009-07-15 zzz
|
||||||
* Console: Convert readme_zh.html from GB2312 to UTF-8
|
* Console:
|
||||||
|
- Make light the default theme
|
||||||
|
- Convert readme_zh.html from GB2312 to UTF-8
|
||||||
* Installer: Don't launch the router from the postinstall.sh script
|
* Installer: Don't launch the router from the postinstall.sh script
|
||||||
on linux anymore; add a panel to the installer to provide launch instructions.
|
on linux anymore; add a panel to the installer to provide launch instructions.
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 11;
|
public final static long BUILD = 12;
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "";
|
public final static String EXTRA = "";
|
||||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||||
|
Reference in New Issue
Block a user