improve and bugfix remote follow templates

This commit is contained in:
Hugh Rundle 2021-11-29 15:33:26 +11:00
parent 587b0194fc
commit 7b65edf10b
No known key found for this signature in database
GPG key ID: CD23D6039184286B
4 changed files with 16 additions and 10 deletions

View file

@ -7,7 +7,7 @@
<div class="columns">
<div class="column">
<form name="login" method="post" action="{% url 'login' %}?next={{ request.path }}?acct={{ account }}">
<form name="login" method="post" action="{% url 'login' %}?next={{ request.path }}?acct={{ user.remote_id }}">
{% csrf_token %}
<div class="columns is-variable is-1">
<div class="column">
@ -52,4 +52,7 @@
</div>
{% endif %}
</div>
<div class="block is-pulled-right">
<a href="" onclick="closeWindow()">Close window</a>
</div>
{% endblock %}

View file

@ -24,7 +24,7 @@
</span>
<span class="subtitle is-7 is-block">@{{ user|username }}</span>
</a>
<p>Follow {{ user.display_name }} from another Fediverse account like Bookwyrm, Mastodon, or Pleroma.</p>
<p>{% blocktrans %}Follow {{ user.display_name }} from another Fediverse account like Bookwyrm, Mastodon, or Pleroma.{% endblocktrans %}</p>
</div>
</div>
</div>
@ -33,8 +33,8 @@
<section class="card-content content">
<form name="remote-follow" method="post" action="{% url 'remote-follow' %}">
{% csrf_token %}
<input type="hidden" name="user" value="{{ user.username }}">
<label class="label" for="remote_user">User handle to follow from:</label>
<input type="hidden" name="user" value="{{ user.id }}">
<label class="label" for="remote_user">{% trans 'User handle to follow from:' %}</label>
<input class="input" type="text" name="remote_user" id="remote_user" placeholder="user@example.social">
<button class="button mt-1 is-primary" type="submit">{% trans 'Follow!' %}</button>
</form>

View file

@ -19,7 +19,7 @@
{% elif error %}
{% trans 'Uh oh...' %}
{% else %}
{% blocktrans %}Follow from {{ site.name }}{% endblocktrans %}
{% trans 'Follow from ' %}{{ site.name }}
{% endif %}
{% endblock %}
@ -48,7 +48,7 @@
<form name="follow" method="post" action="{% url 'follow' %}/?next={% url 'ostatus-success' %}?following={{ user.username }}">
{% csrf_token %}
<input name="user" value={{ user.username }} hidden>
<button class="button is-link" type="submit">{% trans "Follow " %} {{ user.name }}</button>
<button class="button is-link" type="submit">{% trans "Follow " %} {{ user.display_name }}</button>
</form>
</div>
</div>

View file

@ -22,11 +22,14 @@
<span class="subtitle is-7 is-block">@{{ user|username }}</span>
</a>
</div>
<!-- TODO: this shoudl be a big tick instead -->
<a href="{{ user.local_path }}" class="media-left">
{% include 'snippets/avatar.html' with user=user large=True %}
</a>
</div>
<p class="notification is-success">
<span class="icon icon-check m-0-mobile" aria-hidden="true"></span>
<span>{% trans 'You are now following ' %}{{ user.display_name }}! </span>
</p>
</div>
</div>
<div class="block is-pulled-right">
<a href="" onclick="closeWindow()">Close window</a>
</div>
{% endblock %}