From e12941eab02cd431d0eea23752aa225c49efe7dc Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 15 Dec 2023 14:41:17 +0000 Subject: [PATCH] Improve user name/JID display Show the display name more prominently (if one is set), as it is more "friendly" name. The JID is now displayed instead of just the username, as this makes it more clear what is being displayed. The inspiration for this change was the observation that many users on my own server have the same display name and username, causing a repetitive list like: Jane jane Robert robert Sally sally Steven steven In addition, some accounts do not have a display name set, so it was not obvious why some people had their name rendered once, and some twice, and why the capitalization differences. --- snikket_web/scss/app.scss | 7 +++++++ snikket_web/templates/library.j2 | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/snikket_web/scss/app.scss b/snikket_web/scss/app.scss index 063a1ef..016b434 100644 --- a/snikket_web/scss/app.scss +++ b/snikket_web/scss/app.scss @@ -1304,4 +1304,11 @@ pre.guru-meditation { margin-left: 0.5em; } + .user-display-name { + font-size: 110%; + } + + .user-jid { + font-size: 90%; + } } diff --git a/snikket_web/templates/library.j2 b/snikket_web/templates/library.j2 index bb0cef2..9e5c660 100644 --- a/snikket_web/templates/library.j2 +++ b/snikket_web/templates/library.j2 @@ -25,10 +25,10 @@ {%- endif -%}
-
{{- user.localpart -}}
{%- if user.display_name %}
{{- user.display_name -}}
{%- endif %} +
{{- user.localpart -}}@{{- config["SNIKKET_DOMAIN"] -}}
{%- endmacro -%}