manage and export followers
This commit is contained in:
parent
7b057ea8c6
commit
c0af8fb862
5 changed files with 27 additions and 7 deletions
|
@ -58,7 +58,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</summary>
|
||||
<span class="action" id="profile_actions">
|
||||
<span class="action">
|
||||
{% if user == request.user %}
|
||||
{% if user.locked %}
|
||||
<span>
|
||||
|
|
|
@ -58,10 +58,15 @@ def max_visiblity_to(viewer, owner):
|
|||
|
||||
def query_visible(user):
|
||||
return (
|
||||
Q(visibility=0)
|
||||
| Q(owner_id__in=user.following if user.is_authenticated else [], visibility=1)
|
||||
| Q(owner_id=user.id)
|
||||
) & ~Q(owner_id__in=user.ignoring)
|
||||
(
|
||||
Q(visibility=0)
|
||||
| Q(owner_id__in=user.following, visibility=1)
|
||||
| Q(owner_id=user.id)
|
||||
)
|
||||
& ~Q(owner_id__in=user.ignoring)
|
||||
if user.is_authenticated
|
||||
else Q(visibility=0)
|
||||
)
|
||||
|
||||
|
||||
def query_following(user):
|
||||
|
|
|
@ -92,6 +92,12 @@
|
|||
{% include 'users/relationship_list.html' with name="关注" id="follow" list=request.user.local_following.all %}
|
||||
</details>
|
||||
</article>
|
||||
<article id="local_following">
|
||||
<details>
|
||||
<summary>{% trans '关注了你的用户' %}</summary>
|
||||
{% include 'users/relationship_list.html' with name="关注者" id="follower" list=request.user.local_followers.all %}
|
||||
</details>
|
||||
</article>
|
||||
<article>
|
||||
<details>
|
||||
<summary>{% trans '已隐藏的用户' %}</summary>
|
||||
|
|
|
@ -13,6 +13,15 @@
|
|||
<span class="tag-list">
|
||||
<span><a>{{ relationship.status }}</a></span>
|
||||
</span>
|
||||
{% else %}
|
||||
<span style="padding-bottom:1em;display:inline-block"> </span>
|
||||
{% endif %}
|
||||
{% if show_home %}
|
||||
<span>
|
||||
<a title="用户主页" href="{{ user.url }}">
|
||||
<i class="fa-solid fa-home"></i>
|
||||
</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if relationship.following %}
|
||||
{% if relationship.unfollowable %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% for user in list %}
|
||||
<p style="border-bottom: gray 1px dashed; padding-bottom:4px;">
|
||||
<span class="action">{% include 'users/profile_actions.html' %}</span>
|
||||
<span class="action">{% include 'users/profile_actions.html' with show_home=1 %}</span>
|
||||
<code class="{{ id }}_handler"
|
||||
style="cursor:pointer"
|
||||
onmouseleave="$(this).removeAttr('data-tooltip')"
|
||||
|
@ -15,7 +15,7 @@
|
|||
<a id="download_{{ id }}" title="导出列表" download="neodb_{{ id }}.csv"><i class="fa-solid fa-download"></i></a>
|
||||
</span>
|
||||
</span>
|
||||
此处只列出你在{{ site_name }}{{ name }}的用户,联邦宇宙{{ name }}列表可在你所属实例查询管理。
|
||||
此处只列出你在{{ site_name }}{{ name }},联邦宇宙{{ name }}列表可在你所属实例查询管理。
|
||||
</p>
|
||||
<script>
|
||||
let csv = "data:text/csv;charset=utf-8,Account address,Show boosts,Notify on new posts,Languages\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue