diff options
author | Andrew Godwin | 2022-11-17 20:04:01 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-17 20:04:01 -0700 |
commit | b3072c81ba73a16381366960841b6c294cc1fa6e (patch) | |
tree | 707cf2f966dd030fc2a5e866f50711ab87a40870 /templates | |
parent | adf2449d373bcd07e2b0ce557beeb1f49d1894e4 (diff) | |
download | takahe-b3072c81ba73a16381366960841b6c294cc1fa6e.tar.gz takahe-b3072c81ba73a16381366960841b6c294cc1fa6e.tar.bz2 takahe-b3072c81ba73a16381366960841b6c294cc1fa6e.zip |
Follows page
Diffstat (limited to 'templates')
-rw-r--r-- | templates/identity/view.html | 29 | ||||
-rw-r--r-- | templates/settings/_menu.html | 3 | ||||
-rw-r--r-- | templates/settings/follows.html | 25 |
3 files changed, 47 insertions, 10 deletions
diff --git a/templates/identity/view.html b/templates/identity/view.html index f877f59..d584022 100644 --- a/templates/identity/view.html +++ b/templates/identity/view.html @@ -13,16 +13,25 @@ <img src="{{ identity.local_icon_url }}" class="icon"> {% if request.identity %} - <form action="{{ identity.urls.action }}" method="POST" class="inline follow"> - {% csrf_token %} - {% if follow %} - <input type="hidden" name="action" value="unfollow"> - <button>Unfollow</button> - {% else %} - <input type="hidden" name="action" value="follow"> - <button>Follow</button> - {% endif %} - </form> + {% if identity == request.identity %} + <form class="inline follow"> + <a class="button" href="{% url "settings_profile" %}">Edit Profile</a> + </form> + {% else %} + <form action="{{ identity.urls.action }}" method="POST" class="inline follow {% if reverse_follow %}has-reverse{% endif %}"> + {% csrf_token %} + {% if reverse_follow %} + <span class="reverse-follow">Follows You</span> + {% endif %} + {% if follow %} + <input type="hidden" name="action" value="unfollow"> + <button>Unfollow</button> + {% else %} + <input type="hidden" name="action" value="follow"> + <button>Follow</button> + {% endif %} + </form> + {% endif %} {% endif %} {{ identity.name_or_handle }} <small>@{{ identity.handle }}</small> diff --git a/templates/settings/_menu.html b/templates/settings/_menu.html index cc87941..dd43912 100644 --- a/templates/settings/_menu.html +++ b/templates/settings/_menu.html @@ -6,6 +6,9 @@ <a href="{% url "settings_interface" %}" {% if section == "interface" %}class="selected"{% endif %}> <i class="fa-solid fa-display"></i> Interface </a> + <a href="{% url "settings_follows" %}" {% if section == "follows" %}class="selected"{% endif %}> + <i class="fa-solid fa-arrow-right-arrow-left"></i> Follows + </a> {% if request.user.admin %} <h3>Account</h3> <a href="{% url "settings_security" %}" {% if section == "security" %}class="selected"{% endif %}> diff --git a/templates/settings/follows.html b/templates/settings/follows.html new file mode 100644 index 0000000..5f43d05 --- /dev/null +++ b/templates/settings/follows.html @@ -0,0 +1,25 @@ +{% extends "settings/base.html" %} + +{% block subtitle %}Follows{% endblock %} + +{% block content %} + <section class="icon-menu"> + {% for identity, details in identities %} + <a class="option" href="{{ identity.urls.view }}"> + <img src="{{ identity.local_icon_url }}"> + <span class="handle"> + {{ identity.name_or_handle }} + <small>@{{ identity.handle }}</small> + </span> + {% if details.outbound %} + <span class="pill">Following</span> + {% endif %} + {% if details.inbound %} + <span class="pill">Follows You</span> + {% endif %} + </a> + {% empty %} + <p class="option empty">You have no follows.</p> + {% endfor %} + </section> +{% endblock %} |