I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 110f01a5 authored by duck's avatar duck
Browse files

I2P logo in routerconsole sidebar is now themed.

parent ada39a97
No related branches found
No related tags found
No related merge requests found
...@@ -9,13 +9,13 @@ public class CSSHelper extends HelperBase { ...@@ -9,13 +9,13 @@ public class CSSHelper extends HelperBase {
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 DEFAULT_THEME = "light";
private static final String BASE = "/themes/console/"; public static final String BASE_THEME_PATH = "/themes/console/";
private static final String FORCE = "classic"; private static final String FORCE = "classic";
public static final String PROP_REFRESH = "routerconsole.summaryRefresh"; public static final String PROP_REFRESH = "routerconsole.summaryRefresh";
public static final String DEFAULT_REFRESH = "60"; public static final String DEFAULT_REFRESH = "60";
public String getTheme(String userAgent) { public String getTheme(String userAgent) {
String url = BASE; String url = BASE_THEME_PATH;
if (userAgent != null && userAgent.contains("MSIE")) { if (userAgent != null && userAgent.contains("MSIE")) {
url += FORCE + "/"; url += FORCE + "/";
} else { } else {
......
...@@ -25,8 +25,12 @@ public class SummaryBarRenderer { ...@@ -25,8 +25,12 @@ public class SummaryBarRenderer {
*/ */
public void renderSummaryHTML(Writer out) throws IOException { public void renderSummaryHTML(Writer out) throws IOException {
StringBuilder buf = new StringBuilder(8*1024); StringBuilder buf = new StringBuilder(8*1024);
String theme = _context.getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME);
buf.append("<a href=\"/index.jsp\" target=\"_top\"><img src=\"/themes/console/images/i2plogo.png\" alt=\"")
buf.append("<a href=\"/index.jsp\" target=\"_top\"><img src=\"")
.append(CSSHelper.BASE_THEME_PATH)
.append(theme)
.append("/images/i2plogo.png\" alt=\"")
.append(_("I2P Router Console")) .append(_("I2P Router Console"))
.append("\" title=\"") .append("\" title=\"")
.append(_("I2P Router Console")) .append(_("I2P Router Console"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment