From de2c5b710aadcce18276e973a3dff0073a499963 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Fri, 25 Oct 2024 13:14:56 +1300 Subject: [PATCH] instance block on user profile --- app/static/styles.css | 4 ++++ app/static/styles.scss | 4 ++++ app/templates/user/show_profile.html | 35 ++++++++++++++++++++-------- app/user/routes.py | 24 +++++++++++++++++++ 4 files changed, 57 insertions(+), 10 deletions(-) diff --git a/app/static/styles.css b/app/static/styles.css index 80fe04cc..483abd1c 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -514,6 +514,10 @@ a { display: none; } +.display-inline { + display: inline; +} + .skip-link { position: absolute; top: -40px; /* Adjust as needed to hide the link off-screen */ diff --git a/app/static/styles.scss b/app/static/styles.scss index 29d0130c..bb025d78 100644 --- a/app/static/styles.scss +++ b/app/static/styles.scss @@ -68,6 +68,10 @@ a { } } +.display-inline { + display: inline; +} + .skip-link { position: absolute; top: -40px; /* Adjust as needed to hide the link off-screen */ diff --git a/app/templates/user/show_profile.html b/app/templates/user/show_profile.html index 4a2b6066..3210316d 100644 --- a/app/templates/user/show_profile.html +++ b/app/templates/user/show_profile.html @@ -77,17 +77,32 @@ {% if user.matrix_user_id %} {{ _('Send message using Matrix') }} {% endif %} - {% if current_user.has_blocked_user(user.id) %} - {{ _('Unblock') }} - {% else %} - {{ _('Block') }} - {% endif %} - {{ _('Report') }} - {% endif %} - {% if user.is_local() %} - {{ _('Follow') }} - {% endif %} + {% if user.is_local() -%} + {{ _('Follow') }} + {% endif -%} + +
{{ _('Instance') }}: {{ user.instance_domain() }}
{{ _('Joined') }}: {{ arrow.get(user.created).humanize(locale=locale) }}
diff --git a/app/user/routes.py b/app/user/routes.py
index 141be32e..86a14e33 100644
--- a/app/user/routes.py
+++ b/app/user/routes.py
@@ -574,6 +574,29 @@ def block_profile(actor):
return redirect(goto)
+@bp.route('/u/