SusiDNS changes:

- Additional column on hostname list page for helper address with icon, and
  iconfication of b32 addresses
- Added minified identicon to hostname column
- Changed destination address display on list/details from textarea to div to
  accomodate automatic height adjustment (no need to manually specify height and
  hope for the best)
  - Also allows us to display the full Destination on the details page
- Tooltips for eraser icon + new address helper icon & minified identicons
- Consolidation of Hostname/host name/name referenced: now all "Hostname"
- Theme tweaks and whitespace removal
This commit is contained in:
str4d
2017-02-10 16:37:15 +00:00
parent a22bf6b4a4
commit bfe8c65628
12 changed files with 1198 additions and 321 deletions

View File

@@ -174,7 +174,7 @@ public class AddressbookBean extends BaseBean
try { fis.close(); } catch (IOException ioe) {}
}
if( message.length() > 0 )
message = "<p>" + message + "</p>";
message = "<p id=\"filtered\">" + message + "</p>";
return message;
}

View File

@@ -59,7 +59,6 @@
</div>
<hr>
<div id="navi">
<p>
<a id="overview" href="index"><%=intl._t("Overview")%></a>&nbsp;
<a class="abook" href="addressbook?book=private"><%=intl._t("Private")%></a>&nbsp;
<a class="abook" href="addressbook?book=master"><%=intl._t("Master")%></a>&nbsp;
@@ -67,7 +66,6 @@
<a class="abook" href="addressbook?book=published"><%=intl._t("Published")%></a>&nbsp;
<a id="subs" href="subscriptions"><%=intl._t("Subscriptions")%></a>&nbsp;
<a id="config" href="config"><%=intl._t("Configuration")%></a>
</p>
</div>
<hr>
<div class="headline" id="addressbook">
@@ -91,7 +89,8 @@ ${book.loadBookMessages}
<input type="hidden" name="filter" value="${book.filter}">
</c:if>
<input type="submit" class="export" value="<%=intl._t("Export in hosts.txt format")%>" />
</div></form>
</div>
</form>
<% } /* book.getEntries().length() > 0 */ %>
<div id="filter">
@@ -105,7 +104,7 @@ ${book.loadBookMessages}
<p>
<a href="addressbook?filter=a&amp;begin=0&amp;end=49">a</a>
<a href="addressbook?filter=b&amp;begin=0&amp;end=49">b</a>
<a href="addressbook?filter=c&amp;begin=0&amp;end=49">c</a>
<a href="addressbook?filter=c&amp;begin=0&amp;end=49">c</a>
<a href="addressbook?filter=d&amp;begin=0&amp;end=49">d</a>
<a href="addressbook?filter=e&amp;begin=0&amp;end=49">e</a>
<a href="addressbook?filter=f&amp;begin=0&amp;end=49">f</a>
@@ -131,19 +130,22 @@ ${book.loadBookMessages}
<a href="addressbook?filter=z&amp;begin=0&amp;end=49">z</a>
<a href="addressbook?filter=0-9&amp;begin=0&amp;end=49">0-9</a>
<a href="addressbook?filter=xn--&amp;begin=0&amp;end=49"><%=intl._t("other")%></a>
<a href="addressbook?filter=none&amp;begin=0&amp;end=49"><%=intl._t("all")%></a></p>
<a href="addressbook?filter=none&amp;begin=0&amp;end=49"><%=intl._t("all")%></a>
</p>
</div>
<div id="search">
<form method="POST" action="addressbook">
<input type="hidden" name="begin" value="0">
<input type="hidden" name="end" value="49">
<table><tr>
<table>
<tr>
<td class="search"><%=intl._t("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._t("Search")%>" ></td>
</tr>
</table>
</form></div>
</form>
</div>
</c:if>
<%
@@ -157,32 +159,37 @@ ${book.loadBookMessages}
<input type="hidden" name="end" value="49">
<jsp:setProperty name="book" property="trClass" value="0" />
<div id="book">
<table class="book" cellspacing="0" cellpadding="5">
<table class="book" id="host_list" cellspacing="0" cellpadding="5">
<tr class="head">
<% if (book.getEntries().length > 0) { /* Don't show if no results. Can't figure out how to do this with c:if */ %>
<th><%=intl._t("Hostname")%></th>
<th><%=intl._t("Link (b32)")%></th>
<th>Helper</th>
<th>Details</th>
<th><%=intl._t("Destination")%></th>
<c:if test="${book.validBook}">
<th></th>
<th title="<%=intl._t("Select hosts for deletion from addressbook")%>"></th>
</c:if>
<% if (book.getEntries().length > 0) { /* Don't show if no results. Can't figure out how to do this with c:if */ %>
<th><%=intl._t("Name")%></th>
<th colspan="2"><%=intl._t("Links")%></th>
<th><%=intl._t("Destination")%></th>
</tr>
<!-- limit iterator, or "Form too large" may result on submit, and is a huge web page if we don't -->
<c:forEach items="${book.entries}" var="addr" begin="${book.resultBegin}" end="${book.resultEnd}">
<tr class="list${book.trClass}">
<td class="names"><a href="/imagegen/id?s=256&amp;c=${addr.b32}" target="_blank" title="<%=intl._t("View larger version of identicon for this hostname")%>"><img src="/imagegen/id?s=20&amp;c=${addr.b32}"></a><a href="http://${addr.name}/" target="_top">${addr.displayName}</a></td>
<td class="names"><span class="addrhlpr"><a href="http://${addr.b32}/" target="_blank" title="<%=intl._t("Base 32 address")%>">b32</a></span></td>
<td class="helper"><a href="http://${addr.name}/?i2paddresshelper=${addr.destination}" target="_blank" title="<%=intl._t("Helper link to share host address with option to add to addressbook")%>">link</a></td>
<td class="names"><span class="addrhlpr"><a href="details?h=${addr.name}" title="<%=intl._t("More information on this entry")%>"><%=intl._t("details")%></a></span></td>
<td class="destinations"><div class="destaddress" name="dest_${addr.name}" width="200px">${addr.destination}</div></td>
<c:if test="${book.validBook}">
<td class="checkbox"><input type="checkbox" name="checked" value="${addr.name}" title="<%=intl._t("Mark for deletion")%>"></td>
</c:if>
<td class="names"><a href="http://${addr.name}/" target="_top">${addr.displayName}</a>
</td><td class="names">
<span class="addrhlpr"><a href="http://${addr.b32}/" target="_top" title="<%=intl._t("Base 32 address")%>">b32</a></span>
</td><td class="names">
<span class="addrhlpr"><a href="details?h=${addr.name}" title="<%=intl._t("More information on this entry")%>"><%=intl._t("details")%></a></span>
</td>
<td class="destinations"><textarea rows="1" style="height:3em;" wrap="off" cols="40" readonly="readonly" name="dest_${addr.name}" >${addr.destination}</textarea></td>
</tr>
</c:forEach>
<% } /* book..getEntries().length() > 0 */ %>
</table>
@@ -212,18 +219,24 @@ ${book.loadBookMessages}
<input type="hidden" name="begin" value="0">
<input type="hidden" name="end" value="49">
<div id="add">
<h3><%=intl._t("Add new destination")%>:</h3>
<table><tr><td>
<b><%=intl._t("Host Name")%></b></td><td><input type="text" name="hostname" value="${book.hostname}" size="54">
</td></tr><tr><td>
<b><%=intl._t("Destination")%></b></td><td><textarea name="destination" rows="1" style="height:3em" wrap="off" cols="70" spellcheck="false">${book.destination}</textarea>
</td></tr></table>
<h3><%=intl._t("Add new destination")%></h3>
<table>
<tr>
<td><b><%=intl._t("Hostname")%></b></td>
<td><input type="text" name="hostname" value="${book.hostname}" size="54"></td>
</tr>
<tr>
<td><b><%=intl._t("Destination")%></b></td>
<td><textarea name="destination" rows="1" style="height:3em" wrap="off" cols="70" spellcheck="false">${book.destination}</textarea></td>
</tr>
</table>
<p class="buttons">
<input class="cancel" type="reset" value="<%=intl._t("Cancel")%>" >
<input class="accept" type="submit" name="action" value="<%=intl._t("Replace")%>" >
<input class="add" type="submit" name="action" value="<%=intl._t("Add")%>" >
</p>
</div></form>
</div>
</form>
<div id="footer">
<hr>

View File

@@ -53,9 +53,9 @@
<div class="page">
<div id="logo">
<a href="index"><img src="<%=base.getTheme()%>images/logo.png" alt="" title="<%=intl._t("Overview")%>" border="0"/></a>
</div><hr>
</div>
<hr>
<div id="navi">
<p>
<a id="overview" href="index"><%=intl._t("Overview")%></a>&nbsp;
<a class="abook" href="addressbook?book=private"><%=intl._t("Private")%></a>&nbsp;
<a class="abook" href="addressbook?book=master"><%=intl._t("Master")%></a>&nbsp;
@@ -63,7 +63,6 @@
<a class="abook" href="addressbook?book=published"><%=intl._t("Published")%></a>&nbsp;
<a id="subs" href="subscriptions"><%=intl._t("Subscriptions")%></a>&nbsp;
<a id="config" href="config"><%=intl._t("Configuration")%></a>
</p>
</div>
<hr>
<div class="headline" id="config">

View File

@@ -53,7 +53,6 @@
</div>
<hr>
<div id="navi">
<p>
<a id="overview" href="index"><%=intl._t("Overview")%></a>&nbsp;
<a class="abook" href="addressbook?book=private"><%=intl._t("Private")%></a>&nbsp;
<a class="abook" href="addressbook?book=master"><%=intl._t("Master")%></a>&nbsp;
@@ -61,14 +60,12 @@
<a class="abook" href="addressbook?book=published"><%=intl._t("Published")%></a>&nbsp;
<a id="subs" href="subscriptions"><%=intl._t("Subscriptions")%></a>&nbsp;
<a id="config" href="config"><%=intl._t("Configuration")%></a>
</p>
</div>
<hr>
<div class="headline">
<h3><%=intl._t("Address book")%>: <%=intl._t(book.getBook())%></h3>
<h4><%=intl._t("Storage")%>: ${book.displayName}</h4>
</div>
<div id="book">
<%
String detail = request.getParameter("h");
@@ -84,56 +81,70 @@
String b32 = addr.getB32();
%>
<jsp:setProperty name="book" property="trClass" value="0" />
<table class="book" cellspacing="0" cellpadding="5">
<table class="book" id="host_details" cellspacing="0" cellpadding="5">
<tr class="list${book.trClass}">
<td><%=intl._t("Host Name")%></td>
<td><%=intl._t("Hostname")%></td>
<td><a href="http://<%=addr.getName()%>/" target="_top"><%=addr.getDisplayName()%></a></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<%
if (addr.isIDN()) {
%>
<td><%=intl._t("Encoded Name")%></td>
<td><a href="http://<%=addr.getName()%>/" target="_top"><%=addr.getName()%></a></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<%
}
%>
<td><%=intl._t("Base 32 Address")%></td>
<td><a href="http://<%=b32%>/" target="_top"><%=b32%></a></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<td><%=intl._t("Base 64 Hash")%></td>
<td><%=addr.getB64()%></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<td><%=intl._t("Address Helper")%></td>
<td><a href="http://<%=addr.getName()%>/?i2paddresshelper=<%=addr.getDestination()%>" target="_top"><%=intl._t("link")%></a></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<td><%=intl._t("Public Key")%></td>
<td><%=intl._t("ElGamal 2048 bit")%></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<td><%=intl._t("Signing Key")%></td>
<td><%=addr.getSigType()%></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<td><%=intl._t("Certificate")%></td>
<td><%=addr.getCert()%></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<td><%=intl._t("Added Date")%></td>
<td><%=addr.getAdded()%></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<td><%=intl._t("Validated")%></td>
<td><%=addr.isValidated() ? intl._t("yes") : intl._t("no")%></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<td><%=intl._t("Source")%></td>
<td><%=addr.getSource()%></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<td><%=intl._t("Last Modified")%></td>
<td><%=addr.getModded()%></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<td><%=intl._t("Notes")%></td>
<td><%=addr.getNotes()%></td>
</tr><tr class="list${book.trClass}">
</tr>
<tr class="list${book.trClass}">
<td><%=intl._t("Destination")%></td>
<td class="destinations"><textarea rows="1" style="height:3em;" wrap="off" cols="70" readonly="readonly" ><%=addr.getDestination()%></textarea></td>
</tr></table>
<td class="destinations"><div class="destaddress"><%=addr.getDestination()%></div></td>
</tr>
</table>
</div>
<div id="buttons">
<form method="POST" action="addressbook">
@@ -146,11 +157,17 @@
</p>
</form>
</div>
<div><table><tr><td>
<img src="/imagegen/id?s=320&amp;c=<%=addr.getB64().replace("=", "%3d")%>" width="320" height="320">
</td><td>
<img src="/imagegen/qr?s=320&amp;t=<%=addr.getName()%>&amp;c=http%3a%2f%2f<%=addr.getName()%>%2f%3fi2paddresshelper%3d<%=addr.getDestination()%>">
</td></tr></table>
<div id="visualid">
<h3><%=intl._t("Visual Identification for")%> <%=addr.getName()%></h3>
<table>
<tr>
<td><img src="/imagegen/id?s=256&amp;c=<%=addr.getB64().replace("=", "%3d")%>" width="256" height="256"></td>
<td><img src="/imagegen/qr?s=384&amp;t=<%=addr.getName()%>&amp;c=http%3a%2f%2f<%=addr.getName()%>%2f%3fi2paddresshelper%3d<%=addr.getDestination()%>"></td>
</tr>
<tr>
<td colspan="2"><a class="fakebutton" href="/imagegen" title="<%=intl._t("Create your own identification images")%>" target="_blank"><%=intl._t("Launch Image Generator")%></a></td>
</tr>
</table>
<hr>
<%
} // foreach addr

View File

@@ -54,7 +54,6 @@
</div>
<hr>
<div id="navi">
<p>
<a id="overview" href="index"><%=intl._t("Overview")%></a>&nbsp;
<a class="abook" href="addressbook?book=private"><%=intl._t("Private")%></a>&nbsp;
<a class="abook" href="addressbook?book=master"><%=intl._t("Master")%></a>&nbsp;
@@ -62,7 +61,6 @@
<a class="abook" href="addressbook?book=published"><%=intl._t("Published")%></a>&nbsp;
<a id="subs" href="subscriptions"><%=intl._t("Subscriptions")%></a>&nbsp;
<a id="config" href="config"><%=intl._t("Configuration")%></a>
</p>
</div>
<hr>
<div id="content">

View File

@@ -54,7 +54,6 @@
<a href="index"><img src="<%=subs.getTheme()%>images/logo.png" alt="" title="<%=intl._t("Overview")%>" border="0"/></a>
</div><hr>
<div id="navi">
<p>
<a id="overview" href="index"><%=intl._t("Overview")%></a>&nbsp;
<a class="abook" href="addressbook?book=private"><%=intl._t("Private")%></a>&nbsp;
<a class="abook" href="addressbook?book=master"><%=intl._t("Master")%></a>&nbsp;
@@ -62,7 +61,6 @@
<a class="abook" href="addressbook?book=published"><%=intl._t("Published")%></a>&nbsp;
<a id="subs" href="subscriptions"><%=intl._t("Subscriptions")%></a>&nbsp;
<a id="config" href="config"><%=intl._t("Configuration")%></a>
</p>
</div>
<hr>
<div class="headline" id="subscriptions">