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
|
} // descr
|
||||||
%>
|
%>
|
||||||
</td>
|
</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 (("httpserver".equals(indexBean.getInternalType(curServer)) || ("httpbidirserver".equals(indexBean.getInternalType(curServer)))) && indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) {
|
||||||
if (name != null && !name.equals("") && name.endsWith(".i2p") ) {
|
if (name != null && !name.equals("") && name.endsWith(".i2p") ) {
|
||||||
@@ -208,7 +208,7 @@
|
|||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
</td>
|
</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 (("httpserver".equals(indexBean.getInternalType(curServer)) || ("httpbidirserver".equals(indexBean.getInternalType(curServer)))) && indexBean.getTunnelStatus(curServer) == IndexBean.RUNNING) {
|
||||||
if (name != null && !name.equals("") && name.endsWith(".i2p") ) {
|
if (name != null && !name.equals("") && name.endsWith(".i2p") ) {
|
||||||
@@ -223,7 +223,7 @@
|
|||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="2">
|
<td colspan="2" class="tunnelPreviewHostname">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<%
|
<%
|
||||||
|
@@ -430,10 +430,19 @@ html body#tunnelEditPage form div.panel table#serverTunnelEdit.tunnelConfig tbod
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tunnelPreview, .tunnelPort {
|
.tunnelPreview, .tunnelPort {
|
||||||
width: 15%;
|
/*width: 15%;*/
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tunnelPreviewHostname {
|
||||||
|
/*margin-bottom: 1em !important;
|
||||||
|
margin-top: -1em !important;*/
|
||||||
|
width: 100%;
|
||||||
|
height: 1.5em;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #332940;
|
||||||
|
}
|
||||||
|
|
||||||
.tunnelLocation, .tunnelInterface {
|
.tunnelLocation, .tunnelInterface {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
|
@@ -30,6 +30,7 @@ public class BaseBean
|
|||||||
private static final String PROP_THEME_NAME = "theme";
|
private static final String PROP_THEME_NAME = "theme";
|
||||||
private static final String DEFAULT_THEME = "light";
|
private static final String DEFAULT_THEME = "light";
|
||||||
private static final String BASE_THEME_PATH = "themes/";
|
private static final String BASE_THEME_PATH = "themes/";
|
||||||
|
private static final String[] THEMES = new String[] { "dark", "light"};
|
||||||
/** From CSSHelper */
|
/** From CSSHelper */
|
||||||
private static final String PROP_DISABLE_OLD = "routerconsole.disableOldThemes";
|
private static final String PROP_DISABLE_OLD = "routerconsole.disableOldThemes";
|
||||||
private static final boolean DEFAULT_DISABLE_OLD = true;
|
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)
|
// Fetch routerconsole theme (or use our default if it doesn't exist)
|
||||||
String theme = _context.getProperty(RC_PROP_THEME_NAME, DEFAULT_THEME);
|
String theme = _context.getProperty(RC_PROP_THEME_NAME, DEFAULT_THEME);
|
||||||
// Apply any override
|
// Apply any override
|
||||||
|
debug("Theme test 1: " + theme);
|
||||||
theme = properties.getProperty(PROP_THEME_NAME, theme);
|
theme = properties.getProperty(PROP_THEME_NAME, theme);
|
||||||
// remap deprecated themes
|
// remap deprecated themes
|
||||||
|
debug("Theme test 2: " + theme);
|
||||||
if (theme.equals("midnight")) {
|
if (theme.equals("midnight")) {
|
||||||
if (_context.getProperty(PROP_DISABLE_OLD, DEFAULT_DISABLE_OLD))
|
if (_context.getProperty(PROP_DISABLE_OLD, DEFAULT_DISABLE_OLD))
|
||||||
theme = "dark";
|
theme = "dark";
|
||||||
@@ -112,6 +115,7 @@ public class BaseBean
|
|||||||
if (_context.getProperty(PROP_DISABLE_OLD, DEFAULT_DISABLE_OLD))
|
if (_context.getProperty(PROP_DISABLE_OLD, DEFAULT_DISABLE_OLD))
|
||||||
theme = "light";
|
theme = "light";
|
||||||
}
|
}
|
||||||
|
debug("Theme test 3: " + theme);
|
||||||
// Ensure that theme exists
|
// Ensure that theme exists
|
||||||
String[] themes = getThemes();
|
String[] themes = getThemes();
|
||||||
boolean themeExists = false;
|
boolean themeExists = false;
|
||||||
@@ -121,8 +125,10 @@ public class BaseBean
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!themeExists)
|
if (!themeExists) {
|
||||||
|
debug("Theme did not exist:" + theme);
|
||||||
theme = DEFAULT_THEME;
|
theme = DEFAULT_THEME;
|
||||||
|
}
|
||||||
url += theme + "/";
|
url += theme + "/";
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
@@ -133,24 +139,7 @@ public class BaseBean
|
|||||||
* @since 0.9.2
|
* @since 0.9.2
|
||||||
*/
|
*/
|
||||||
public String[] getThemes() {
|
public String[] getThemes() {
|
||||||
String[] themes;
|
return 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -100,6 +100,8 @@ body.iframed {
|
|||||||
position: relative;
|
position: relative;
|
||||||
text-shadow: 0 1px 1px #000;
|
text-shadow: 0 1px 1px #000;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
|
background-color: #2c4e8f;
|
||||||
|
color: #7b7;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navi a:hover, #navi a:focus {
|
#navi a:hover, #navi a:focus {
|
||||||
|
Reference in New Issue
Block a user