diff --git a/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java b/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java index 7a3077ea5a2bca46c0d4231295781bf84ee1b4c1..27fe4e9f800697fa0880ef6f65cc7a1a9f76b462 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/PluginStarter.java @@ -127,6 +127,7 @@ public class PluginStarter implements Runnable { } Log log = ctx.logManager().getLog(PluginStarter.class); + int updated = 0; for (Map.Entry<String, String> entry : toUpdate.entrySet()) { String appName = entry.getKey(); if (log.shouldLog(Log.WARN)) @@ -152,7 +153,13 @@ public class PluginStarter implements Runnable { Thread.sleep(5*1000); } catch (InterruptedException ie) {} } while (puh.isRunning()); + if (puh.wasUpdateSuccessful()) + updated++; } + if (updated > 0) + puc.setDoneStatus(ngettext("1 plugin updated", "{0} plugins updated", updated, ctx)); + else + puc.setDoneStatus(Messages.getString("Plugin update check complete", ctx)); } /** this shouldn't throw anything */ @@ -764,4 +771,9 @@ public class PluginStarter implements Runnable { method.setAccessible(true); method.invoke(urlClassLoader, new Object[]{u}); } + + /** translate a string */ + private static String ngettext(String s, String p, int n, I2PAppContext ctx) { + return Messages.getString(n, s, p, ctx); + } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/PluginUpdateChecker.java b/apps/routerconsole/java/src/net/i2p/router/web/PluginUpdateChecker.java index bc4ef05dbc118f6d59f3f958ba3406cbaac75766..d5e1687144f619cf9df760306f98daa357c48289 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/PluginUpdateChecker.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/PluginUpdateChecker.java @@ -104,6 +104,12 @@ public class PluginUpdateChecker extends UpdateHandler { public void setAppStatus(String status) { updateStatus(status); } + + /** @since 0.8.13 */ + public void setDoneStatus(String status) { + updateStatus(status); + scheduleStatusClean(status); + } public boolean isRunning() { return _pluginUpdateCheckerRunner != null && _pluginUpdateCheckerRunner.isRunning(); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/PluginUpdateHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/PluginUpdateHandler.java index 0c1fce48e86b0312f7e73f0abd6c2ab1b6bcac00..f34c9ac903acb11bf420762302fb3165f4694c53 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/PluginUpdateHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/PluginUpdateHandler.java @@ -42,6 +42,8 @@ public class PluginUpdateHandler extends UpdateHandler { private static PluginUpdateRunner _pluginUpdateRunner; private String _xpi2pURL; private String _appStatus; + private volatile boolean _updated; + private static final String XPI2P = "app.xpi2p"; private static final String ZIP = XPI2P + ".zip"; public static final String PLUGIN_DIR = "plugins"; @@ -92,6 +94,11 @@ public class PluginUpdateHandler extends UpdateHandler { return false; } + /** @since 0.8.13 */ + public boolean wasUpdateSuccessful() { + return _updated; + } + private void scheduleStatusClean(String msg) { SimpleScheduler.getInstance().addEvent(new Cleaner(msg), 20*60*1000); } @@ -108,6 +115,7 @@ public class PluginUpdateHandler extends UpdateHandler { } public class PluginUpdateRunner extends UpdateRunner implements Runnable, EepGet.StatusListener { + private boolean _updated; public PluginUpdateRunner(String url) { super(); @@ -115,6 +123,7 @@ public class PluginUpdateHandler extends UpdateHandler { @Override protected void update() { + _updated = false; updateStatus("<b>" + _("Downloading plugin from {0}", _xpi2pURL) + "</b>"); // use the same settings as for updater boolean shouldProxy = Boolean.valueOf(_context.getProperty(ConfigUpdateHandler.PROP_SHOULD_PROXY, ConfigUpdateHandler.DEFAULT_SHOULD_PROXY)).booleanValue(); @@ -383,6 +392,7 @@ public class PluginUpdateHandler extends UpdateHandler { return; } + _updated = true; to.delete(); if (Boolean.valueOf(props.getProperty("dont-start-at-install")).booleanValue()) { if (Boolean.valueOf(props.getProperty("router-restart-required")).booleanValue()) diff --git a/apps/susidns/src/css.css b/apps/susidns/src/css.css index fcb29457cf4b2579d25d3d8e0977e10d4d4f15b9..e39060eaf5a05e04708246e3c4ceb0de0df8bfdf 100644 --- a/apps/susidns/src/css.css +++ b/apps/susidns/src/css.css @@ -172,3 +172,43 @@ input[type=reset]:hover { opacity: 1.0; -moz-box-shadow: inset 0px 0px 0px 1px #fff; } + +input.accept { + background: #ddf url('/themes/console/images/accept.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.add { + background: #ddf url('/themes/console/images/add.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.cancel { + background: #ddf url('/themes/console/images/cancel.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.delete { + background: #ddf url('/themes/console/images/delete.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.reload { + background: #ddf url('/themes/console/images/arrow_refresh.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.search { + background: #ddf url('/themes/console/images/magnifier.png') no-repeat 2px center; + padding: 2px 3px 2px 24px; + min-height: 22px; +} + +input.search[type="text"] { + background: #eef url('/themes/console/images/magnifier.png') no-repeat 2px center; +} diff --git a/apps/susidns/src/jsp/addressbook.jsp b/apps/susidns/src/jsp/addressbook.jsp index 109425f9d2234c9b005d1cd030a12ecc60952ee3..044c4c5a1469072da103332281f03980cdb90250 100644 --- a/apps/susidns/src/jsp/addressbook.jsp +++ b/apps/susidns/src/jsp/addressbook.jsp @@ -117,8 +117,8 @@ ${book.loadBookMessages} <input type="hidden" name="begin" value="0"> <input type="hidden" name="end" value="99"> <table><tr> -<td class="search"><%=intl._("Search")%>: <input type="text" name="search" value="${book.search}" size="20" ></td> -<td class="search"><input type="submit" name="submitsearch" value="<%=intl._("Search")%>" ></td> +<td class="search"><%=intl._("Search")%>: <input class="search" type="text" name="search" value="${book.search}" size="20" ></td> +<td class="search"><input class="search" type="submit" name="submitsearch" value="<%=intl._("Search")%>" ></td> </tr> </table> </form></div> @@ -167,8 +167,8 @@ ${book.loadBookMessages} <c:if test="${book.master || book.router || book.published || book.private}"> <div id="buttons"> <p class="buttons"> -<input type="reset" value="<%=intl._("Cancel")%>" > -<input type="submit" name="action" value="<%=intl._("Delete Selected")%>" > +<input class="cancel" type="reset" value="<%=intl._("Cancel")%>" > +<input class="delete" type="submit" name="action" value="<%=intl._("Delete Selected")%>" > </p> </div></form> </c:if> @@ -193,9 +193,9 @@ ${book.loadBookMessages} <b><%=intl._("Destination")%></b></td><td><textarea name="destination" rows="1" style="height: 3em;" cols="70" wrap="off" spellcheck="false">${book.destination}</textarea> </td></tr></table> <p class="buttons"> -<input type="reset" value="<%=intl._("Cancel")%>" > -<input type="submit" name="action" value="<%=intl._("Replace")%>" > -<input type="submit" name="action" value="<%=intl._("Add")%>" > +<input class="cancel" type="reset" value="<%=intl._("Cancel")%>" > +<input class="accept" type="submit" name="action" value="<%=intl._("Replace")%>" > +<input class="add" type="submit" name="action" value="<%=intl._("Add")%>" > </p> </div></form> diff --git a/apps/susidns/src/jsp/config.jsp b/apps/susidns/src/jsp/config.jsp index 675797338487b20935697f1a2d53daf599f8f226..23cce5adadc4900af64b849084b49ce547f69427 100644 --- a/apps/susidns/src/jsp/config.jsp +++ b/apps/susidns/src/jsp/config.jsp @@ -69,8 +69,8 @@ <textarea name="config" rows="10" cols="80">${cfg.config}</textarea> </div> <div id="buttons"> -<input type="submit" name="action" value="<%=intl._("Reload")%>" > -<input type="submit" name="action" value="<%=intl._("Save")%>" > +<input class="reload" type="submit" name="action" value="<%=intl._("Reload")%>" > +<input class="accept" type="submit" name="action" value="<%=intl._("Save")%>" > </div> </form> <div id="help"> diff --git a/apps/susidns/src/jsp/details.jsp b/apps/susidns/src/jsp/details.jsp index 042f07ea2be2ab20231600fa94a12bb4030795af..fae6e07201c9e80d386ff8a40b6230d988e28710 100644 --- a/apps/susidns/src/jsp/details.jsp +++ b/apps/susidns/src/jsp/details.jsp @@ -129,7 +129,7 @@ <input type="hidden" name="begin" value="0"> <input type="hidden" name="end" value="99"> <input type="hidden" name="checked" value="<%=detail%>"> -<input type="submit" name="action" value="<%=intl._("Delete Entry")%>" > +<input class="delete" type="submit" name="action" value="<%=intl._("Delete Entry")%>" > </p> </form> </div> diff --git a/apps/susidns/src/jsp/subscriptions.jsp b/apps/susidns/src/jsp/subscriptions.jsp index 8e2a7042f654513f397f5881f51e254f7f766e14..8d1c6c24894a4fad5920c93a631687e5e5f8bf7c 100644 --- a/apps/susidns/src/jsp/subscriptions.jsp +++ b/apps/susidns/src/jsp/subscriptions.jsp @@ -69,8 +69,8 @@ <textarea name="content" rows="10" cols="80">${subs.content}</textarea> </div> <div id="buttons"> -<input type="submit" name="action" value="<%=intl._("Reload")%>" > -<input type="submit" name="action" value="<%=intl._("Save")%>" > +<input class="reload" type="submit" name="action" value="<%=intl._("Reload")%>" > +<input class="accept" type="submit" name="action" value="<%=intl._("Save")%>" > </div> </form> <div id="help"> diff --git a/apps/susimail/src/css.css b/apps/susimail/src/css.css index 380fa797523781faf73945efeeb3044c4c0805ed..8af8b1ae0ee9751fe1f7a5b9f6dc5c89e659c7bc 100644 --- a/apps/susimail/src/css.css +++ b/apps/susimail/src/css.css @@ -129,4 +129,65 @@ form { .mailhead { font-size: 9pt; font-weight: bold; -} \ No newline at end of file +} + +input.cancel, input.clearselection, input.logout { + background: #ddf url('/themes/console/images/cancel.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.delete, input.delete_attachment, input.really_delete { + background: #ddf url('/themes/console/images/delete.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.download, input.lastpage { + background: #ddf url('/themes/console/images/arrow_down.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.firstpage { + background: #ddf url('/themes/console/images/arrow_up.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.forward, input.login, input.nextpage, input.send { + background: #ddf url('/themes/console/images/arrow_right.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.invertselection, input.reload, input.refresh { + background: #ddf url('/themes/console/images/arrow_refresh.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.markall, input.show { + background: #ddf url('/themes/console/images/tick.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.new, input.reply, input.replyall { + background: #ddf url('/themes/console/images/email.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.prevpage { + background: #ddf url('/themes/console/images/arrow_left.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + +input.send, input.setpagesize { + background: #ddf url('/themes/console/images/accept.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + diff --git a/apps/susimail/src/src/i2p/susi/webmail/WebMail.java b/apps/susimail/src/src/i2p/susi/webmail/WebMail.java index 1005c47ded0520b8c80f0b8f2d2e38371779f79a..9df0c53b5fbd60f031fe245f5492d3d42271b00b 100644 --- a/apps/susimail/src/src/i2p/susi/webmail/WebMail.java +++ b/apps/susimail/src/src/i2p/susi/webmail/WebMail.java @@ -346,7 +346,7 @@ public class WebMail extends HttpServlet */ private static String button( String name, String label ) { - return "<input type=\"submit\" name=\"" + name + "\" value=\"" + label + "\">"; + return "<input type=\"submit\" class=\"" + name + "\" name=\"" + name + "\" value=\"" + label + "\">"; } /** * returns html string of a disabled form button with name and label @@ -1601,7 +1601,7 @@ public class WebMail extends HttpServlet "<tr><td align=\"right\" width=\"30%\">" + _("SMTP-Port") + "</td><td width=\"40%\" align=\"left\"><input type=\"text\" size=\"5\" name=\"" + SMTP +"\" value=\"" + smtp + "\"" + ( fixed ? " disabled" : "" ) + "></td></tr>\n"); } out.println( - "<tr><td></td><td align=\"left\">" + button( LOGIN, _("Login") ) + " <input type=\"reset\" value=\"" + _("Reset") + "\"></td></tr>\n" + + "<tr><td></td><td align=\"left\">" + button( LOGIN, _("Login") ) + " <input class=\"cancel\" type=\"reset\" value=\"" + _("Reset") + "\"></td></tr>\n" + "<tr><td></td><td align=\"left\"><a href=\"http://hq.postman.i2p/?page_id=14\">" + _("Learn about I2P mail") + "</a></td></tr>\n" + "<tr><td></td><td align=\"left\"><a href=\"http://hq.postman.i2p/?page_id=16\">" + _("Create Account") + "</a></td></tr>\n" + "</table>"); diff --git a/installer/resources/themes/console/images/arrow_left.png b/installer/resources/themes/console/images/arrow_left.png new file mode 100644 index 0000000000000000000000000000000000000000..5dc696781e6135d37b5bf2e98e46fd94f020c48d Binary files /dev/null and b/installer/resources/themes/console/images/arrow_left.png differ diff --git a/installer/resources/themes/console/images/arrow_up.png b/installer/resources/themes/console/images/arrow_up.png new file mode 100644 index 0000000000000000000000000000000000000000..1ebb193243780b8eb1919a51ef27c2a0d36ccec2 Binary files /dev/null and b/installer/resources/themes/console/images/arrow_up.png differ diff --git a/installer/resources/themes/console/images/email.png b/installer/resources/themes/console/images/email.png new file mode 100644 index 0000000000000000000000000000000000000000..7348aed77fe6a64c2210a202f12c6eccae7fcf24 Binary files /dev/null and b/installer/resources/themes/console/images/email.png differ diff --git a/installer/resources/themes/console/images/magnifier.png b/installer/resources/themes/console/images/magnifier.png new file mode 100644 index 0000000000000000000000000000000000000000..cf3d97f75e9cde9c143980d89272fe61fc2d64ee Binary files /dev/null and b/installer/resources/themes/console/images/magnifier.png differ diff --git a/installer/resources/themes/console/light/console.css b/installer/resources/themes/console/light/console.css index 2a7737ea5fa755ed131f48df05146ef90cf79b99..0b795718f5bbdf55f9c3eef792e07edab7faf4e2 100644 --- a/installer/resources/themes/console/light/console.css +++ b/installer/resources/themes/console/light/console.css @@ -599,6 +599,82 @@ td { border-bottom: 1px outset #99f; } +/***********************************************************************************/ + +#appsummary { + margin-top: 53px; +} + +h2.app { + margin: 15px 10px 15px 0 !important; +} + +h4.app { + clear: left; + margin: 12px 4px; + padding: 20px 0 8px 0; +} + +div.app { + float: left; + padding: 8px; + height: 100px; + width: 112px; +} + +div.appgroup { + clear: left; + margin: 4px 20px; + padding: 16px 8px; + width: auto; +} + +div.search { + margin: 20px; + padding: 8px; + width: auto; +} + +img.app { + height: 48px; + width: 48px; + padding: 8px; +} + +table.app { + background: none; + border: 0; + margin: auto; + width: auto; +} + +tr.app { + background: none; + border: 0; + margin: 0; +} + +td.app { + background: none; + border: 0; + margin: 0; +} + +div.applabel { + background: url('images/header.png') center center repeat-x; + -moz-border-radius: 4px; + -khtml-border-radius: 4px; + border: 2px #00f; + border-radius: 4px; + border-width: 1px; + font-size: 9pt; + margin: 0; + padding: 3px 6px 4px 6px; + text-align: center; +} + +/***********************************************************************************/ + tt { font: bold 8pt "Lucida Console", "DejaVu Sans Mono", Courier, mono; color: #008000; @@ -864,6 +940,12 @@ button.reload { min-height: 22px; } +button.search { + background: #ffe url('../images/magnifier.png') no-repeat 2px center; + padding: 2px 3px 2px 20px; + min-height: 22px; +} + button.stop { background: #ffe url('../images/stop.png') no-repeat 2px center; padding: 2px 3px 2px 20px; @@ -978,6 +1060,12 @@ input.reload { min-height: 22px; } +input.search[type="text"] { + background: #ffe url('../images/magnifier.png') no-repeat 2px center; + padding: 2px 3px 2px 24px; + min-height: 22px; +} + input.stop { background: #ffe url('../images/stop.png') no-repeat 2px center; padding: 2px 3px 2px 20px; diff --git a/installer/resources/themes/console/light/default.css b/installer/resources/themes/console/light/default.css index f51a77944d8fefddbf12954b793d93e6292a58fd..ac16f21db6a2ede1e9a444763c33e261e1e8b4d5 100644 --- a/installer/resources/themes/console/light/default.css +++ b/installer/resources/themes/console/light/default.css @@ -228,7 +228,7 @@ hr { -khtml-border-radius: 4px; border-radius: 4px; margin-top: 8px; - background: #ffe url(images/header.png) center center repeat-x !important; + background: #ffe url(images/header.png) center center repeat-x; text-decoration: none; }