add an About Me page which shows the short and full ids

pull/42/head
Zlatin Balevsky 2020-03-19 17:08:35 +00:00
parent d93dbbeb8b
commit a9539c5999
5 changed files with 54 additions and 0 deletions

View File

@ -422,6 +422,10 @@ pre.comment {
word-wrap: break-word;
}
pre.fullId {
overflow: auto;
}
/* File tree CSS */
/* Remove default bullets */

View File

@ -29,6 +29,8 @@ public class Util {
// a file, but it's not worth it for just a handful.
private static final String[] jsStrings = {
// alphabetical please
_x("About"),
_x("About Me"),
_x("Actions"),
_x("Active Sources"),
_x("Browse"),
@ -122,6 +124,8 @@ public class Util {
_x("User"),
_x("View 1 Certificate"),
_x("View {0} Certificates"),
_x("Your full MuWire id is"),
_x("Your short MuWire id is {0}"),
_x("Your Trust"),
_x("{0}% of piece")
};

View File

@ -0,0 +1,33 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.muwire.webui.*" %>
<%@ page import="com.muwire.core.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@include file="initcode.jsi"%>
<%
String pagetitle=Util._t("About Me");
Core core = (Core) application.getAttribute("core");
%>
<html>
<head>
<%@include file="css.jsi"%>
</head>
<body onload="initConnectionsCount();">
<%@include file="header.jsi"%>
<aside>
<%@include file="searchbox.jsi"%>
<%@include file="sidebar.jsi"%>
</aside>
<section class="main foldermain">
<p><%=Util._t("Your short MuWire id is {0}", core.getMe().getHumanReadableName())%></p>
<p><%=Util._t("Your full MuWire id is")%></p>
<p><pre class="fullId"><%=core.getMe().toBase64()%></pre></p>
</section>
</body>
</html>

View File

@ -74,6 +74,14 @@
<div class="menu-text"><%=Util._t("Settings")%></div>
</a>
</div>
<div class="menubox-divider"></div>
<div class="menubox">
<h2><%=Util._t("About")%></h2>
<a class="menuitem settings" href="AboutMe">
<div class="menu-icon"></div>
<div class="menu-text"><%=Util._t("About Me")%></div>
</a>
</div>
<!--
<div class="menubox-divider"></div>
<div class="menubox">

View File

@ -198,4 +198,9 @@ Mappings without the .jsp suffix
<url-pattern>/Feeds</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>com.muwire.webui.AboutMe_jsp</servlet-name>
<url-pattern>/AboutMe</url-pattern>
</servlet-mapping>
</web-app>