forked from I2P_Developers/i2p.i2p
fix up dark theme for new UI elements on dark theme. Fix theme selection on Address Book.
This commit is contained in:
@@ -193,7 +193,7 @@
|
||||
} // descr
|
||||
%>
|
||||
</td>
|
||||
<td class="tunnelPreview" colspan="1">
|
||||
<td class="tunnelPreview tunnelPreviewHostname" colspan="1">
|
||||
<%
|
||||
if (("httpserver".equals(indexBean.getInternalType(curServer)) || ("httpbidirserver".equals(indexBean.getInternalType(curServer)))) && indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) {
|
||||
if (name != null && !name.equals("") && name.endsWith(".i2p") ) {
|
||||
@@ -208,7 +208,7 @@
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<td class="tunnelPreview" colspan="1">
|
||||
<td class="tunnelPreview tunnelPreviewHostname" colspan="1">
|
||||
<%
|
||||
if (("httpserver".equals(indexBean.getInternalType(curServer)) || ("httpbidirserver".equals(indexBean.getInternalType(curServer)))) && indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) {
|
||||
if (name != null && !name.equals("") && name.endsWith(".i2p") ) {
|
||||
@@ -223,7 +223,7 @@
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<td colspan="2" class="tunnelPreviewHostname">
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
|
@@ -430,10 +430,19 @@ html body#tunnelEditPage form div.panel table#serverTunnelEdit.tunnelConfig tbod
|
||||
}
|
||||
|
||||
.tunnelPreview, .tunnelPort {
|
||||
width: 15%;
|
||||
/*width: 15%;*/
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tunnelPreviewHostname {
|
||||
/*margin-bottom: 1em !important;
|
||||
margin-top: -1em !important;*/
|
||||
width: 100%;
|
||||
height: 1.5em;
|
||||
overflow: hidden;
|
||||
background: #332940;
|
||||
}
|
||||
|
||||
.tunnelLocation, .tunnelInterface {
|
||||
width: 20%;
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@ public class BaseBean
|
||||
private static final String PROP_THEME_NAME = "theme";
|
||||
private static final String DEFAULT_THEME = "light";
|
||||
private static final String BASE_THEME_PATH = "themes/";
|
||||
private static final String[] THEMES = new String[] { "dark", "light"};
|
||||
/** From CSSHelper */
|
||||
private static final String PROP_DISABLE_OLD = "routerconsole.disableOldThemes";
|
||||
private static final boolean DEFAULT_DISABLE_OLD = true;
|
||||
@@ -103,8 +104,10 @@ public class BaseBean
|
||||
// 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
|
||||
debug("Theme test 1: " + theme);
|
||||
theme = properties.getProperty(PROP_THEME_NAME, theme);
|
||||
// remap deprecated themes
|
||||
debug("Theme test 2: " + theme);
|
||||
if (theme.equals("midnight")) {
|
||||
if (_context.getProperty(PROP_DISABLE_OLD, DEFAULT_DISABLE_OLD))
|
||||
theme = "dark";
|
||||
@@ -112,6 +115,7 @@ public class BaseBean
|
||||
if (_context.getProperty(PROP_DISABLE_OLD, DEFAULT_DISABLE_OLD))
|
||||
theme = "light";
|
||||
}
|
||||
debug("Theme test 3: " + theme);
|
||||
// Ensure that theme exists
|
||||
String[] themes = getThemes();
|
||||
boolean themeExists = false;
|
||||
@@ -121,8 +125,10 @@ public class BaseBean
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!themeExists)
|
||||
if (!themeExists) {
|
||||
debug("Theme did not exist:" + theme);
|
||||
theme = DEFAULT_THEME;
|
||||
}
|
||||
url += theme + "/";
|
||||
return url;
|
||||
}
|
||||
@@ -133,24 +139,7 @@ public class BaseBean
|
||||
* @since 0.9.2
|
||||
*/
|
||||
public String[] getThemes() {
|
||||
String[] themes;
|
||||
File dir = new File(_context.getBaseDir(), "docs/themes/susidns");
|
||||
FileFilter fileFilter = new FileFilter() { public boolean accept(File file) { return file.isDirectory(); } };
|
||||
File[] dirnames = dir.listFiles(fileFilter);
|
||||
if (dirnames != null) {
|
||||
List<String> th = new ArrayList<String>(dirnames.length);
|
||||
boolean skipOld = _context.getProperty(PROP_DISABLE_OLD, DEFAULT_DISABLE_OLD);
|
||||
for (int i = 0; i < dirnames.length; i++) {
|
||||
String name = dirnames[i].getName();
|
||||
if (skipOld && (name.equals("midnight") || name.equals("classic")))
|
||||
continue;
|
||||
th.add(name);
|
||||
}
|
||||
themes = th.toArray(new String[th.size()]);
|
||||
} else {
|
||||
themes = new String[0];
|
||||
}
|
||||
return themes;
|
||||
return THEMES;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -100,6 +100,8 @@ body.iframed {
|
||||
position: relative;
|
||||
text-shadow: 0 1px 1px #000;
|
||||
border-radius: 12px;
|
||||
background-color: #2c4e8f;
|
||||
color: #7b7;
|
||||
}
|
||||
|
||||
#navi a:hover, #navi a:focus {
|
||||
|
Reference in New Issue
Block a user