Link subscriptions in settings to their respective feeds

This commit is contained in:
spikecodes 2021-11-21 22:30:44 -08:00
parent 768820cd4c
commit 7220190811
4 changed files with 54 additions and 47 deletions

View file

@ -77,7 +77,9 @@
<p>Subscribed Feeds</p>
{% for sub in prefs.subscriptions %}
<div>
<span>{% if sub.starts_with("u_") -%}{{ format!("u/{}", &sub[2..]) }}{% else -%}{{ format!("r/{}", sub) }}{% endif -%}</span>
{% let feed -%}
{% if sub.starts_with("u_") -%}{% let feed = format!("u/{}", &sub[2..]) -%}{% else -%}{% let feed = format!("r/{}", sub) -%}{% endif -%}
<a href="/{{ feed }}">{{ feed }}</a>
<form action="/r/{{ sub }}/unsubscribe/?redirect=settings" method="POST">
<button class="unsubscribe">Unsubscribe</button>
</form>