From: David ‘Bombe’ Roden Date: Fri, 12 Nov 2010 11:31:42 +0000 (+0100) Subject: Add notifications for new posts and replies. X-Git-Tag: 0.2.2~1 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=8a8b60858ae83812bf9c7e1898850f5dade69f82;p=Sone.git Add notifications for new posts and replies. --- diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index bc149d8..2da12e4 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -197,5 +197,7 @@ WebInterface.SelectBox.Choose=Choose… WebInterface.SelectBox.Yes=Yes WebInterface.SelectBox.No=No WebInterface.ClickToShow.Replies=Click here to show hidden replies. +WebInterface.Notification.NewPostCount=You have new posts: +WebInterface.Notification.NewReplyCount=You have new replies: Warning.PluginNotConnected.Text=The Web of Trust plugin could not be found! This can happen if the Web of Trust plugin is not loaded or if your node is currently still starting up. In the first case, load the Web of Trust plugin using the {link}plugin manager{/link}, in the second case wait until the Web of Trust plugin has been loaded, because in either case Sone will not be working unless the Web of Trust plugin is loaded! diff --git a/src/main/resources/static/css/sone.css b/src/main/resources/static/css/sone.css index 5f3e938..fb7587f 100644 --- a/src/main/resources/static/css/sone.css +++ b/src/main/resources/static/css/sone.css @@ -53,6 +53,21 @@ textarea { margin-bottom: 1em; } +#sone #notification-area .notification { + padding: 1ex; + border: solid 1px #ccc; + background-color: #ffffa0; + margin-bottom: 1ex; +} + +#sone #notification-area .notification > div { + display: inline; +} + +#sone #notification-area .notification .post-count { + margin-left: 1ex; +} + #sone #plugin-warning { border: solid 0.5em red; padding: 0.5em; diff --git a/src/main/resources/templates/include/head.html b/src/main/resources/templates/include/head.html index 809bd57..deb020c 100644 --- a/src/main/resources/templates/include/head.html +++ b/src/main/resources/templates/include/head.html @@ -133,6 +133,31 @@ }); + +
<%if !webInterface.core.identityManager.connected>