Theme updates

Console:
- light:
  - Lighten/tint buttons and dropdowns to better blend with reworked theme,
    vary text color for different button states
  - Increase vertical spacing for status/buttons in news section
  - Fix minor rendering issue with h1's (remove bottom border-radius)
  - Fix some mismatched heading coloring issues
  - Fix alignment issue on /configservice in Arabic/Chinese (ticket #2024)
  - Ensure spacing of sidebar elements is consistent in Chinese
- dark: Overhaul theme
- classic: Add fallback CSS to ensure browsers without CSS3 support can display
  icons on buttons (tested with Netsurf)

Proxy: Remove truncation of URLs in the error messages and handle with CSS to
  avoid UI breakage

I2PSnark
- Add button hoverstate for tracker details, torrent details and file icons
- light
  - Sync buttons in embedded mode with console theme
  - Fix non-functioning message log close icon
- dark: Overhaul theme and sync with console theme in embedded mode
- classic: refresh CSS

Susimail:
- Overhaul dark theme
- Sync theme to console theme by default, override if user sets theme
  (unless universal themeing is enabled)
This commit is contained in:
str4d
2017-10-25 09:47:34 +00:00
parent cdd89df98d
commit 1c6ca5011d
30 changed files with 1666 additions and 787 deletions

View File

@@ -698,10 +698,8 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
out.write("<a href=\"");
out.write(uri);
out.write("\">");
if (targetRequest.length() > 80)
out.write(DataHelper.escapeHTML(targetRequest.substring(0, 75)) + "&hellip;");
else
out.write(uri);
// Long URLs are handled in CSS
out.write(uri);
out.write("</a>");
if (usingWWWProxy) {
out.write("<br><br><b>");

View File

@@ -115,7 +115,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<tr>
<td>
<input type="text" size="60" maxlength="80" name="nofilter_description" title="<%=intl._t("Description of tunnel to be displayed on Tunnel Manager home page")%>" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext tunnelDescription" />
<input type="text" size="60" maxlength="80" name="nofilter_description" title="<%=intl._t("Description of tunnel to be displayed on Tunnel Manager home page")%>" value="<%=editBean.getTunnelDescription(curTunnel)%>" class="freetext tunnelDescriptionText" />
</td>
<td>

View File

@@ -13,16 +13,16 @@ public class ConfigUIHelper extends HelperBase {
String current = _context.getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME);
Set<String> themes = themeSet();
for (String theme : themes) {
buf.append("<div class=\"themechoice\">")
buf.append("<label for=\"").append(theme).append("\"><div class=\"themechoice\">")
.append("<input type=\"radio\" class=\"optbox\" name=\"theme\" ");
if (theme.equals(current))
buf.append(CHECKED);
buf.append("value=\"").append(theme).append("\">")
buf.append("value=\"").append(theme).append("\" id=\"").append(theme).append("\">")
.append("<object height=\"48\" width=\"48\" data=\"/themes/console/").append(theme).append("/images/thumbnail.png\">")
.append("<img height=\"48\" width=\"48\" alt=\"\" src=\"/themes/console/images/thumbnail.png\">")
.append("</object><br>")
.append("<div class=\"themelabel\">").append(_t(theme)).append("</div>")
.append("</div>\n");
.append("</div></label>\n");
}
boolean universalTheming = _context.getBooleanProperty(CSSHelper.PROP_UNIVERSAL_THEMING);
buf.append("</div><div id=\"themeoptions\">");
@@ -168,10 +168,10 @@ public class ConfigUIHelper extends HelperBase {
if (lang.equals("xx") && !isAdvanced())
continue;
// we use "lang" so it is set automagically in CSSHelper
buf.append("<div class=\"langselect\"><input type=\"radio\" class=\"optbox\" name=\"lang\" ");
buf.append("<label for=\"").append(lang).append("\"><div class=\"langselect\"><input type=\"radio\" class=\"optbox\" name=\"lang\" ");
if (lang.equals(current))
buf.append(CHECKED);
buf.append("value=\"").append(lang).append("\">")
buf.append("value=\"").append(lang).append("\" id=\"").append(lang).append("\">")
.append("<img height=\"48\" width=\"48\" alt=\"\" src=\"/flags.jsp?s=48&c=").append(langs[i][1]).append("\">")
.append("<div class=\"ui_lang\">");
int under = lang.indexOf('_');
@@ -183,7 +183,7 @@ public class ConfigUIHelper extends HelperBase {
.append(name)
.append(')');
}
buf.append("</div></div>\n");
buf.append("</div></div></label>\n");
}
return buf.toString();
}

View File

@@ -131,7 +131,7 @@ public class LogsHelper extends HelperBase {
return "<p>" + _t("File not found") + ": <b><code>" + f.getAbsolutePath() + "</code></b></p>";
} else {
str = str.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;");
return "<p>" + _t("File location") + ": <a href=\"/wrapper.log\" target=\"_blank\">" + f.getAbsolutePath() + "</a></p></td></tr>\n<tr><td><pre>" + str + "</pre>";
return "<p>" + _t("File location") + ": <a href=\"/wrapper.log\" target=\"_blank\">" + f.getAbsolutePath() + "</a></p></td></tr>\n<tr><td><pre id=\"servicelogs\">" + str + "</pre>";
}
}

View File

@@ -1611,8 +1611,11 @@ public class WebMail extends HttpServlet
private void processRequest( HttpServletRequest httpRequest, HttpServletResponse response, boolean isPOST )
throws IOException, ServletException
{
String theme = Config.getProperty(CONFIG_THEME, DEFAULT_THEME);
I2PAppContext ctx = I2PAppContext.getGlobalContext();
// Fetch routerconsole theme (or use our default if it doesn't exist)
String theme = ctx.getProperty(RC_PROP_THEME, DEFAULT_THEME);
// Apply any override
theme = Config.getProperty(CONFIG_THEME, theme);
boolean universalTheming = ctx.getBooleanProperty(RC_PROP_UNIVERSAL_THEMING);
if (universalTheming) {
// Fetch routerconsole theme (or use our default if it doesn't exist)