rename tooltip dismissal to hopefully fix this https://rdrama.net/post/172725/no-decline-no-no-no-no

pull/152/head
Aevann 2023-05-24 13:45:59 +03:00
parent 567f6bdf43
commit f1de6cbe58
2 changed files with 2 additions and 2 deletions

View File

@ -362,7 +362,7 @@ def mobile_app(v:Optional[User]):
@limiter.limit('1/second', scope=rpath) @limiter.limit('1/second', scope=rpath)
@limiter.limit(DEFAULT_RATELIMIT) @limiter.limit(DEFAULT_RATELIMIT)
def dismiss_mobile_tip(): def dismiss_mobile_tip():
session["tooltip_last_dismissed"] = int(time.time()) session["tooltip_dismissed"] = int(time.time())
return "", 204 return "", 204
@app.get("/transfers/<int:id>") @app.get("/transfers/<int:id>")

View File

@ -163,7 +163,7 @@
<input hidden id="VAPID_PUBLIC_KEY" value="{{VAPID_PUBLIC_KEY}}"> <input hidden id="VAPID_PUBLIC_KEY" value="{{VAPID_PUBLIC_KEY}}">
{% endif %} {% endif %}
{% if request.path == '/' and g.browser != 'webview' and time.time() > session.get('tooltip_last_dismissed',0)+86400*30 %} {% if request.path == '/' and g.browser != 'webview' and time.time() > session.get('tooltip_dismissed',0)+86400*30 %}
<div id="mobile-prompt-container" class="fixed-top"> <div id="mobile-prompt-container" class="fixed-top">
<div id="mobile-prompt" data-bs-toggle="tooltip" data-bs-container="#mobile-prompt-container" data-bs-placement="top" data-bs-trigger="click" data-bs-html="true" title="<i class='dismiss-beg fas fa-x'></i>Click me to install the {{SITE_NAME}} mobile app!"></div> <div id="mobile-prompt" data-bs-toggle="tooltip" data-bs-container="#mobile-prompt-container" data-bs-placement="top" data-bs-trigger="click" data-bs-html="true" title="<i class='dismiss-beg fas fa-x'></i>Click me to install the {{SITE_NAME}} mobile app!"></div>
</div> </div>