mirror of
https://github.com/jointakahe/takahe.git
synced 2024-12-23 05:56:29 +00:00
Show when a follow is pending
This commit is contained in:
parent
9415ebb4f4
commit
8729baaea4
2 changed files with 9 additions and 1 deletions
|
@ -31,7 +31,9 @@
|
|||
{% endif %}
|
||||
{% if follow %}
|
||||
<input type="hidden" name="action" value="unfollow">
|
||||
<button class="destructive">Unfollow</button>
|
||||
<button class="destructive">
|
||||
{% if follow.pending %}Follow Pending{% else %}Unfollow{% endif %}
|
||||
</button>
|
||||
{% else %}
|
||||
<input type="hidden" name="action" value="follow">
|
||||
<button>Follow</button>
|
||||
|
|
|
@ -167,6 +167,12 @@ class Follow(StatorModel):
|
|||
"source", "source__domain", "target"
|
||||
).aget(pk=self.pk)
|
||||
|
||||
### Helper properties ###
|
||||
|
||||
@property
|
||||
def pending(self):
|
||||
return self.state in [FollowStates.unrequested, FollowStates.local_requested]
|
||||
|
||||
### ActivityPub (outbound) ###
|
||||
|
||||
def to_ap(self):
|
||||
|
|
Loading…
Reference in a new issue