diff --git a/snikket_web/__init__.py b/snikket_web/__init__.py index 18493f4..0f1a61a 100644 --- a/snikket_web/__init__.py +++ b/snikket_web/__init__.py @@ -143,6 +143,7 @@ class AppConfig: site_name = environ.var("") avatar_cache_ttl = environ.var(1800, converter=int) languages = environ.var(["de", "en"], converter=autosplit) + apple_store_url = environ.var("") _UPPER_CASE = "".join(map(chr, range(ord("A"), ord("Z")+1))) @@ -172,6 +173,7 @@ def create_app() -> quart.Quart: app.config["SNIKKET_DOMAIN"] = config.domain app.config["SITE_NAME"] = config.site_name or config.domain app.config["AVATAR_CACHE_TTL"] = config.avatar_cache_ttl + app.config["APPLE_STORE_URL"] = config.apple_store_url app.context_processor(proc) app.register_error_handler( diff --git a/snikket_web/invite.py b/snikket_web/invite.py index e5fb977..3aec470 100644 --- a/snikket_web/invite.py +++ b/snikket_web/invite.py @@ -7,6 +7,7 @@ import aiohttp import quart.flask_patch from quart import ( Blueprint, + current_app, render_template, redirect, url_for, @@ -68,9 +69,7 @@ async def view(id_: str) -> str: ), ) ) - apple_store_url = ( - "https://apps.apple.com/us/app/tigase-messenger/id1153516838" - ) + apple_store_url = current_app.config["APPLE_STORE_URL"] return await render_template( "invite_view.html", diff --git a/snikket_web/templates/invite_view.html b/snikket_web/templates/invite_view.html index 9c48f24..aff42e8 100644 --- a/snikket_web/templates/invite_view.html +++ b/snikket_web/templates/invite_view.html @@ -17,11 +17,17 @@
{% trans site_name=config["SITE_NAME"] %}You have been invited to chat on {{ site_name }} using Snikket, a secure, privacy-friendly chat app.{% endtrans %}
{%- endif -%}{% trans %}Install the Snikket App on your Android or iOS device.{% endtrans %}
+{%- else -%} +{% trans ios_info_url="https://snikket.org/faq/#is-there-an-ios-app" %}Install the Snikket App on your Android device (iOS coming soon!).{% endtrans %}
+{%- endif -%}