From 7a45c651d2cb8775b56e9df839f64a31e8d39b1d Mon Sep 17 00:00:00 2001 From: Julian Foad Date: Mon, 24 Feb 2020 13:55:00 +0000 Subject: [PATCH 01/16] Use new syntax for default HS/IS in Riot config. This change makes no difference in itself, but is a pre-requisite for adding the 'server name' config, and the old syntax is deprecated. --- roles/matrix-riot-web/templates/config.json.j2 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/roles/matrix-riot-web/templates/config.json.j2 b/roles/matrix-riot-web/templates/config.json.j2 index 69fb1393..6fc79077 100644 --- a/roles/matrix-riot-web/templates/config.json.j2 +++ b/roles/matrix-riot-web/templates/config.json.j2 @@ -1,6 +1,12 @@ { - "default_hs_url": {{ matrix_riot_web_default_hs_url|string|to_json }}, - "default_is_url": {{ matrix_riot_web_default_is_url|string|to_json }}, + "default_server_config": { + "m.homeserver": { + "base_url": {{ matrix_riot_web_default_hs_url|string|to_json }}, + }, + "m.identity_server": { + "base_url": {{ matrix_riot_web_default_is_url|string|to_json }} + } + }, "disable_custom_urls": {{ matrix_riot_web_disable_custom_urls|to_json }}, "disable_guests": {{ matrix_riot_web_disable_guests|to_json }}, "brand": {{ matrix_riot_web_brand|to_json }}, From 3228cfd229b74c05e3bab520c0ec45f5bb8f015e Mon Sep 17 00:00:00 2001 From: Julian Foad Date: Mon, 24 Feb 2020 14:00:43 +0000 Subject: [PATCH 02/16] Add custom server name string in Riot config. This adds into the Riot config.json the field 'default_server_config.m.homeserver.server_name' with, by default, the value of the playbook's 'matrix_domain' variable. Riot displays this string in its login page and will now say 'Sign in to your Matrix account on example.org' (the server name) instead of 'Sign in ... on matrix.example.org' (the server domain-name). This string can be configured by setting the playbook variable 'matrix_riot_web_default_server_name' to any string, so we can make Riot say for example 'Sign in ... on Our Server'. --- roles/matrix-riot-web/defaults/main.yml | 1 + roles/matrix-riot-web/templates/config.json.j2 | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index 05f6b796..cec6c8ea 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -17,6 +17,7 @@ matrix_riot_web_container_extra_arguments: [] matrix_riot_web_systemd_required_services_list: ['docker.service'] # Riot config.json customizations +matrix_riot_web_default_server_name: "{{ matrix_domain }}" matrix_riot_web_default_hs_url: "" matrix_riot_web_default_is_url: ~ matrix_riot_web_disable_custom_urls: true diff --git a/roles/matrix-riot-web/templates/config.json.j2 b/roles/matrix-riot-web/templates/config.json.j2 index 6fc79077..16a0cf4c 100644 --- a/roles/matrix-riot-web/templates/config.json.j2 +++ b/roles/matrix-riot-web/templates/config.json.j2 @@ -2,6 +2,7 @@ "default_server_config": { "m.homeserver": { "base_url": {{ matrix_riot_web_default_hs_url|string|to_json }}, + "server_name": {{ matrix_riot_web_default_server_name|string|to_json }} }, "m.identity_server": { "base_url": {{ matrix_riot_web_default_is_url|string|to_json }} From 0703c31e11ed813632c692e8e2fa42e123ea5754 Mon Sep 17 00:00:00 2001 From: Julian Foad Date: Mon, 24 Feb 2020 14:55:08 +0000 Subject: [PATCH 03/16] Document the new Riot server name setting. --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f5f62f4..53ee3295 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +# 2020-02-24 + +## Customize the server name in Riot's login page + +You can now customize the server name string that Riot-web displays in its login page. + +These playbook variables, with these default values, have been added: + +``` +matrix_riot_web_default_server_name: "{{ matrix_domain }}" +``` + +The login page previously said "Sign in to your Matrix account on matrix.example.org" (the homeserver's domain name). It will now say "Sign in ... on example.org" (the server name) by default, or "Sign in ... on Our Server" if you set the variable to "Our Server". + +To support this, the config.json template is changed to use the configuration key `default_server_config` for setting the default HS/IS, and the new configuration key `server_name` is added in there. + + # 2020-01-30 ## Disabling TLSv1.1 From dc5eaddc3d18904a43be6f4c3a40826d77b7be67 Mon Sep 17 00:00:00 2001 From: iLyas Bakouch Date: Tue, 25 Feb 2020 19:01:32 -0500 Subject: [PATCH 04/16] quick typo --- docs/configuring-playbook-bridge-appservice-webhooks.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/configuring-playbook-bridge-appservice-webhooks.md b/docs/configuring-playbook-bridge-appservice-webhooks.md index 0e355359..a4851146 100644 --- a/docs/configuring-playbook-bridge-appservice-webhooks.md +++ b/docs/configuring-playbook-bridge-appservice-webhooks.md @@ -28,18 +28,18 @@ matrix_appservice_webhooks_log_level: '' 4. If you're using the [Dimension Integration Manager](configuring-playbook-dimension.md), you can configure the Webhooks bridge by opening the Dimension integration manager -> Settings -> Bridges and selecting edit action for "Webhook Bridge". Press "Add self-hosted Bridge" button and populate "Provisioning URL" & "Shared Secret" values from `/matrix/appservice-webhooks/config/config.yaml` file's homeserver URL value and provisioning secret value, respectively. -4. Invite the bridge bot user to your room: +5. Invite the bridge bot user to your room: - either with `/invite @_webhook:` (*Note*: Make sure you have administration permissions in your room) - or simply add the bridge bot to a private channel (personal channels imply you being an administrator) -5. Send a message to the bridge bot in order to receive a private message including the webhook link. +6. Send a message to the bridge bot in order to receive a private message including the webhook link. ``` !webhook ``` -6. The JSON body for posting messages will have to look like this: +7. The JSON body for posting messages will have to look like this: ```json { "text": "Hello world!", From 37f3a2d5a80124d7be897a748e6f1476c62909f0 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 26 Feb 2020 08:40:25 +0200 Subject: [PATCH 05/16] Add support for themes to riot-web --- .gitignore | 1 + CHANGELOG.md | 9 ++++ docs/configuring-playbook-riot-web.md | 11 +++++ roles/matrix-riot-web/defaults/main.yml | 15 ++++++ roles/matrix-riot-web/tasks/main.yml | 6 +++ .../tasks/prepare_riot_web_themes.yml | 48 +++++++++++++++++++ .../matrix-riot-web/templates/config.json.j2 | 3 ++ 7 files changed, 93 insertions(+) create mode 100644 roles/matrix-riot-web/tasks/prepare_riot_web_themes.yml diff --git a/.gitignore b/.gitignore index d373e258..e3f61b55 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /inventory/* !/inventory/.gitkeep !/inventory/host_vars/.gitkeep +/roles/*/files/scratchpad diff --git a/CHANGELOG.md b/CHANGELOG.md index 53ee3295..32153869 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# 2020-02-26 + +## Riot-web themes are here + +The playbook now makes it easy to install custom riot-web themes. + +To learn more, take a look at our [riot-web documentation on Themes](docs/configuring-playbook-riot-web.md#themes). + + # 2020-02-24 ## Customize the server name in Riot's login page diff --git a/docs/configuring-playbook-riot-web.md b/docs/configuring-playbook-riot-web.md index af8e2175..11907308 100644 --- a/docs/configuring-playbook-riot-web.md +++ b/docs/configuring-playbook-riot-web.md @@ -27,3 +27,14 @@ Alternatively, **if there is no pre-defined variable** for a riot-web setting yo - or, you can **extend and override the default configuration** ([`config.json.j2`](../roles/matrix-riot-web/templates/config.json.j2)) by making use of the `matrix_riot_web_configuration_extension_json_` variable. You can find information about this in [`roles/matrix-riot-web/defaults/main.yml`](../roles/matrix-riot-web/defaults/main.yml). - or, if extending the configuration is still not powerful enough for your needs, you can **override the configuration completely** using `matrix_riot_web_configuration_default` (or `matrix_riot_web_configuration`). You can find information about this in [`roles/matrix-riot-web/defaults/main.yml`](../roles/matrix-riot-web/defaults/main.yml). + + +## Themes + +To change the look of riot-web, you can define your own themes manually by using the `matrix_riot_web_settingDefaults_custom_themes` setting. + +Or better yet, you can automatically pull it all themes provided by the [aaronraimist/riot-web-themes](https://github.com/aaronraimist/riot-web-themes) project by simply flipping a flag (`matrix_riot_web_themes_enabled: true`). + +If you make your own theme, we encourage you to submit it to the **aaronraimist/riot-web-themes** project, so that the whole community could easily enjoy it. + +Note that for a custom theme to work well, all riot-web/riot-desktop instances that you use must have the same theme installed. diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index cec6c8ea..f4d1c233 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -45,6 +45,21 @@ matrix_riot_web_registration_enabled: false # Controls whether Riot shows the presence features matrix_riot_web_enable_presence_by_hs_url: ~ +# Controls whether custom riot-web themes will be installed. +# When enabled, all themes found in the `matrix_riot_web_themes_repository_url` repository +# will be installed and enabled automatically. +matrix_riot_web_themes_enabled: false +matrix_riot_web_themes_repository_url: https://github.com/aaronraimist/riot-web-themes + +# Controls the `settingsDefault.custom_themes` setting of the riot-web configuration. +# You can use this setting to define custom themes. +# +# Also, look at `matrix_riot_web_themes_enabled` for a way to pull in a bunch of custom themes automatically. +# If you define your own themes here and set `matrix_riot_web_themes_enabled: true`, your themes will be preserved as well. +# +# Note that for a custom theme to work well, all riot-web/riot-desktop instances that you use must have the same theme installed. +matrix_riot_web_settingDefaults_custom_themes: [] + # Default riot-web configuration template which covers the generic use case. # You can customize it by controlling the various variables inside it. # diff --git a/roles/matrix-riot-web/tasks/main.yml b/roles/matrix-riot-web/tasks/main.yml index 5792517e..a5b4aff5 100644 --- a/roles/matrix-riot-web/tasks/main.yml +++ b/roles/matrix-riot-web/tasks/main.yml @@ -8,6 +8,12 @@ - setup-all - setup-riot-web +- import_tasks: "{{ role_path }}/tasks/prepare_riot_web_themes.yml" + when: run_setup|bool + tags: + - setup-all + - setup-riot-web + - import_tasks: "{{ role_path }}/tasks/setup_riot_web.yml" when: run_setup|bool tags: diff --git a/roles/matrix-riot-web/tasks/prepare_riot_web_themes.yml b/roles/matrix-riot-web/tasks/prepare_riot_web_themes.yml new file mode 100644 index 00000000..4171db3a --- /dev/null +++ b/roles/matrix-riot-web/tasks/prepare_riot_web_themes.yml @@ -0,0 +1,48 @@ +--- + +# +# Tasks related to setting up riot-web themes +# + +- block: + - name: Ensure riot-web themes repository is pulled + git: + repo: "{{ matrix_riot_web_themes_repository_url }}" + dest: "{{ role_path }}/files/scratchpad/riot-web-themes" + + - name: Find all riot-web theme files + find: + paths: "{{ role_path }}/files/scratchpad/riot-web-themes" + patterns: "*.json" + recurse: true + register: matrix_riot_web_theme_file_list + + - name: Read riot-web theme + slurp: + path: "{{ item.path }}" + register: "matrix_riot_web_theme_file_contents" + with_items: "{{ matrix_riot_web_theme_file_list.files }}" + + - name: Load riot-web theme + set_fact: + matrix_riot_web_settingDefaults_custom_themes: "{{ matrix_riot_web_settingDefaults_custom_themes + [item['content'] | b64decode | from_json] }}" + with_items: "{{ matrix_riot_web_theme_file_contents.results }}" + + run_once: true + delegate_to: 127.0.0.1 + become: false + when: matrix_riot_web_themes_enabled|bool + + +# # +# # Tasks related to getting rid of riot-web themes (if it was previously enabled) +# # + +- name: Ensure riot-web themes repository is removed + file: + path: "{{ role_path }}/files/scratchpad/riot-web-themes" + state: absent + run_once: true + delegate_to: 127.0.0.1 + become: false + when: "not matrix_riot_web_themes_enabled|bool" diff --git a/roles/matrix-riot-web/templates/config.json.j2 b/roles/matrix-riot-web/templates/config.json.j2 index 16a0cf4c..635c06f5 100644 --- a/roles/matrix-riot-web/templates/config.json.j2 +++ b/roles/matrix-riot-web/templates/config.json.j2 @@ -8,6 +8,9 @@ "base_url": {{ matrix_riot_web_default_is_url|string|to_json }} } }, + "settingDefaults": { + "custom_themes": {{ matrix_riot_web_settingDefaults_custom_themes|to_json }} + }, "disable_custom_urls": {{ matrix_riot_web_disable_custom_urls|to_json }}, "disable_guests": {{ matrix_riot_web_disable_guests|to_json }}, "brand": {{ matrix_riot_web_brand|to_json }}, From d5e5572f2c68c1aa0c5a8a9f788e2f9f0758ed23 Mon Sep 17 00:00:00 2001 From: Stefan Warnat Date: Mon, 2 Mar 2020 18:36:58 +0100 Subject: [PATCH 06/16] switch Port, which is exposed to same, which is internal used --- .../templates/systemd/matrix-appservice-webhooks.service.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/matrix-bridge-appservice-webhooks/templates/systemd/matrix-appservice-webhooks.service.j2 b/roles/matrix-bridge-appservice-webhooks/templates/systemd/matrix-appservice-webhooks.service.j2 index f83e7346..cde798df 100644 --- a/roles/matrix-bridge-appservice-webhooks/templates/systemd/matrix-appservice-webhooks.service.j2 +++ b/roles/matrix-bridge-appservice-webhooks/templates/systemd/matrix-appservice-webhooks.service.j2 @@ -23,7 +23,7 @@ ExecStart=/usr/bin/docker run --rm --name matrix-appservice-webhooks \ --cap-drop=ALL \ --network={{ matrix_docker_network }} \ {% if matrix_appservice_webhooks_container_http_host_bind_port %} - -p {{ matrix_appservice_webhooks_container_http_host_bind_port }}:{{matrix_appservice_webhooks_webhooks_port}} \ + -p {{ matrix_appservice_webhooks_container_http_host_bind_port }}:{{matrix_appservice_webhooks_matrix_port}} \ {% endif %} -v {{ matrix_appservice_webhooks_config_path }}:/config:z \ -v {{ matrix_appservice_webhooks_data_path }}:/data:z \ From 209e7165802d6935f4c6623ab3d8763cdbaeedd1 Mon Sep 17 00:00:00 2001 From: tctovsli Date: Tue, 3 Mar 2020 09:08:37 +0100 Subject: [PATCH 07/16] New version of matrix-riot-web --- roles/matrix-riot-web/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index f4d1c233..be19fef9 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -1,6 +1,6 @@ matrix_riot_web_enabled: true -matrix_riot_web_docker_image: "vectorim/riot-web:v1.5.10" +matrix_riot_web_docker_image: "vectorim/riot-web:v1.5.11" matrix_riot_web_docker_image_force_pull: "{{ matrix_riot_web_docker_image.endswith(':latest') }}" matrix_riot_web_data_path: "{{ matrix_base_data_path }}/riot-web" From be6c048abe434178a4c296139fa6429b3f163065 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 3 Mar 2020 12:38:21 +0200 Subject: [PATCH 08/16] Remove useless matrix_appservice_webhooks_webhooks_port In relation to #392 (Github Issue) --- group_vars/matrix_servers | 2 +- roles/matrix-bridge-appservice-webhooks/defaults/main.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 1c7ac23f..192d4338 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -72,7 +72,7 @@ matrix_appservice_webhooks_enabled: false # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-webhooks over the container network. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose # matrix-appservice-webhooks' client-server port to the local host. -matrix_appservice_webhooks_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:{{ matrix_appservice_webhooks_webhooks_port }}' }}" +matrix_appservice_webhooks_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:{{ matrix_appservice_webhooks_matrix_port }}' }}" matrix_appservice_webhooks_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.as.token') | to_uuid }}" diff --git a/roles/matrix-bridge-appservice-webhooks/defaults/main.yml b/roles/matrix-bridge-appservice-webhooks/defaults/main.yml index 09daa22b..1b2c9940 100644 --- a/roles/matrix-bridge-appservice-webhooks/defaults/main.yml +++ b/roles/matrix-bridge-appservice-webhooks/defaults/main.yml @@ -21,9 +21,8 @@ matrix_appservice_webhooks_user_prefix: '_webhook' # Controls the webhooks_PORT and MATRIX_PORT of the installation matrix_appservice_webhooks_matrix_port: 6789 -matrix_appservice_webhooks_webhooks_port: 6788 -# Controls whether the appservice-webhooks container exposes its HTTP port (tcp/6788 in the container). +# Controls whether the appservice-webhooks container exposes its HTTP port (tcp/6789 in the container). # # Takes an ":" or "" value (e.g. "127.0.0.1:9999"), or empty string to not expose. matrix_appservice_webhooks_container_http_host_bind_port: '' From a727e7c4978ef963e5f19ef70d7b12eb5f55535c Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 3 Mar 2020 17:32:22 +0200 Subject: [PATCH 09/16] Upgrade Synapse (v1.11.0 -> v1.11.1) --- roles/matrix-synapse/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/matrix-synapse/defaults/main.yml b/roles/matrix-synapse/defaults/main.yml index 1564b843..05ad9126 100644 --- a/roles/matrix-synapse/defaults/main.yml +++ b/roles/matrix-synapse/defaults/main.yml @@ -3,7 +3,7 @@ matrix_synapse_enabled: true -matrix_synapse_docker_image: "matrixdotorg/synapse:v1.11.0" +matrix_synapse_docker_image: "matrixdotorg/synapse:v1.11.1" matrix_synapse_docker_image_force_pull: "{{ matrix_synapse_docker_image.endswith(':latest') }}" matrix_synapse_base_path: "{{ matrix_base_data_path }}/synapse" From 4a06e52660f01560f211170603a4e78434c00f9f Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 3 Mar 2020 17:48:51 +0200 Subject: [PATCH 10/16] Fix matrix-appservice-slack configuration when matrix-nginx-proxy is disabled --- group_vars/matrix_servers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 192d4338..5efde0c9 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -106,7 +106,7 @@ matrix_appservice_slack_enabled: false # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-slack over the container network. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose # matrix-appservice-slack's client-server port to the local host. -matrix_appservice_slack_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:{{ matrix_appservice_slack_slack_port }}' }}" +matrix_appservice_slack_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_slack_slack_port) }}" matrix_appservice_slack_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.as.token') | to_uuid }}" From 8bc4f56385eeb7ff45e41f7985940875f1f76b43 Mon Sep 17 00:00:00 2001 From: Stefan Warnat Date: Tue, 3 Mar 2020 19:01:43 +0100 Subject: [PATCH 11/16] Improve customization of welcome page --- roles/matrix-riot-web/defaults/main.yml | 6 ++++++ roles/matrix-riot-web/templates/welcome.html.j2 | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index be19fef9..8b19f297 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -32,6 +32,12 @@ matrix_riot_web_welcome_user_id: "@riot-bot:matrix.org" # Branding of riot web matrix_riot_web_brand: "Riot" +matrix_riot_web_welcome_logo: "welcome/images/logo.svg" +matrix_riot_web_welcome_logo_link: "https://riot.im" + +matrix_riot_web_welcome_headline: "_t('Welcome to Riot.im')" +matrix_riot_web_welcome_text: "_t('Decentralised, encrypted chat & collaboration powered by [matrix]')" + # By default, there's no Riot homepage (when logged in). If you wish to have one, # point this to a `home.html` template file on your local filesystem. matrix_riot_web_embedded_pages_home_path: ~ diff --git a/roles/matrix-riot-web/templates/welcome.html.j2 b/roles/matrix-riot-web/templates/welcome.html.j2 index 319f9795..48a0f532 100644 --- a/roles/matrix-riot-web/templates/welcome.html.j2 +++ b/roles/matrix-riot-web/templates/welcome.html.j2 @@ -153,11 +153,11 @@ h1::after {
- - + + -

_t("Welcome to Riot.im")

-

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

+

{{ matrix_riot_web_welcome_headline }}

+

{{ matrix_riot_web_welcome_text }}

From 0322a5443a6b05ef0e4c6ec5b76d4a46792198a8 Mon Sep 17 00:00:00 2001 From: Stefan Warnat Date: Tue, 3 Mar 2020 22:16:52 +0100 Subject: [PATCH 12/16] additional customizations of welcome page --- roles/matrix-riot-web/defaults/main.yml | 13 +++++++++++++ roles/matrix-riot-web/templates/config.json.j2 | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index 8b19f297..4fe8703a 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -32,7 +32,20 @@ matrix_riot_web_welcome_user_id: "@riot-bot:matrix.org" # Branding of riot web matrix_riot_web_brand: "Riot" +# Links, shown in footer of welcome page: +# [{"text": "Link text", "url": "https://link.target"}, {"text": "Other link"}] +matrix_riot_web_welcome_footerlinks: false + +# URL to image, shown during Login +matrix_riot_web_welcome_authlogo: false + +# URL to Wallpaper, shown in background of welcome page +matrix_riot_web_welcome_background: false + +# URL to Logo on welcome page matrix_riot_web_welcome_logo: "welcome/images/logo.svg" + +# URL of link on welcome image matrix_riot_web_welcome_logo_link: "https://riot.im" matrix_riot_web_welcome_headline: "_t('Welcome to Riot.im')" diff --git a/roles/matrix-riot-web/templates/config.json.j2 b/roles/matrix-riot-web/templates/config.json.j2 index 635c06f5..a950f70e 100644 --- a/roles/matrix-riot-web/templates/config.json.j2 +++ b/roles/matrix-riot-web/templates/config.json.j2 @@ -29,5 +29,10 @@ {% endif %} "embeddedPages": { "homeUrl": {{ matrix_riot_web_embedded_pages_home_url|string|to_json }} + }, + "branding": { + "authFooterLinks": {{ matrix_riot_web_welcome_footerlinks|to_json }}, + "authHeaderLogoUrl": {{ matrix_riot_web_welcome_authlogo|to_json }}, + "welcomeBackgroundUrl": {{ matrix_riot_web_welcome_background|to_json }} } } From 054e6fed0cef8e883d99351539cd3ade1c5a3f50 Mon Sep 17 00:00:00 2001 From: Stefan Warnat Date: Tue, 3 Mar 2020 22:27:39 +0100 Subject: [PATCH 13/16] rearrange main.yml of riot-web and use same logo URL for both logos --- roles/matrix-riot-web/defaults/main.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index 4fe8703a..828532f5 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -32,16 +32,6 @@ matrix_riot_web_welcome_user_id: "@riot-bot:matrix.org" # Branding of riot web matrix_riot_web_brand: "Riot" -# Links, shown in footer of welcome page: -# [{"text": "Link text", "url": "https://link.target"}, {"text": "Other link"}] -matrix_riot_web_welcome_footerlinks: false - -# URL to image, shown during Login -matrix_riot_web_welcome_authlogo: false - -# URL to Wallpaper, shown in background of welcome page -matrix_riot_web_welcome_background: false - # URL to Logo on welcome page matrix_riot_web_welcome_logo: "welcome/images/logo.svg" @@ -51,6 +41,16 @@ matrix_riot_web_welcome_logo_link: "https://riot.im" matrix_riot_web_welcome_headline: "_t('Welcome to Riot.im')" matrix_riot_web_welcome_text: "_t('Decentralised, encrypted chat & collaboration powered by [matrix]')" +# Links, shown in footer of welcome page: +# [{"text": "Link text", "url": "https://link.target"}, {"text": "Other link"}] +matrix_riot_web_welcome_footerlinks: false + +# URL to image, shown during Login +matrix_riot_web_welcome_authlogo: "{{ matrix_riot_web_welcome_logo }}" + +# URL to Wallpaper, shown in background of welcome page +matrix_riot_web_welcome_background: false + # By default, there's no Riot homepage (when logged in). If you wish to have one, # point this to a `home.html` template file on your local filesystem. matrix_riot_web_embedded_pages_home_path: ~ From 00596452c2e2ff3c33b7ada41a06da4383c8ffdb Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Thu, 5 Mar 2020 10:53:31 +0200 Subject: [PATCH 14/16] Update riot-web (1.5.11 -> 1.5.12) --- roles/matrix-riot-web/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index be19fef9..c192e42d 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -1,6 +1,6 @@ matrix_riot_web_enabled: true -matrix_riot_web_docker_image: "vectorim/riot-web:v1.5.11" +matrix_riot_web_docker_image: "vectorim/riot-web:v1.5.12" matrix_riot_web_docker_image_force_pull: "{{ matrix_riot_web_docker_image.endswith(':latest') }}" matrix_riot_web_data_path: "{{ matrix_base_data_path }}/riot-web" From 46664c4758a5e51545850f8f298525caf654fafc Mon Sep 17 00:00:00 2001 From: Stefan Warnat Date: Fri, 6 Mar 2020 14:31:15 +0100 Subject: [PATCH 15/16] Adjust variable names --- roles/matrix-riot-web/defaults/main.yml | 6 +++--- roles/matrix-riot-web/templates/config.json.j2 | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/matrix-riot-web/defaults/main.yml b/roles/matrix-riot-web/defaults/main.yml index 828532f5..981978d2 100644 --- a/roles/matrix-riot-web/defaults/main.yml +++ b/roles/matrix-riot-web/defaults/main.yml @@ -43,13 +43,13 @@ matrix_riot_web_welcome_text: "_t('Decentralised, encrypted chat & collabora # Links, shown in footer of welcome page: # [{"text": "Link text", "url": "https://link.target"}, {"text": "Other link"}] -matrix_riot_web_welcome_footerlinks: false +matrix_riot_web_branding_authFooterLinks: ~ # URL to image, shown during Login -matrix_riot_web_welcome_authlogo: "{{ matrix_riot_web_welcome_logo }}" +matrix_riot_web_branding_authHeaderLogoUrl: "{{ matrix_riot_web_welcome_logo }}" # URL to Wallpaper, shown in background of welcome page -matrix_riot_web_welcome_background: false +matrix_riot_web_branding_welcomeBackgroundUrl: ~ # By default, there's no Riot homepage (when logged in). If you wish to have one, # point this to a `home.html` template file on your local filesystem. diff --git a/roles/matrix-riot-web/templates/config.json.j2 b/roles/matrix-riot-web/templates/config.json.j2 index a950f70e..b82d53e0 100644 --- a/roles/matrix-riot-web/templates/config.json.j2 +++ b/roles/matrix-riot-web/templates/config.json.j2 @@ -31,8 +31,8 @@ "homeUrl": {{ matrix_riot_web_embedded_pages_home_url|string|to_json }} }, "branding": { - "authFooterLinks": {{ matrix_riot_web_welcome_footerlinks|to_json }}, - "authHeaderLogoUrl": {{ matrix_riot_web_welcome_authlogo|to_json }}, - "welcomeBackgroundUrl": {{ matrix_riot_web_welcome_background|to_json }} + "authFooterLinks": {{ matrix_riot_web_branding_authFooterLinks|to_json }}, + "authHeaderLogoUrl": {{ matrix_riot_web_branding_authHeaderLogoUrl|to_json }}, + "welcomeBackgroundUrl": {{ matrix_riot_web_branding_welcomeBackgroundUrl|to_json }} } } From c55682d0992ddfb7449d0cb27fe03781c8571b05 Mon Sep 17 00:00:00 2001 From: David Gnedt Date: Fri, 6 Mar 2020 17:48:16 +0100 Subject: [PATCH 16/16] Update synapse-janitor to support current synapse database schema --- roles/matrix-postgres/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/matrix-postgres/defaults/main.yml b/roles/matrix-postgres/defaults/main.yml index 961aa081..91656ff6 100644 --- a/roles/matrix-postgres/defaults/main.yml +++ b/roles/matrix-postgres/defaults/main.yml @@ -30,4 +30,4 @@ matrix_postgres_container_extra_arguments: [] # Takes an ":" or "" value (e.g. "127.0.0.1:5432"), or empty string to not expose. matrix_postgres_container_postgres_bind_port: "" -matrix_postgres_tool_synapse_janitor: "https://raw.githubusercontent.com/xwiki-labs/synapse_scripts/0b3f035951932ceb396631de3fc701043b9723bc/synapse_janitor.sql" +matrix_postgres_tool_synapse_janitor: "https://raw.githubusercontent.com/xwiki-labs/synapse_scripts/a9188ff175ae581610f92d58ea6eac9a114d854b/synapse_janitor.sql"