-
{{ config["SNIKKET_DOMAIN"] }}
+{{ config["SITE_NAME"] }}
{{ _("Enter your Snikket address and password to manage your account.") }}
diff --git a/example.env b/example.env index a1a85f4..00e69ce 100644 --- a/example.env +++ b/example.env @@ -30,6 +30,13 @@ SNIKKET_WEB_PROSODY_ENDPOINT='http://localhost:5280' # This must be set for login to work correctly. SNIKKET_WEB_DOMAIN='localhost' +# A human-friendly name for the Snikket server. +# +# This should not be too wide when rendered to fit into the layout. +# Defaults to SNIKKET_WEB_DOMAIN. +# +#SNIKKET_WEB_SITE_NAME + # OPTIONAL SETTINGS # ================= diff --git a/snikket_web/__init__.py b/snikket_web/__init__.py index ae77d84..8068042 100644 --- a/snikket_web/__init__.py +++ b/snikket_web/__init__.py @@ -140,6 +140,7 @@ class AppConfig: secret_key = environ.var() prosody_endpoint = environ.var() domain = environ.var() + site_name = environ.var("") avatar_cache_ttl = environ.var(1800, converter=int) languages = environ.var(["de", "en"], converter=autosplit) @@ -169,6 +170,7 @@ def create_app() -> quart.Quart: app.config["SECRET_KEY"] = config.secret_key app.config["PROSODY_ENDPOINT"] = config.prosody_endpoint 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.context_processor(proc) diff --git a/snikket_web/templates/about.html b/snikket_web/templates/about.html index 317858d..b6e2f7f 100644 --- a/snikket_web/templates/about.html +++ b/snikket_web/templates/about.html @@ -9,13 +9,14 @@
{% trans snikket_url="https://snikket.org" %}To learn more about Snikket, visit the Snikket website.{% endtrans %}
{% trans domain=config["SNIKKET_DOMAIN"] %}This is the Snikket server {{ domain }}.{% endtrans %}
+{% trans site_name=config["SITE_NAME"] %}This is the Snikket server {{ site_name }}.{% endtrans %}
{% trans agpl_url="https://www.gnu.org/licenses/agpl.html" %}The web portal software is licensed under the terms of the Affero GNU General Public License, version 3.0 or later. The full terms of the license can be reviewed using the aforementioned link.{% endtrans %}
{% trans source_url="https://github.com/snikket-im/snikket-web-portal/" %}The source code of the web portal can be downloaded and viewed in its GitHub repository.{% endtrans %}
{% trans source_url="https://material.io/resources/icons/", apache20_url="https://www.apache.org/licenses/LICENSE-2.0.txt" %}The icons used in the web portal are Google’s Material Icons, made available by Google under the terms of the Apache 2.0 License.{% endtrans %}
Snikket Server (unknown)
+ Snikket Server
+Domain: {{ config["SNIKKET_DOMAIN"] }}
Snikket Web Portal ({{ version }})
{%- if extra_versions -%}
{% for name, version in extra_versions.items() %}
diff --git a/snikket_web/templates/login.html b/snikket_web/templates/login.html
index 24c3691..44334df 100644
--- a/snikket_web/templates/login.html
+++ b/snikket_web/templates/login.html
@@ -10,7 +10,7 @@
{% endblock %}
{% block body %}