commit 251ba71de9ce116f8380f61fdcf3937038acabb6 Author: Raphael Bergmann raphael@cc-ltd.net Date: Fri Mar 10 15:27:42 2017 +0100
Moved "Not recommended"-flag to a new properties column / section --- css/style.css | 4 ++++ img/flags/not_recommended_16x16.png | Bin 323 -> 0 bytes img/properties/not_recommended_16x16.png | Bin 0 -> 260 bytes js/models/relay.js | 6 ------ templates/details/bridge.html | 14 ++++++++++++++ templates/details/router.html | 14 ++++++++++++++ templates/search/do.html | 8 ++++++++ 7 files changed, 40 insertions(+), 6 deletions(-)
diff --git a/css/style.css b/css/style.css index 9173215..f0d5326 100644 --- a/css/style.css +++ b/css/style.css @@ -81,6 +81,10 @@ pre { padding: 5px; }
+input { + width:150px; +} + @media screen and (max-width: 980px) { .splash h1 { font-size:40px; diff --git a/img/flags/not_recommended_16x16.png b/img/flags/not_recommended_16x16.png deleted file mode 100644 index b8a3634..0000000 Binary files a/img/flags/not_recommended_16x16.png and /dev/null differ diff --git a/img/properties/not_recommended_16x16.png b/img/properties/not_recommended_16x16.png new file mode 100644 index 0000000..8d702c5 Binary files /dev/null and b/img/properties/not_recommended_16x16.png differ diff --git a/js/models/relay.js b/js/models/relay.js index c69288a..a578e99 100644 --- a/js/models/relay.js +++ b/js/models/relay.js @@ -55,9 +55,6 @@ define([ if (flag == "Exit") { output.push([flag,"cloud_download_"+size[0], "This relay is more useful for building general-purpose exit circuits than for relay circuits."]); } - if (flag == "Not Recommended") { - output.push([flag,"not_recommended_"+size[0], "This relay is running a software version that is not recommended by the directory authorities."]); - } }); return output; }, @@ -194,9 +191,6 @@ define([ relay.fingerprint = relay.hashed_fingerprint ? relay.hashed_fingerprint : relay.fingerprint; model.set({badexit: false}); var size = ['16x16', '14x16', '8x16']; - if (relay.recommended_version===false) { - relay.flags.push("Not Recommended"); - } relay.flags = model.parseflags(relay.flags, size); model.set(relay, options); success(model, relay); diff --git a/templates/details/bridge.html b/templates/details/bridge.html index 0398b11..4d4d666 100644 --- a/templates/details/bridge.html +++ b/templates/details/bridge.html @@ -50,6 +50,20 @@ </span> <% }); %> </dd> + + <dt><span class="tip" title="" data-original-title="Properties">Properties</span></dt> + <dd> + <% var propertyCount = 0; %> + <% if (relay.get('recommended_version') === false) { + propertyCount++; + %> + <span class="tip flags" title="This relay is running a software version that is not recommended by the directory authorities."> + <img class="inline" alt="" src="img/properties/not_recommended_16x16.png"/> + <span class="inline">Not recommended</span> + </span> + <% } %> + <%=propertyCount==0?'none':''%> + </dd>
<dt><span class="tip" title="Date and time when the bridge was last (re-)started." data-original-title="Last restarted">Last Restarted</span></dt> <dd><%= relay.get('last_restarted') %></dd> diff --git a/templates/details/router.html b/templates/details/router.html index 24bcb2b..79b4b70 100644 --- a/templates/details/router.html +++ b/templates/details/router.html @@ -82,6 +82,20 @@ </span> <% }); %> </dd> + + <dt><span class="tip" title="" data-original-title="Properties">Properties</span></dt> + <dd> + <% var propertyCount = 0; %> + <% if (relay.get('recommended_version') === false) { + propertyCount++; + %> + <span class="tip flags" title="This relay is running a software version that is not recommended by the directory authorities."> + <img class="inline" alt="" src="img/properties/not_recommended_16x16.png"/> + <span class="inline">Not recommended</span> + </span> + <% } %> + <%=propertyCount==0?'none':''%> + </dd>
<dt><span class="tip" title="Country as found in a GeoIP database by resolving the relay's first onion-routing address." data-original-title="Country">Country</span></dt> <dd><% if (relay.get('country')) { %><img class="inline country" title="<%= relay.get('countryname') %>" alt="" src="img/cc/<%= relay.get('country') %>.png"/> <%= relay.get('countryname') %><% } else { %>Unknown<% } %></dd> diff --git a/templates/search/do.html b/templates/search/do.html index cd07a61..8a0a34c 100644 --- a/templates/search/do.html +++ b/templates/search/do.html @@ -60,6 +60,7 @@ <th>Country</th> <th>IP</th> <th>Flags</th> + <th>Properties</th> <th>ORPort</th> <th>DirPort</th> <th>Type</th> @@ -96,6 +97,11 @@ <img class="tip inline flags" src="img/flags/<%= flag[1] %>.png" alt="<%= flag[0] %>" title="<%= flag[0] %><br /><%= flag[2] %>"/> <% }); %> </td> + <td> + <% if (relay.get('recommended_version') === false) { %> + <img class="tip inline flags" src="img/properties/not_recommended_16x16.png" alt="Not recommended" title="Not recommended<br />This relay is running a software version that is not recommended by the directory authorities."/> + <% } %> + </td> <td><%= relay.get('or_port') %></td> <td><%= relay.get('dir_port') %></td> <td> @@ -132,6 +138,8 @@ <th> <input type="text" id="flags" name="flags" placeholder="Flags" class="search_init"> </th> + <th> + </th> <th> <input type="text" id="or_port" name="or_port" placeholder="ORPort" class="search_init span1"> </th>