diff --git a/group_vars/matrix-servers b/group_vars/matrix-servers index 7ded5ff4..facf1b84 100755 --- a/group_vars/matrix-servers +++ b/group_vars/matrix-servers @@ -319,6 +319,8 @@ matrix_riot_web_integrations_jitsi_widget_url: "{{ matrix_dimension_integrations matrix_riot_web_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else false }}" +matrix_riot_web_registration_enabled: "{{ matrix_synapse_enable_registration }}" + ###################################################################### # # /matrix-riot-web diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index 4c6424dc..b1112eee 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -28,3 +28,6 @@ matrix_riot_web_embedded_pages_home_path: ~ # Controls whether the self-check feature should validate SSL certificates. matrix_riot_web_self_check_validate_certificates: true + +# don't show the registration button on welcome page +matrix_riot_web_registration_enabled: false diff --git a/roles/matrix-riot-web/tasks/setup_riot_web.yml b/roles/matrix-riot-web/tasks/setup_riot_web.yml index a8a314b0..62eb750b 100644 --- a/roles/matrix-riot-web/tasks/setup_riot_web.yml +++ b/roles/matrix-riot-web/tasks/setup_riot_web.yml @@ -28,6 +28,7 @@ with_items: - {src: "{{ role_path }}/templates/config.json.j2", name: "config.json"} - {src: "{{ role_path }}/templates/nginx.conf.j2", name: "nginx.conf"} + - {src: "{{ role_path }}/templates/welcome.html.j2", name: "welcome.html"} - {src: "{{ matrix_riot_web_embedded_pages_home_path }}", name: "home.html"} when: "matrix_riot_web_enabled and item.src is not none" diff --git a/roles/matrix-riot-web/templates/systemd/matrix-riot-web.service.j2 b/roles/matrix-riot-web/templates/systemd/matrix-riot-web.service.j2 index 2b57f27c..06f60cc5 100644 --- a/roles/matrix-riot-web/templates/systemd/matrix-riot-web.service.j2 +++ b/roles/matrix-riot-web/templates/systemd/matrix-riot-web.service.j2 @@ -25,6 +25,7 @@ ExecStart=/usr/bin/docker run --rm --name matrix-riot-web \ {% if matrix_riot_web_embedded_pages_home_path is not none %} -v {{ matrix_riot_web_data_path }}/home.html:/etc/riot-web/home.html:ro \ {% endif %} + -v {{ matrix_riot_web_data_path }}/welcome.html:/etc/riot-web/welcome.html:ro \ {{ matrix_riot_web_docker_image }} ExecStop=-/usr/bin/docker kill matrix-riot-web ExecStop=-/usr/bin/docker rm matrix-riot-web diff --git a/roles/matrix-riot-web/templates/welcome.html.j2 b/roles/matrix-riot-web/templates/welcome.html.j2 new file mode 100644 index 00000000..6456e947 --- /dev/null +++ b/roles/matrix-riot-web/templates/welcome.html.j2 @@ -0,0 +1,194 @@ + + +
+ + + +

_t("Welcome to Riot.im")

+

_t("Decentralised, encrypted chat & collaboration powered by [matrix]")

+
+
+ +
_t("Sign In")
+
+{% if matrix_riot_web_registration_enabled %} + +
_t("Create Account")
+
+{% endif %} +
+{% if matrix_riot_web_disable_guests != true %} + + +
+
+
_t("Need help?")
+ +
_t("Chat with Riot Bot")
+
+
+
+
_t("Explore rooms")
+ +
_t("Room Directory")
+
+
+
+ +{% endif %} +
+