Changeset 873b0b0


Ignore:
Timestamp:
Jul 2, 2017 3:42:35 AM (3 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
afec920
Parents:
96c73e7
Message:

SusiDNS: Default to the console theme

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/susidns/src/java/src/i2p/susi/dns/BaseBean.java

    r96c73e7 r873b0b0  
    2626
    2727    public static final String RC_PROP_THEME_NAME = "routerconsole.theme";
    28     public static final String RC_PROP_UNIVERSAL_THEMING = "routerconsole.universal.theme";
    2928    public static final String PROP_THEME_NAME = "theme";
    3029    public static final String DEFAULT_THEME = "light";
     
    9190        loadConfig();
    9291        String url = BASE_THEME_PATH;
    93         String theme = properties.getProperty(PROP_THEME_NAME, DEFAULT_THEME);
    94         boolean universalTheming = _context.getBooleanProperty(RC_PROP_UNIVERSAL_THEMING);
    95         if (universalTheming) {
    96             // Fetch routerconsole theme (or use our default if it doesn't exist)
    97             theme = _context.getProperty(RC_PROP_THEME_NAME, DEFAULT_THEME);
    98             // Ensure that theme exists
    99             String[] themes = getThemes();
    100             boolean themeExists = false;
    101             for (int i = 0; i < themes.length; i++) {
    102                 if (themes[i].equals(theme))
    103                     themeExists = true;
    104             }
    105             if (!themeExists)
    106                 theme = DEFAULT_THEME;
    107         }
     92        // Fetch routerconsole theme (or use our default if it doesn't exist)
     93        String theme = _context.getProperty(RC_PROP_THEME_NAME, DEFAULT_THEME);
     94        // Apply any override
     95        theme = properties.getProperty(PROP_THEME_NAME, theme);
     96        // Ensure that theme exists
     97        String[] themes = getThemes();
     98        boolean themeExists = false;
     99        for (int i = 0; i < themes.length; i++) {
     100            if (themes[i].equals(theme))
     101                themeExists = true;
     102        }
     103        if (!themeExists)
     104            theme = DEFAULT_THEME;
    108105        url += theme + "/";
    109106        return url;
  • history.txt

    r96c73e7 r873b0b0  
     12017-07-02 str4d
     2 * Console: Show correct icon for "Firewalled" network status
     3 * SusiDNS: Default to the console theme
     4
    152017-07-01 str4d
    26 * Console:
     
    1620     - Tag "Local" for translation (and convert to lowercase in CSS)
    1721     - Arabic: ensure our tunnel tables display correctly
    18    - Show correct icon for "Firewalled" network status
    1922 * I2PSnark:
    2023   - Fix unclosed <label>
Note: See TracChangeset for help on using the changeset viewer.