show instance name after display name

This commit is contained in:
rimu 2024-10-23 21:35:44 +13:00
parent 401df0cc58
commit 5b386ec190
4 changed files with 10 additions and 3 deletions

View file

@ -736,9 +736,9 @@ class User(UserMixin, db.Model):
def display_name(self):
if self.deleted is False:
if self.title:
return self.title
return self.title.strip()
else:
return self.user_name
return self.user_name.strip()
else:
return '[deleted]'

View file

@ -1150,6 +1150,9 @@ time {
border-radius: 50%;
vertical-align: bottom;
}
.render_username .text-muted {
font-size: 13px;
}
.comments > .comment {
margin-left: 0;

View file

@ -764,6 +764,10 @@ time {
border-radius: 50%;
vertical-align: bottom;
}
.text-muted {
font-size: 13px;
}
}
.comments > .comment {

View file

@ -7,7 +7,7 @@
{% if user.avatar_id and not low_bandwidth and not collapsed -%}
<img src="{{ user.avatar_thumbnail() }}" alt="" loading="lazy" />
{% endif -%}
{{ user.display_name() }}
{{ user.display_name() }}{% if not user.is_local() %}<span class="text-muted">@{{ user.ap_domain }}</span>{% endif %}
</a>
{% if user.created_recently() -%}
<span class="fe fe-new-account" title="New account"> </span>