Skip to content

Commit

Permalink
Susimail: Show user name on folder view
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzi2p committed Dec 23, 2023
1 parent cb5cdbe commit 0b88668
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions apps/susimail/src/src/i2p/susi/webmail/WebMail.java
Original file line number Diff line number Diff line change
Expand Up @@ -3277,7 +3277,7 @@ private static void showFolder( PrintWriter out, SessionObject sessionObject, Ma
}
folder.setCurrentPage(page);
}
showPageButtons(out, folderName, page, folder.getPages(), true);
showPageButtons(out, sessionObject.user, folderName, page, folder.getPages(), true);
out.println("</div>");

String curSort = folder.getCurrentSortBy();
Expand Down Expand Up @@ -3406,7 +3406,7 @@ else if (isSpamFolder)
if (folder.getPages() > 1 && i > 30) {
// show the buttons again if page is big
out.println("<div class=\"topbuttons\">");
showPageButtons(out, folderName, page, folder.getPages(), false);
showPageButtons(out, sessionObject.user, folderName, page, folder.getPages(), false);
out.println("</div>");
}
}
Expand All @@ -3415,8 +3415,13 @@ else if (isSpamFolder)
* Folder selector, then, if pages greater than 1:
* first prev next last
*/
private static void showPageButtons(PrintWriter out, String folderName, int page, int pages, boolean outputHidden) {
private static void showPageButtons(PrintWriter out, String user, String folderName, int page, int pages, boolean outputHidden) {
out.println("<table id=\"pagenav\"><tr><td>");
if (!user.contains("@")) {
String domain = Config.getProperty( CONFIG_SENDER_DOMAIN, "mail.i2p" );
user += '@' + domain;
}
out.println(DataHelper.escapeHTML(user) + "&nbsp;&nbsp;&nbsp;&nbsp;");
String name = folderName.equals(DIR_FOLDER) ? "Inbox" : folderName;
out.println(_t("Folder") + ": " + _t(name) + "&nbsp;&nbsp;&nbsp;&nbsp;"); // TODO css to center it
out.println(button(SWITCH_TO, _t("Change to Folder") + ':'));
Expand Down

0 comments on commit 0b88668

Please sign in to comment.