forked from rDrama/rDrama
1
0
Fork 0

add effortpost search parameter

master
Aevann 2024-02-07 02:13:00 +02:00
parent 179c0fbdf3
commit 8c7cf48df7
2 changed files with 7 additions and 0 deletions

View File

@ -111,6 +111,7 @@ def searchposts(v):
posts = posts.filter(*words)
if 'nsfw' in criteria: posts = posts.filter(Post.nsfw==True)
if 'effortpost' in criteria: posts = posts.filter(Post.effortpost==True)
if 'domain' in criteria:
domain = criteria['domain']

View File

@ -90,6 +90,12 @@
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">nsfw:true</button>
</div>
{% endif %}
{% if request.path.startswith('/search/posts') %}
<div>
<div style="display: inline-block; width: 150px; text-align: center">Effortpost:</div>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="addParam(this, 'bool')" class="searchparam mb-1">effortpost:true</button>
</div>
{% endif %}
{% endif %}
</div>
</div>