Hide Android app menu on sites without app.

master
Snakes 2022-08-06 17:32:35 -04:00
parent 1bacb9cf9d
commit 4fddb88c1a
3 changed files with 8 additions and 3 deletions

View File

@ -1055,5 +1055,6 @@ DISCORD_WELCOME_CHANNEL = "846509313941700618"
has_sidebar = path.exists(f'files/templates/sidebar_{SITE_NAME}.html')
has_logo = path.exists(f'files/assets/images/{SITE_NAME}/logo.webp')
has_app = path.exists(f'files/assets/app_{SITE_NAME}_v2.4.apk')
GLOBAL = environ.get("GLOBAL")
GLOBAL = environ.get("GLOBAL")

View File

@ -57,5 +57,5 @@ def inject_constants():
"HOLE_NAME": HOLE_NAME, "HOLE_STYLE_FLAIR": HOLE_STYLE_FLAIR, "HOLE_REQUIRED": HOLE_REQUIRED,
"LOTTERY_ENABLED": LOTTERY_ENABLED, "GUMROAD_LINK": GUMROAD_LINK,
"DEFAULT_THEME": DEFAULT_THEME, "DESCRIPTION": DESCRIPTION,
"has_sidebar": has_sidebar, "has_logo": has_logo,
"has_sidebar": has_sidebar, "has_logo": has_logo, "has_app": has_app,
"FP": FP, "NOTIF_MODACTION_JL_MIN": NOTIF_MODACTION_JL_MIN}

View File

@ -226,7 +226,9 @@
<button class="dropdown-item copy-link" data-clipboard-text="{{SITE_FULL}}/signup?ref={{v.username}}"><i class="fas fa-user-friends fa-fw mr-3"></i>Invite friends</button>
</div>
<div class="px-2">
{% if has_app -%}
<a class="dropdown-item" href="/assets/app_{{SITE_NAME}}_v2.4.apk"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
{%- endif %}
<a class="dropdown-item" href="https://rdrama.net/h/changelog"><i class="fas fa-clipboard fa-fw mr-3"></i>Changelog</a>
@ -291,7 +293,9 @@
</li>
{% endif %}
<a class="nav-item nav-link" href="/assets/app_{{SITE_NAME}}_v2.4.apk"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
{% if has_app -%}
<a class="nav-item nav-link" href="/assets/app_{{SITE_NAME}}_v2.4.apk"><i class="fab fa-android fa-fw mr-3"></i>Android app</a>
{%- endif %}
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="https://github.com/Aevann1/rDrama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a>