forked from I2P_Developers/i2p.i2p
Console: Add dates to news headings
Spacing for news headings in summary bar
This commit is contained in:
@ -10,6 +10,7 @@ import java.io.OutputStreamWriter;
|
|||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
|
import java.text.DateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -18,6 +19,7 @@ import java.util.List;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import net.i2p.crypto.SU3File;
|
import net.i2p.crypto.SU3File;
|
||||||
import net.i2p.crypto.TrustedUpdate;
|
import net.i2p.crypto.TrustedUpdate;
|
||||||
@ -553,11 +555,19 @@ class NewsFetcher extends UpdateRunner {
|
|||||||
out.write("-->\n");
|
out.write("-->\n");
|
||||||
if (entries == null)
|
if (entries == null)
|
||||||
return;
|
return;
|
||||||
|
DateFormat fmt = DateFormat.getDateInstance(DateFormat.SHORT);
|
||||||
|
// the router sets the JVM time zone to UTC but saves the original here so we can get it
|
||||||
|
String systemTimeZone = _context.getProperty("i2p.systemTimeZone");
|
||||||
|
if (systemTimeZone != null)
|
||||||
|
fmt.setTimeZone(TimeZone.getTimeZone(systemTimeZone));
|
||||||
for (NewsEntry e : entries) {
|
for (NewsEntry e : entries) {
|
||||||
if (e.title == null || e.content == null)
|
if (e.title == null || e.content == null)
|
||||||
continue;
|
continue;
|
||||||
out.write("<!-- Entry Date: " + (new Date(e.updated)) + " -->\n");
|
Date date = new Date(e.updated);
|
||||||
|
out.write("<!-- Entry Date: " + date + " -->\n");
|
||||||
out.write("<h3>");
|
out.write("<h3>");
|
||||||
|
out.write(fmt.format(date));
|
||||||
|
out.write(": ");
|
||||||
out.write(e.title);
|
out.write(e.title);
|
||||||
out.write("</h3>\n");
|
out.write("</h3>\n");
|
||||||
out.write(e.content);
|
out.write(e.content);
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
2015-07-16 zzz
|
||||||
|
* Console: Add dates to news headings
|
||||||
|
|
||||||
2015-07-12 zzz
|
2015-07-12 zzz
|
||||||
* Findbugs all over
|
* Findbugs all over
|
||||||
|
|
||||||
|
@ -251,6 +251,7 @@ div.newsheadings {
|
|||||||
div.newsheadings li {
|
div.newsheadings li {
|
||||||
list-style: none outside url('images/newsbullet_mini.png');
|
list-style: none outside url('images/newsbullet_mini.png');
|
||||||
margin: 0 -4px 2px 8px;
|
margin: 0 -4px 2px 8px;
|
||||||
|
line-height: 140%;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.tunnels {
|
div.tunnels {
|
||||||
|
@ -18,10 +18,10 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 16;
|
public final static long BUILD = 17;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "";
|
public final static String EXTRA = "-rc";
|
||||||
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
System.out.println("I2P Router version: " + FULL_VERSION);
|
System.out.println("I2P Router version: " + FULL_VERSION);
|
||||||
|
Reference in New Issue
Block a user