more descriptive remote follow errors

- distinguish between invalid username, user not found, and remote follow not supported
- make helpers DRYer
This commit is contained in:
Hugh Rundle
2021-12-06 09:29:51 +11:00
parent c77edab79c
commit 781fe69470
4 changed files with 83 additions and 38 deletions

View File

@ -14,10 +14,10 @@
{% endblock %}
{% block heading %}
{% if not request.user.is_authenticated and not error == 'remote_subscribe' %}
{% trans "Let's log in first..." %}
{% elif error %}
{% if error %}
{% trans 'Uh oh...' %}
{% elif not request.user.is_authenticated %}
{% trans "Let's log in first..." %}
{% else %}
{% blocktrans with sitename=site.name %}Follow from {{ sitename }}{% endblocktrans %}
{% endif %}