SusiDNS: Default to the console theme

This commit is contained in:
str4d
2017-07-02 03:42:35 +00:00
parent 96c73e7fcb
commit 873b0b0f19
2 changed files with 16 additions and 16 deletions

View File

@ -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;
}

View File

@ -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 <label>
- Standalone: