From 873b0b0f192feeac7b0a4f2d83e202e00350eba2 Mon Sep 17 00:00:00 2001 From: str4d Date: Sun, 2 Jul 2017 03:42:35 +0000 Subject: [PATCH] SusiDNS: Default to the console theme --- .../src/java/src/i2p/susi/dns/BaseBean.java | 27 +++++++++---------- history.txt | 5 +++- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/apps/susidns/src/java/src/i2p/susi/dns/BaseBean.java b/apps/susidns/src/java/src/i2p/susi/dns/BaseBean.java index e4449a4e0..d1f8d942b 100644 --- a/apps/susidns/src/java/src/i2p/susi/dns/BaseBean.java +++ b/apps/susidns/src/java/src/i2p/susi/dns/BaseBean.java @@ -25,7 +25,6 @@ public class BaseBean private static final String DEFAULT_PRIVATE_BOOK = "../privatehosts.txt"; public static final String RC_PROP_THEME_NAME = "routerconsole.theme"; - public static final String RC_PROP_UNIVERSAL_THEMING = "routerconsole.universal.theme"; public static final String PROP_THEME_NAME = "theme"; public static final String DEFAULT_THEME = "light"; public static final String BASE_THEME_PATH = "/themes/susidns/"; @@ -90,21 +89,19 @@ public class BaseBean public String getTheme() { loadConfig(); String url = BASE_THEME_PATH; - String theme = properties.getProperty(PROP_THEME_NAME, DEFAULT_THEME); - boolean universalTheming = _context.getBooleanProperty(RC_PROP_UNIVERSAL_THEMING); - if (universalTheming) { - // Fetch routerconsole theme (or use our default if it doesn't exist) - theme = _context.getProperty(RC_PROP_THEME_NAME, DEFAULT_THEME); - // Ensure that theme exists - String[] themes = getThemes(); - boolean themeExists = false; - for (int i = 0; i < themes.length; i++) { - if (themes[i].equals(theme)) - themeExists = true; - } - if (!themeExists) - theme = DEFAULT_THEME; + // Fetch routerconsole theme (or use our default if it doesn't exist) + String theme = _context.getProperty(RC_PROP_THEME_NAME, DEFAULT_THEME); + // Apply any override + theme = properties.getProperty(PROP_THEME_NAME, theme); + // Ensure that theme exists + String[] themes = getThemes(); + boolean themeExists = false; + for (int i = 0; i < themes.length; i++) { + if (themes[i].equals(theme)) + themeExists = true; } + if (!themeExists) + theme = DEFAULT_THEME; url += theme + "/"; return url; } diff --git a/history.txt b/history.txt index ba7615bf1..3381682d5 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,7 @@ +2017-07-02 str4d + * Console: Show correct icon for "Firewalled" network status + * SusiDNS: Default to the console theme + 2017-07-01 str4d * Console: - /netdb: @@ -15,7 +19,6 @@ - /tunnels: - Tag "Local" for translation (and convert to lowercase in CSS) - Arabic: ensure our tunnel tables display correctly - - Show correct icon for "Firewalled" network status * I2PSnark: - Fix unclosed