From ba8c38f77b8c6b73de29afd8c2d167f618514b68 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 14:51:36 +0100 Subject: [PATCH 01/48] Create config_panel.toml --- config_panel.toml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 config_panel.toml diff --git a/config_panel.toml b/config_panel.toml new file mode 100644 index 0000000..28fe461 --- /dev/null +++ b/config_panel.toml @@ -0,0 +1,13 @@ +version = "1.0" + +[main] +name = "Element configuration" + + [main.config] + name = "Home server Configuration" + + [main.config.default_home_server] + ask = "Choose a default home server" + type = "string" + default = "matrix.org" + bind = ":__FINALPATH__/config.json" From e6c17a10ff9d770bf6a1c1f77f3a72a1ad318b55 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 15:15:07 +0100 Subject: [PATCH 02/48] Update config_panel.toml --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index 28fe461..d1c115d 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,4 +10,4 @@ name = "Element configuration" ask = "Choose a default home server" type = "string" default = "matrix.org" - bind = ":__FINALPATH__/config.json" + bind = "default_hs_url:__FINALPATH__/config.json" From c9154f9799b4159acc438f7760772b8676d8db7e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 15:35:11 +0100 Subject: [PATCH 03/48] Fix --- conf/config.json | 46 +++++++++++++++++++++++++++++++++++++++++++--- config_panel.toml | 15 +++++++++++++-- scripts/install | 5 +++++ scripts/upgrade | 26 ++++++++++++++++++++++++++ 4 files changed, 87 insertions(+), 5 deletions(-) diff --git a/conf/config.json b/conf/config.json index fb0a558..d2432a8 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,13 +1,53 @@ { - "default_hs_url": "https://__DEFAULT_HOME_SERVER__", - "default_is_url": "https://vector.im", + "default_server_config": { + "m.homeserver": { + "base_url": "https://__DEFAULT_HOME_SERVER__", + "server_name": "matrix.org" + }, + "m.identity_server": { + "base_url": "https://vector.im" + } + }, + "disable_custom_urls": false, + "disable_guests": false, + "disable_login_language_selector": false, + "disable_3pid_login": false, "brand": "Element", "integrations_ui_url": "https://scalar.vector.im/", "integrations_rest_url": "https://scalar.vector.im/api", - "enableLabs": true, + "integrations_widgets_urls": [ + "https://scalar.vector.im/_matrix/integrations/v1", + "https://scalar.vector.im/api", + "https://scalar-staging.vector.im/_matrix/integrations/v1", + "https://scalar-staging.vector.im/api", + "https://scalar-staging.riot.im/scalar/api" + ], + "bug_report_endpoint_url": "https://element.io/bugreports/submit", + "defaultCountryCode": "GB", + "showLabsSettings": false, + "features": { }, + "default_federate": true, + "default_theme": "light", "roomDirectory": { "servers": [ "matrix.org" ] + }, + "piwik": { + "url": "https://piwik.riot.im/", + "whitelistedHSUrls": ["https://matrix.org"], + "whitelistedISUrls": ["https://vector.im", "https://matrix.org"], + "siteId": 1 + }, + "enable_presence_by_hs_url": { + "https://matrix.org": false, + "https://matrix-client.matrix.org": false + }, + "settingDefaults": { + "breadcrumbs": true + }, + "jitsi": { + "preferredDomain": "jitsi.riot.im" } } + diff --git a/config_panel.toml b/config_panel.toml index d1c115d..fffcf66 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -4,10 +4,21 @@ version = "1.0" name = "Element configuration" [main.config] - name = "Home server Configuration" + name = "Server Configuration" [main.config.default_home_server] ask = "Choose a default home server" type = "string" default = "matrix.org" - bind = "default_hs_url:__FINALPATH__/config.json" + bind = "base_url:__FINALPATH__/config.json" + + [main.config.enable_labs] + ask = "Enable labs settings" + type = "boolean" + bind = "showLabsSettings:__FINALPATH__/config.json" + + [main.config.default_theme] + ask = "Choose a theme" + type = "select" + choices = ["light", "dark"] + bind = "default_theme:__FINALPATH__/config.json" diff --git a/scripts/install b/scripts/install index 39c9aec..bd1e692 100644 --- a/scripts/install +++ b/scripts/install @@ -28,6 +28,9 @@ default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER app=$YNH_APP_INSTANCE_NAME +enable_labs="true" +default_theme="light" + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -47,6 +50,8 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server +ynh_app_setting_set --app=$app --key=enable_labs --value=$enable_labs +ynh_app_setting_set --app=$app --key=default_theme --value=$default_theme #================================================= # CREATE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index e6e1c85..20355a8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,8 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server) +enable_labs=$(ynh_app_setting_get --app=$app --key=enable_labs) +default_theme=$(ynh_app_setting_get --app=$app --key=default_theme) #================================================= # CHECK VERSION @@ -41,6 +43,30 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1 + +# If enable_labs doesn't exist, create it +if [ -z "$enable_labs" ]; then + enable_labs="true" + ynh_app_setting_set --app=$app --key=enable_labs --value=$enable_labs +fi + +# If default_theme doesn't exist, create it +if [ -z "$default_theme" ]; then + default_theme="light" + ynh_app_setting_set --app=$app --key=default_theme --value=$default_theme +fi + +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # CREATE DEDICATED USER #================================================= From ce14e43fa6914ec45df88ff35f0ea0c0e5cfccd5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 15:40:50 +0100 Subject: [PATCH 04/48] Fix --- conf/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/config.json b/conf/config.json index d2432a8..42552cd 100644 --- a/conf/config.json +++ b/conf/config.json @@ -24,10 +24,10 @@ ], "bug_report_endpoint_url": "https://element.io/bugreports/submit", "defaultCountryCode": "GB", - "showLabsSettings": false, + "showLabsSettings": __SHOW_LABS__, "features": { }, "default_federate": true, - "default_theme": "light", + "default_theme": "__DEFAULT_THEME__", "roomDirectory": { "servers": [ "matrix.org" From 0301a5f5d6a36909e1930ec08982f42f8b929a42 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 15:43:05 +0100 Subject: [PATCH 05/48] Update config.json --- conf/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.json b/conf/config.json index 42552cd..3cece86 100644 --- a/conf/config.json +++ b/conf/config.json @@ -24,7 +24,7 @@ ], "bug_report_endpoint_url": "https://element.io/bugreports/submit", "defaultCountryCode": "GB", - "showLabsSettings": __SHOW_LABS__, + "showLabsSettings": __ENABLE_LABS__, "features": { }, "default_federate": true, "default_theme": "__DEFAULT_THEME__", From 04606c1d4a1381ebad082829c915fb45874b964a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 15:53:18 +0100 Subject: [PATCH 06/48] Fix --- conf/config.json | 2 +- config_panel.toml | 6 +++--- scripts/upgrade | 8 +++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/conf/config.json b/conf/config.json index 3cece86..8be39a8 100644 --- a/conf/config.json +++ b/conf/config.json @@ -24,7 +24,7 @@ ], "bug_report_endpoint_url": "https://element.io/bugreports/submit", "defaultCountryCode": "GB", - "showLabsSettings": __ENABLE_LABS__, + "showLabsSettings": "__ENABLE_LABS__", "features": { }, "default_federate": true, "default_theme": "__DEFAULT_THEME__", diff --git a/config_panel.toml b/config_panel.toml index fffcf66..39b84af 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,15 +10,15 @@ name = "Element configuration" ask = "Choose a default home server" type = "string" default = "matrix.org" - bind = "base_url:__FINALPATH__/config.json" + bind = "'base_url':__FINALPATH__/config.json" [main.config.enable_labs] ask = "Enable labs settings" type = "boolean" - bind = "showLabsSettings:__FINALPATH__/config.json" + bind = "'showLabsSettings':__FINALPATH__/config.json" [main.config.default_theme] ask = "Choose a theme" type = "select" choices = ["light", "dark"] - bind = "default_theme:__FINALPATH__/config.json" + bind = "'default_theme':__FINALPATH__/config.json" diff --git a/scripts/upgrade b/scripts/upgrade index 20355a8..71c4a36 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -46,7 +46,13 @@ ynh_abort_if_errors #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1 +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 + +# If enable_labs doesn't exist, create it +if [ -z "$default_home_server" ]; then + default_home_server="matrix.org" + ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server +fi # If enable_labs doesn't exist, create it if [ -z "$enable_labs" ]; then From 88721e8e297cafebdb81ccaee3df057dacf2731f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 16:00:27 +0100 Subject: [PATCH 07/48] Update config_panel.toml --- config_panel.toml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 39b84af..e190972 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -6,12 +6,6 @@ name = "Element configuration" [main.config] name = "Server Configuration" - [main.config.default_home_server] - ask = "Choose a default home server" - type = "string" - default = "matrix.org" - bind = "'base_url':__FINALPATH__/config.json" - [main.config.enable_labs] ask = "Enable labs settings" type = "boolean" From 1accf478004aa619fb6320ff9d31a8eb21c00601 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 16:28:23 +0100 Subject: [PATCH 08/48] Update config_panel.toml --- config_panel.toml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index e190972..e2d80b7 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -6,13 +6,19 @@ name = "Element configuration" [main.config] name = "Server Configuration" + [main.config.default_home_server] + ask = "Choose a default home server" + type = "string" + default = "matrix.org" + bind = ":__FINALPATH__/config.json" + [main.config.enable_labs] ask = "Enable labs settings" type = "boolean" - bind = "'showLabsSettings':__FINALPATH__/config.json" + bind = "showLabsSettings:__FINALPATH__/config.json" [main.config.default_theme] ask = "Choose a theme" type = "select" choices = ["light", "dark"] - bind = "'default_theme':__FINALPATH__/config.json" + bind = "default_theme:__FINALPATH__/config.json" From cf6347e76cb3474c0520de82a4f5fd0f0d759cf8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 16:31:53 +0100 Subject: [PATCH 09/48] Update config_panel.toml --- config_panel.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index e2d80b7..b875aa9 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -7,7 +7,7 @@ name = "Element configuration" name = "Server Configuration" [main.config.default_home_server] - ask = "Choose a default home server" + ask = "Choose a home server" type = "string" default = "matrix.org" bind = ":__FINALPATH__/config.json" @@ -21,4 +21,4 @@ name = "Element configuration" ask = "Choose a theme" type = "select" choices = ["light", "dark"] - bind = "default_theme:__FINALPATH__/config.json" + bind = ":__FINALPATH__/config.json" From 3276047156f871cdb420432438290fbb9ddf3e6b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 21:37:40 +0100 Subject: [PATCH 10/48] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 71c4a36..f9561e8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -48,7 +48,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# If enable_labs doesn't exist, create it +# If default_home_server doesn't exist, create it if [ -z "$default_home_server" ]; then default_home_server="matrix.org" ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server From cc01d46199959306dae3bbdc94e1f382ff75d08e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 21:38:46 +0100 Subject: [PATCH 11/48] Update config_panel.toml --- config_panel.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index b875aa9..6c73245 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,15 +10,15 @@ name = "Element configuration" ask = "Choose a home server" type = "string" default = "matrix.org" - bind = ":__FINALPATH__/config.json" + bind = "__FINALPATH__/config.json" [main.config.enable_labs] ask = "Enable labs settings" type = "boolean" - bind = "showLabsSettings:__FINALPATH__/config.json" + bind = "__FINALPATH__/config.json" [main.config.default_theme] ask = "Choose a theme" type = "select" choices = ["light", "dark"] - bind = ":__FINALPATH__/config.json" + bind = "__FINALPATH__/config.json" From a68f9f3d7e890c927c57d6b69fcfa046c3081909 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 22:24:27 +0100 Subject: [PATCH 12/48] Fix --- config_panel.toml | 4 ++-- manifest.json | 6 +++--- scripts/install | 2 +- scripts/upgrade | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 6c73245..f3591f8 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -8,8 +8,8 @@ name = "Element configuration" [main.config.default_home_server] ask = "Choose a home server" - type = "string" - default = "matrix.org" + type = "url" + default = "https://matrix.org" bind = "__FINALPATH__/config.json" [main.config.enable_labs] diff --git a/manifest.json b/manifest.json index e489a92..bf1abc0 100644 --- a/manifest.json +++ b/manifest.json @@ -41,13 +41,13 @@ }, { "name": "default_home_server", - "type": "string", + "type": "url", "ask": { "en": "Choose a default home server", "fr": "Choisissez un serveur par défault" }, - "example": "my-own-homeserver.tld", - "default": "matrix.org" + "example": "https://my-own-homeserver.tld", + "default": "https://matrix.org" }, { "name": "is_public", diff --git a/scripts/install b/scripts/install index bd1e692..85b7acf 100644 --- a/scripts/install +++ b/scripts/install @@ -28,7 +28,7 @@ default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER app=$YNH_APP_INSTANCE_NAME -enable_labs="true" +enable_labs="1" default_theme="light" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f9561e8..082387d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -56,7 +56,7 @@ fi # If enable_labs doesn't exist, create it if [ -z "$enable_labs" ]; then - enable_labs="true" + enable_labs="1" ynh_app_setting_set --app=$app --key=enable_labs --value=$enable_labs fi From b4f8c25c3d4ded79db81d645e41cc66ba92a6bda Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 22:24:50 +0100 Subject: [PATCH 13/48] Update config.json --- conf/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.json b/conf/config.json index 8be39a8..e72f039 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,7 +1,7 @@ { "default_server_config": { "m.homeserver": { - "base_url": "https://__DEFAULT_HOME_SERVER__", + "base_url": "__DEFAULT_HOME_SERVER__", "server_name": "matrix.org" }, "m.identity_server": { From 8c4f294a24500896b413aa11746b70dd1ac19c8e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 22:25:01 +0100 Subject: [PATCH 14/48] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 082387d..b07516d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -50,7 +50,7 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # If default_home_server doesn't exist, create it if [ -z "$default_home_server" ]; then - default_home_server="matrix.org" + default_home_server="https://matrix.org" ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server fi From c78d679d2e2eedf2a92be776a7a987367c522597 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 10:49:58 +0100 Subject: [PATCH 15/48] Update config file to upstream --- conf/config.json | 45 ++++++++++++++++++++++++++++++++++++++++++--- manifest.json | 2 +- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/conf/config.json b/conf/config.json index fb0a558..291dd13 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,13 +1,52 @@ { - "default_hs_url": "https://__DEFAULT_HOME_SERVER__", - "default_is_url": "https://vector.im", + "default_server_config": { + "m.homeserver": { + "base_url": "https://__DEFAULT_HOME_SERVER__", + "server_name": "matrix.org" + }, + "m.identity_server": { + "base_url": "https://vector.im" + } + }, + "disable_custom_urls": false, + "disable_guests": false, + "disable_login_language_selector": false, + "disable_3pid_login": false, "brand": "Element", "integrations_ui_url": "https://scalar.vector.im/", "integrations_rest_url": "https://scalar.vector.im/api", - "enableLabs": true, + "integrations_widgets_urls": [ + "https://scalar.vector.im/_matrix/integrations/v1", + "https://scalar.vector.im/api", + "https://scalar-staging.vector.im/_matrix/integrations/v1", + "https://scalar-staging.vector.im/api", + "https://scalar-staging.riot.im/scalar/api" + ], + "bug_report_endpoint_url": "https://element.io/bugreports/submit", + "defaultCountryCode": "GB", + "showLabsSettings": false, + "features": { }, + "default_federate": true, + "default_theme": "light", "roomDirectory": { "servers": [ "matrix.org" ] + }, + "piwik": { + "url": "https://piwik.riot.im/", + "whitelistedHSUrls": ["https://matrix.org"], + "whitelistedISUrls": ["https://vector.im", "https://matrix.org"], + "siteId": 1 + }, + "enable_presence_by_hs_url": { + "https://matrix.org": false, + "https://matrix-client.matrix.org": false + }, + "settingDefaults": { + "breadcrumbs": true + }, + "jitsi": { + "preferredDomain": "meet.element.io" } } diff --git a/manifest.json b/manifest.json index e489a92..7c871e4 100644 --- a/manifest.json +++ b/manifest.json @@ -47,7 +47,7 @@ "fr": "Choisissez un serveur par défault" }, "example": "my-own-homeserver.tld", - "default": "matrix.org" + "default": "matrix-client.matrix.org" }, { "name": "is_public", From 467ed3767eaea061f92661ee0a5d34a9ae6a1aba Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 10:52:09 +0100 Subject: [PATCH 16/48] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index a01e917..40fe437 100644 --- a/check_process +++ b/check_process @@ -2,7 +2,7 @@ ; Manifest domain="domain.tld" path="/path" - default_home_server="matrix.org" + default_home_server="matrix-client.matrix.org" is_public=1 ; Checks pkg_linter=1 From e79e8ece27b8544966c685d56023535f8c53bb18 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 10:53:12 +0100 Subject: [PATCH 17/48] Update check_process --- check_process | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/check_process b/check_process index 40fe437..fd611b1 100644 --- a/check_process +++ b/check_process @@ -15,7 +15,6 @@ upgrade=1 from_commit=34d457d13e526997fddb8348650674a7db2247be backup_restore=1 multi_instance=1 - port_already_use=0 change_url=1 ;;; Upgrade options ;;; Upgrade options @@ -23,4 +22,4 @@ name=34d457d13e526997fddb8348650674a7db2247be manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& - \ No newline at end of file + \ No newline at end of file From bb02467958825d36b22b1a259e45f98e6acbca91 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 10:56:52 +0100 Subject: [PATCH 18/48] Fix --- config_panel.toml | 15 ++------------- scripts/install | 5 ----- scripts/upgrade | 16 +--------------- 3 files changed, 3 insertions(+), 33 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index f3591f8..fa521b5 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -8,17 +8,6 @@ name = "Element configuration" [main.config.default_home_server] ask = "Choose a home server" - type = "url" - default = "https://matrix.org" - bind = "__FINALPATH__/config.json" - - [main.config.enable_labs] - ask = "Enable labs settings" - type = "boolean" - bind = "__FINALPATH__/config.json" - - [main.config.default_theme] - ask = "Choose a theme" - type = "select" - choices = ["light", "dark"] + type = "string" + default = "matrix-client.matrix.org" bind = "__FINALPATH__/config.json" diff --git a/scripts/install b/scripts/install index 85b7acf..39c9aec 100644 --- a/scripts/install +++ b/scripts/install @@ -28,9 +28,6 @@ default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER app=$YNH_APP_INSTANCE_NAME -enable_labs="1" -default_theme="light" - #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -50,8 +47,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server -ynh_app_setting_set --app=$app --key=enable_labs --value=$enable_labs -ynh_app_setting_set --app=$app --key=default_theme --value=$default_theme #================================================= # CREATE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index b07516d..7c8d6b2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,8 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server) -enable_labs=$(ynh_app_setting_get --app=$app --key=enable_labs) -default_theme=$(ynh_app_setting_get --app=$app --key=default_theme) #================================================= # CHECK VERSION @@ -50,22 +48,10 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # If default_home_server doesn't exist, create it if [ -z "$default_home_server" ]; then - default_home_server="https://matrix.org" + default_home_server="matrix-client.matrix.org" ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server fi -# If enable_labs doesn't exist, create it -if [ -z "$enable_labs" ]; then - enable_labs="1" - ynh_app_setting_set --app=$app --key=enable_labs --value=$enable_labs -fi - -# If default_theme doesn't exist, create it -if [ -z "$default_theme" ]; then - default_theme="light" - ynh_app_setting_set --app=$app --key=default_theme --value=$default_theme -fi - # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all From c1be41b6c5e88aee319eae10ec5f679926e8c794 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 11:01:46 +0100 Subject: [PATCH 19/48] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 12bd0e5..7c871e4 100644 --- a/manifest.json +++ b/manifest.json @@ -41,7 +41,7 @@ }, { "name": "default_home_server", - "type": "url", + "type": "string", "ask": { "en": "Choose a default home server", "fr": "Choisissez un serveur par défault" From 1b93ea567b661eae3d83332a39486c64b52fcc2d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 11:07:21 +0100 Subject: [PATCH 20/48] Set url --- conf/config.json | 2 +- config_panel.toml | 4 ++-- manifest.json | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/config.json b/conf/config.json index 500cc1b..b196d88 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,7 +1,7 @@ { "default_server_config": { "m.homeserver": { - "base_url": "https://__DEFAULT_HOME_SERVER__", + "base_url": "__DEFAULT_HOME_SERVER__", "server_name": "matrix.org" }, "m.identity_server": { diff --git a/config_panel.toml b/config_panel.toml index fa521b5..226583e 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -8,6 +8,6 @@ name = "Element configuration" [main.config.default_home_server] ask = "Choose a home server" - type = "string" - default = "matrix-client.matrix.org" + type = "url" + default = "https://matrix-client.matrix.org" bind = "__FINALPATH__/config.json" diff --git a/manifest.json b/manifest.json index 7c871e4..5c437cd 100644 --- a/manifest.json +++ b/manifest.json @@ -41,13 +41,13 @@ }, { "name": "default_home_server", - "type": "string", + "type": "url", "ask": { "en": "Choose a default home server", "fr": "Choisissez un serveur par défault" }, - "example": "my-own-homeserver.tld", - "default": "matrix-client.matrix.org" + "example": "https://my-own-homeserver.tld", + "default": "https://matrix-client.matrix.org" }, { "name": "is_public", From 8316dddbf79420368b96ed8a14caf5bb63e36875 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 11:10:36 +0100 Subject: [PATCH 21/48] Update config_panel.toml --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index 226583e..fbc83d1 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,4 +10,4 @@ name = "Element configuration" ask = "Choose a home server" type = "url" default = "https://matrix-client.matrix.org" - bind = "__FINALPATH__/config.json" + bind = ":__FINALPATH__/config.json" From 6421798bdccdb7470b09167bb22d98ad2570713d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 11:12:31 +0100 Subject: [PATCH 22/48] Update config_panel.toml --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index fbc83d1..386cd6f 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,4 +10,4 @@ name = "Element configuration" ask = "Choose a home server" type = "url" default = "https://matrix-client.matrix.org" - bind = ":__FINALPATH__/config.json" + bind = "base_url:__FINALPATH__/config.json" From d469a6d8e606891477abeb66a89abc0a1154c413 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 11:16:56 +0100 Subject: [PATCH 23/48] Fix --- conf/config.json | 2 +- config_panel.toml | 4 ++-- manifest.json | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/config.json b/conf/config.json index b196d88..500cc1b 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,7 +1,7 @@ { "default_server_config": { "m.homeserver": { - "base_url": "__DEFAULT_HOME_SERVER__", + "base_url": "https://__DEFAULT_HOME_SERVER__", "server_name": "matrix.org" }, "m.identity_server": { diff --git a/config_panel.toml b/config_panel.toml index 386cd6f..283e3a3 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -8,6 +8,6 @@ name = "Element configuration" [main.config.default_home_server] ask = "Choose a home server" - type = "url" - default = "https://matrix-client.matrix.org" + type = "string" + default = "matrix-client.matrix.org" bind = "base_url:__FINALPATH__/config.json" diff --git a/manifest.json b/manifest.json index 5c437cd..7c871e4 100644 --- a/manifest.json +++ b/manifest.json @@ -41,13 +41,13 @@ }, { "name": "default_home_server", - "type": "url", + "type": "string", "ask": { "en": "Choose a default home server", "fr": "Choisissez un serveur par défault" }, - "example": "https://my-own-homeserver.tld", - "default": "https://matrix-client.matrix.org" + "example": "my-own-homeserver.tld", + "default": "matrix-client.matrix.org" }, { "name": "is_public", From 086a1547cd0336d56620e4dcc2d7217f59b6757b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 11:25:23 +0100 Subject: [PATCH 24/48] Fix --- conf/config.json | 2 +- config_panel.toml | 4 ++-- manifest.json | 6 +++--- scripts/upgrade | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/conf/config.json b/conf/config.json index 500cc1b..b196d88 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,7 +1,7 @@ { "default_server_config": { "m.homeserver": { - "base_url": "https://__DEFAULT_HOME_SERVER__", + "base_url": "__DEFAULT_HOME_SERVER__", "server_name": "matrix.org" }, "m.identity_server": { diff --git a/config_panel.toml b/config_panel.toml index 283e3a3..386cd6f 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -8,6 +8,6 @@ name = "Element configuration" [main.config.default_home_server] ask = "Choose a home server" - type = "string" - default = "matrix-client.matrix.org" + type = "url" + default = "https://matrix-client.matrix.org" bind = "base_url:__FINALPATH__/config.json" diff --git a/manifest.json b/manifest.json index 7c871e4..5c437cd 100644 --- a/manifest.json +++ b/manifest.json @@ -41,13 +41,13 @@ }, { "name": "default_home_server", - "type": "string", + "type": "url", "ask": { "en": "Choose a default home server", "fr": "Choisissez un serveur par défault" }, - "example": "my-own-homeserver.tld", - "default": "matrix-client.matrix.org" + "example": "https://my-own-homeserver.tld", + "default": "https://matrix-client.matrix.org" }, { "name": "is_public", diff --git a/scripts/upgrade b/scripts/upgrade index 7c8d6b2..ba4ec4c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -48,7 +48,7 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # If default_home_server doesn't exist, create it if [ -z "$default_home_server" ]; then - default_home_server="matrix-client.matrix.org" + default_home_server="https://matrix-client.matrix.org" ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server fi From 34d95d9414e41e9d7764b6d12a66737a96413d53 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 12:35:41 +0100 Subject: [PATCH 25/48] Fix --- config_panel.toml | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 386cd6f..e93d4a7 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -8,6 +8,6 @@ name = "Element configuration" [main.config.default_home_server] ask = "Choose a home server" - type = "url" + type = "string" default = "https://matrix-client.matrix.org" bind = "base_url:__FINALPATH__/config.json" diff --git a/manifest.json b/manifest.json index 5c437cd..df46646 100644 --- a/manifest.json +++ b/manifest.json @@ -41,7 +41,7 @@ }, { "name": "default_home_server", - "type": "url", + "type": "string", "ask": { "en": "Choose a default home server", "fr": "Choisissez un serveur par défault" From 5155bd47d6a490d0d9754843fc97b440075a5c0b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 12:37:44 +0100 Subject: [PATCH 26/48] Update config_panel.toml --- config_panel.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index e93d4a7..ba4e760 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -9,5 +9,4 @@ name = "Element configuration" [main.config.default_home_server] ask = "Choose a home server" type = "string" - default = "https://matrix-client.matrix.org" bind = "base_url:__FINALPATH__/config.json" From ba86cd44153c32b754ce076067ba76514a376a6b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 12:39:49 +0100 Subject: [PATCH 27/48] Fix --- conf/config.json | 2 +- config_panel.toml | 3 +-- manifest.json | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/conf/config.json b/conf/config.json index b196d88..500cc1b 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,7 +1,7 @@ { "default_server_config": { "m.homeserver": { - "base_url": "__DEFAULT_HOME_SERVER__", + "base_url": "https://__DEFAULT_HOME_SERVER__", "server_name": "matrix.org" }, "m.identity_server": { diff --git a/config_panel.toml b/config_panel.toml index ba4e760..31b857b 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -8,5 +8,4 @@ name = "Element configuration" [main.config.default_home_server] ask = "Choose a home server" - type = "string" - bind = "base_url:__FINALPATH__/config.json" + type = "string" \ No newline at end of file diff --git a/manifest.json b/manifest.json index df46646..7c871e4 100644 --- a/manifest.json +++ b/manifest.json @@ -46,8 +46,8 @@ "en": "Choose a default home server", "fr": "Choisissez un serveur par défault" }, - "example": "https://my-own-homeserver.tld", - "default": "https://matrix-client.matrix.org" + "example": "my-own-homeserver.tld", + "default": "matrix-client.matrix.org" }, { "name": "is_public", From 3c5f7bfe54cf014f5833f72e6b3822ebc5f1bb95 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 12:51:07 +0100 Subject: [PATCH 28/48] Fix --- check_process | 2 +- conf/config.json | 2 +- config_panel.toml | 4 +++- manifest.json | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/check_process b/check_process index fd611b1..f32b9bf 100644 --- a/check_process +++ b/check_process @@ -2,7 +2,7 @@ ; Manifest domain="domain.tld" path="/path" - default_home_server="matrix-client.matrix.org" + default_home_server="https://matrix-client.matrix.org" is_public=1 ; Checks pkg_linter=1 diff --git a/conf/config.json b/conf/config.json index 500cc1b..b196d88 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,7 +1,7 @@ { "default_server_config": { "m.homeserver": { - "base_url": "https://__DEFAULT_HOME_SERVER__", + "base_url": "__DEFAULT_HOME_SERVER__", "server_name": "matrix.org" }, "m.identity_server": { diff --git a/config_panel.toml b/config_panel.toml index 31b857b..386cd6f 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -8,4 +8,6 @@ name = "Element configuration" [main.config.default_home_server] ask = "Choose a home server" - type = "string" \ No newline at end of file + type = "url" + default = "https://matrix-client.matrix.org" + bind = "base_url:__FINALPATH__/config.json" diff --git a/manifest.json b/manifest.json index 7c871e4..5c437cd 100644 --- a/manifest.json +++ b/manifest.json @@ -41,13 +41,13 @@ }, { "name": "default_home_server", - "type": "string", + "type": "url", "ask": { "en": "Choose a default home server", "fr": "Choisissez un serveur par défault" }, - "example": "my-own-homeserver.tld", - "default": "matrix-client.matrix.org" + "example": "https://my-own-homeserver.tld", + "default": "https://matrix-client.matrix.org" }, { "name": "is_public", From 85e2737548d034bd475c10d1ebb8774c997b1e23 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 13:02:38 +0100 Subject: [PATCH 29/48] Update config_panel.toml --- config_panel.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/config_panel.toml b/config_panel.toml index 386cd6f..e1809c9 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,4 +10,5 @@ name = "Element configuration" ask = "Choose a home server" type = "url" default = "https://matrix-client.matrix.org" + pattern.regexp = 'https://$' bind = "base_url:__FINALPATH__/config.json" From 0f9f61e8634a9a948de9a61091b4669b00839f87 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 13:04:53 +0100 Subject: [PATCH 30/48] Update config_panel.toml --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index e1809c9..7403786 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,5 +10,5 @@ name = "Element configuration" ask = "Choose a home server" type = "url" default = "https://matrix-client.matrix.org" - pattern.regexp = 'https://$' + pattern.regexp = 'https://' bind = "base_url:__FINALPATH__/config.json" From 2337511f8b27818517bb091db27f42927fc70c18 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 13:05:24 +0100 Subject: [PATCH 31/48] Update config_panel.toml --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index 7403786..29a4b67 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,5 +10,5 @@ name = "Element configuration" ask = "Choose a home server" type = "url" default = "https://matrix-client.matrix.org" - pattern.regexp = 'https://' + pattern.regexp = '^https://$' bind = "base_url:__FINALPATH__/config.json" From acebc8002c6de64f55b95f0f0d13f80d899ee8f5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 13:07:14 +0100 Subject: [PATCH 32/48] Update config_panel.toml --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index 29a4b67..7403786 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,5 +10,5 @@ name = "Element configuration" ask = "Choose a home server" type = "url" default = "https://matrix-client.matrix.org" - pattern.regexp = '^https://$' + pattern.regexp = 'https://' bind = "base_url:__FINALPATH__/config.json" From 278f7b9a324e93a7d0694a8ce5cdf9859af1a620 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 13:14:37 +0100 Subject: [PATCH 33/48] Update config_panel.toml --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index 7403786..e1809c9 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,5 +10,5 @@ name = "Element configuration" ask = "Choose a home server" type = "url" default = "https://matrix-client.matrix.org" - pattern.regexp = 'https://' + pattern.regexp = 'https://$' bind = "base_url:__FINALPATH__/config.json" From 50b987acb53ab79a48cd212f24eef355ab96f56c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 Jan 2022 13:35:24 +0100 Subject: [PATCH 34/48] Update config_panel.toml --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index e1809c9..95ae4d5 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,5 +10,5 @@ name = "Element configuration" ask = "Choose a home server" type = "url" default = "https://matrix-client.matrix.org" - pattern.regexp = 'https://$' + pattern.regexp = '^https://' bind = "base_url:__FINALPATH__/config.json" From 79639f3a5b9548541d4fac7a67acdc822eb779ec Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 18 Jan 2022 14:21:03 +0100 Subject: [PATCH 35/48] Update config_panel.toml --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index 95ae4d5..32553dc 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -8,7 +8,7 @@ name = "Element configuration" [main.config.default_home_server] ask = "Choose a home server" - type = "url" + type = "domain" default = "https://matrix-client.matrix.org" pattern.regexp = '^https://' bind = "base_url:__FINALPATH__/config.json" From 1051d110b42c4558c8d47bf9882ca6415f2258c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Jun 2022 22:43:49 +0200 Subject: [PATCH 36/48] Fix --- conf/config.json | 3 +++ config_panel.toml | 7 +++++++ scripts/install | 1 + scripts/upgrade | 7 +++++++ 4 files changed, 18 insertions(+) diff --git a/conf/config.json b/conf/config.json index b196d88..5b895ab 100644 --- a/conf/config.json +++ b/conf/config.json @@ -33,6 +33,9 @@ "matrix.org" ] }, + "branding": { + "welcome_background_url": "--WELCOME_BACKGROUND_URL__", + }, "piwik": { "url": "https://piwik.riot.im/", "whitelistedHSUrls": ["https://matrix.org"], diff --git a/config_panel.toml b/config_panel.toml index 32553dc..d720e69 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -12,3 +12,10 @@ name = "Element configuration" default = "https://matrix-client.matrix.org" pattern.regexp = '^https://' bind = "base_url:__FINALPATH__/config.json" + + [main.config.welcome_background_url] + ask = "Welcome background URL" + type = "file" + accept = ".png, .jpg" + help = "When a string, the URL for the full-page image background of the login, registration, and welcome pages. This property can additionally be an array to have the app choose an image at random from the selections." + bind = "welcome_background_url:__FINALPATH__/config.json" diff --git a/scripts/install b/scripts/install index 39c9aec..b5020d3 100644 --- a/scripts/install +++ b/scripts/install @@ -25,6 +25,7 @@ domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER +welcome_background_url=$"" app=$YNH_APP_INSTANCE_NAME diff --git a/scripts/upgrade b/scripts/upgrade index ba4ec4c..05991b5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server) +welcome_background_url=$(ynh_app_setting_get --app=$app --key=welcome_background_url) #================================================= # CHECK VERSION @@ -52,6 +53,12 @@ if [ -z "$default_home_server" ]; then ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server fi +# If welcome_background_url doesn't exist, create it +if [ -z "$welcome_background_url" ]; then + welcome_background_url="https://matrix-client.matrix.org" + ynh_app_setting_set --app=$app --key=welcome_background_url --value=$welcome_background_url +fi + # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all From f7b7a632948c4090d56b0dd144bc68a9aebdf980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Jun 2022 15:42:41 +0200 Subject: [PATCH 37/48] 1.10.15 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index c699081..4322149 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.10.14/element-v1.10.14.tar.gz -SOURCE_SUM=1251b2d25c6195f9fef2283e0b9cc93e7a7bedbb13119d6e7d14331d8fd6d650 +SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.10.15/element-v1.10.15.tar.gz +SOURCE_SUM=a2c39b9cdb36ac3f4d028bf83edd4091cd54b27df73a91040ae99886ddbfd416 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 08118b1..11bb6f6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web client for Matrix", "fr": "Client web pour Matrix" }, - "version": "1.10.14~ynh1", + "version": "1.10.15~ynh1", "url": "https://element.io", "upstream": { "license": "Apache-2.0", From 561e9f0c894d85c34f1b96b0303df29d5620af0c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 14 Jun 2022 13:42:47 +0000 Subject: [PATCH 38/48] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0e4431d..cc42069 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Element is a new type of messaging app. You choose where your messages are stored, putting you in control of your data. It gives you access to the Matrix open network, so you can talk to anyone. Element provides a new level of security, adding cross-signed device verification to default end-to-end encryption. -**Shipped version:** 1.10.14~ynh1 +**Shipped version:** 1.10.15~ynh1 **Demo:** https://app.element.io/ diff --git a/README_fr.md b/README_fr.md index f43b7b8..b0b6e12 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Element est un nouveau type d'application de messagerie. Vous choisissez où vos messages sont stockés, ce qui vous donne le contrôle de vos données. Il vous donne accès au réseau ouvert Matrix, vous pouvez donc parler à n'importe qui. Element offre un nouveau niveau de sécurité, en ajoutant la vérification des appareils par signature croisée au chiffrement de bout en bout par défaut. -**Version incluse :** 1.10.14~ynh1 +**Version incluse :** 1.10.15~ynh1 **Démo :** https://app.element.io/ From c404d719dc34ad669fd86bbe0844b9208e3f6f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Jun 2022 15:43:39 +0200 Subject: [PATCH 39/48] Update config.json --- conf/config.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/conf/config.json b/conf/config.json index fb0a558..8d57a89 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,13 +1,13 @@ { - "default_hs_url": "https://__DEFAULT_HOME_SERVER__", - "default_is_url": "https://vector.im", - "brand": "Element", - "integrations_ui_url": "https://scalar.vector.im/", - "integrations_rest_url": "https://scalar.vector.im/api", - "enableLabs": true, - "roomDirectory": { - "servers": [ - "matrix.org" - ] - } -} + "default_server_config": { + "m.homeserver": { + "base_url": "https://__DEFAULT_HOME_SERVER__" + }, + "m.identity_server": { + "base_url": "https://vector.im" + } + }, + "room_directory": { + "servers": ["matrix.org"] + } +} \ No newline at end of file From d4b94f040de7f91203dacdacc38288a3146ceabf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Jun 2022 15:57:33 +0200 Subject: [PATCH 40/48] Update config.json --- conf/config.json | 58 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/conf/config.json b/conf/config.json index 8d57a89..a220acf 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,13 +1,47 @@ { - "default_server_config": { - "m.homeserver": { - "base_url": "https://__DEFAULT_HOME_SERVER__" - }, - "m.identity_server": { - "base_url": "https://vector.im" - } - }, - "room_directory": { - "servers": ["matrix.org"] - } -} \ No newline at end of file + "default_server_name": "__DEFAULT_HOME_SERVER__", + "brand": "Element", + "integrations_ui_url": "https://scalar.vector.im/", + "integrations_rest_url": "https://scalar.vector.im/api", + "integrations_widgets_urls": [ + "https://scalar.vector.im/_matrix/integrations/v1", + "https://scalar.vector.im/api", + "https://scalar-staging.vector.im/_matrix/integrations/v1", + "https://scalar-staging.vector.im/api", + "https://scalar-staging.riot.im/scalar/api" + ], + "hosting_signup_link": "https://element.io/matrix-services?utm_source=element-web&utm_medium=web", + "bug_report_endpoint_url": "https://element.io/bugreports/submit", + "uisi_autorageshake_app": "element-auto-uisi", + "showLabsSettings": false, + "roomDirectory": { + "servers": [ + "matrix.org" + ] + }, + "enable_presence_by_hs_url": { + "https://matrix.org": false, + "https://matrix-client.matrix.org": false + }, + "terms_and_conditions_links": [ + { + "url": "https://element.io/privacy", + "text": "Privacy Policy" + }, + { + "url": "https://element.io/cookie-policy", + "text": "Cookie Policy" + } + ], + "hostSignup": { + "brand": "Element Home", + "cookiePolicyUrl": "https://element.io/cookie-policy", + "domains": [ + "matrix.org" + ], + "privacyPolicyUrl": "https://element.io/privacy", + "termsOfServiceUrl": "https://element.io/terms-of-service", + "url": "https://ems.element.io/element-home/in-app-loader" + }, + "map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx" +} From cc124356beaf0d37a3de9552c5212c07373c8f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Jun 2022 16:01:02 +0200 Subject: [PATCH 41/48] Fix --- config_panel.toml | 9 +-------- manifest.json | 4 ++-- scripts/install | 1 - scripts/upgrade | 7 ------- 4 files changed, 3 insertions(+), 18 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index d720e69..bafcac0 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -11,11 +11,4 @@ name = "Element configuration" type = "domain" default = "https://matrix-client.matrix.org" pattern.regexp = '^https://' - bind = "base_url:__FINALPATH__/config.json" - - [main.config.welcome_background_url] - ask = "Welcome background URL" - type = "file" - accept = ".png, .jpg" - help = "When a string, the URL for the full-page image background of the login, registration, and welcome pages. This property can additionally be an array to have the app choose an image at random from the selections." - bind = "welcome_background_url:__FINALPATH__/config.json" + bind = "default_server_name:__FINALPATH__/config.json" diff --git a/manifest.json b/manifest.json index b68371b..08bb65c 100644 --- a/manifest.json +++ b/manifest.json @@ -46,8 +46,8 @@ "en": "Choose a default home server", "fr": "Choisissez un serveur par défault" }, - "example": "https://my-own-homeserver.tld", - "default": "https://matrix-client.matrix.org" + "example": "my-own-homeserver.tld", + "default": "matrix.org" }, { "name": "is_public", diff --git a/scripts/install b/scripts/install index b5020d3..39c9aec 100644 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,6 @@ domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER -welcome_background_url=$"" app=$YNH_APP_INSTANCE_NAME diff --git a/scripts/upgrade b/scripts/upgrade index 05991b5..ba4ec4c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server) -welcome_background_url=$(ynh_app_setting_get --app=$app --key=welcome_background_url) #================================================= # CHECK VERSION @@ -53,12 +52,6 @@ if [ -z "$default_home_server" ]; then ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server fi -# If welcome_background_url doesn't exist, create it -if [ -z "$welcome_background_url" ]; then - welcome_background_url="https://matrix-client.matrix.org" - ynh_app_setting_set --app=$app --key=welcome_background_url --value=$welcome_background_url -fi - # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all From 583ef0089a7ca1b044de7dcd0ebb4ebdb5dffe8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Jun 2022 16:02:22 +0200 Subject: [PATCH 42/48] Fix --- config_panel.toml | 3 +-- manifest.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index bafcac0..0f284bc 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -9,6 +9,5 @@ name = "Element configuration" [main.config.default_home_server] ask = "Choose a home server" type = "domain" - default = "https://matrix-client.matrix.org" - pattern.regexp = '^https://' + default = "" bind = "default_server_name:__FINALPATH__/config.json" diff --git a/manifest.json b/manifest.json index 08bb65c..11bb6f6 100644 --- a/manifest.json +++ b/manifest.json @@ -41,7 +41,7 @@ }, { "name": "default_home_server", - "type": "url", + "type": "string", "ask": { "en": "Choose a default home server", "fr": "Choisissez un serveur par défault" From a46c44f6d029c1b91c73b636c2ff3dda27016c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Jun 2022 16:08:04 +0200 Subject: [PATCH 43/48] Update config.json --- conf/config.json | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/conf/config.json b/conf/config.json index a220acf..090ae87 100644 --- a/conf/config.json +++ b/conf/config.json @@ -3,13 +3,6 @@ "brand": "Element", "integrations_ui_url": "https://scalar.vector.im/", "integrations_rest_url": "https://scalar.vector.im/api", - "integrations_widgets_urls": [ - "https://scalar.vector.im/_matrix/integrations/v1", - "https://scalar.vector.im/api", - "https://scalar-staging.vector.im/_matrix/integrations/v1", - "https://scalar-staging.vector.im/api", - "https://scalar-staging.riot.im/scalar/api" - ], "hosting_signup_link": "https://element.io/matrix-services?utm_source=element-web&utm_medium=web", "bug_report_endpoint_url": "https://element.io/bugreports/submit", "uisi_autorageshake_app": "element-auto-uisi", @@ -22,26 +15,5 @@ "enable_presence_by_hs_url": { "https://matrix.org": false, "https://matrix-client.matrix.org": false - }, - "terms_and_conditions_links": [ - { - "url": "https://element.io/privacy", - "text": "Privacy Policy" - }, - { - "url": "https://element.io/cookie-policy", - "text": "Cookie Policy" - } - ], - "hostSignup": { - "brand": "Element Home", - "cookiePolicyUrl": "https://element.io/cookie-policy", - "domains": [ - "matrix.org" - ], - "privacyPolicyUrl": "https://element.io/privacy", - "termsOfServiceUrl": "https://element.io/terms-of-service", - "url": "https://ems.element.io/element-home/in-app-loader" - }, - "map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx" + } } From c2032f76c605f9d5bc7a335bc6608363631d95cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Jun 2022 16:15:41 +0200 Subject: [PATCH 44/48] Update config_panel.toml --- config_panel.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/config_panel.toml b/config_panel.toml index 0f284bc..fceb861 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -10,4 +10,5 @@ name = "Element configuration" ask = "Choose a home server" type = "domain" default = "" + help = "Choose your default Matrix server's domain name" bind = "default_server_name:__FINALPATH__/config.json" From e5d590843474c4310ef038980c60a5043760b13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Jun 2022 16:16:02 +0200 Subject: [PATCH 45/48] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index cb7a044..ec0f0de 100644 --- a/check_process +++ b/check_process @@ -2,7 +2,7 @@ ; Manifest domain="domain.tld" path="/path" - default_home_server="https://matrix-client.matrix.org" + default_home_server="matrix.org" is_public=1 ; Checks pkg_linter=1 From 5f6607ae2afde7a10da1652770c653d58e0203c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Jun 2022 16:22:49 +0200 Subject: [PATCH 46/48] Cleaning up --- conf/config.json | 3 --- doc/DISCLAIMER.md | 12 +----------- doc/DISCLAIMER_fr.md | 12 +----------- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/conf/config.json b/conf/config.json index 100333c..7a5b772 100644 --- a/conf/config.json +++ b/conf/config.json @@ -3,9 +3,6 @@ "brand": "Element", "integrations_ui_url": "https://scalar.vector.im/", "integrations_rest_url": "https://scalar.vector.im/api", - "hosting_signup_link": "https://element.io/matrix-services?utm_source=element-web&utm_medium=web", - "bug_report_endpoint_url": "https://element.io/bugreports/submit", - "uisi_autorageshake_app": "element-auto-uisi", "showLabsSettings": false, "roomDirectory": { "servers": [ diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 5f9bf9f..22d6e95 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -2,7 +2,7 @@ ### Multi-users support -Now this application support the SSO. If you want to use the sso you need to define the path to the default homeserver as your homeserver witch is installed on your YunoHost instance. +This application support the SSO. If you want to use the SSO, you need to define the path to the default homeserver as your homeserver witch is installed on your YunoHost instance. ## Additional informations @@ -17,13 +17,3 @@ access to Element (or other apps) due to sharing the same domain. We have put some coarse mitigations into place to try to protect against this situation, but it's still not good practice to do it in the first place. See https://github.com/vector-im/riot-web/issues/1977 for more details. - -### Migration from old app name "Riot" - -As this app don't contains any data on the server side no migration was made to migrate from "Riot" to "Element". -So you just will need to remove Riot and install Element on the same domain (you can change the path) to be able to keep the data on your web browser. -So the process to migrate to element is the following: - -1. Get the domain of "Riot": `yunohost app setting riot domain` -2. Remove Riot: `yunohost app remove riot` -3. Install Element: `yunohost app install element` diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index 07f2ecf..0ac8dd8 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -2,7 +2,7 @@ ### Prise en charge multi-utilisateurs -Maintenant, cette application prend en charge le SSO. Si vous souhaitez utiliser le sso, vous devez définir le chemin d'accès au serveur domestique par défaut car votre serveur domestique est installé sur votre instance YunoHost. +Cette application prend en charge le SSO. Si vous souhaitez utiliser le SSO, vous devez définir le chemin d'accès au serveur domestique par défaut car votre serveur domestique est installé sur votre instance YunoHost. ## Informations supplémentaires @@ -17,13 +17,3 @@ accès à Element (ou à d'autres applications) en raison du partage du même do Nous avons mis en place des mesures d'atténuation grossières pour essayer de nous protéger contre ce situation, mais ce n'est toujours pas une bonne pratique de le faire en premier lieu. Voir https://github.com/vector-im/riot-web/issues/1977 pour plus de détails. - -### Migration à partir de l'ancien nom d'application "Riot" - -Comme cette application ne contient aucune donnée côté serveur, aucune migration n'a été effectuée pour migrer de "Riot" vers "Element". -Il vous suffira donc de supprimer Riot et d'installer Element sur le même domaine (vous pouvez modifier le chemin) pour pouvoir conserver les données sur votre navigateur Web. -Ainsi, le processus de migration vers l'élément est le suivant : - -1. Obtenez le domaine de "Riot": `yunohost app setting riot domain` -2. Supprimer Riot : `yunohost app remove riot` -3. Élément d'installation : `yunohost app install element` From 2b8b3e604731db640deaafd01bb01e0e975d70d3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 14 Jun 2022 14:22:54 +0000 Subject: [PATCH 47/48] Auto-update README --- README.md | 12 +----------- README_fr.md | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index cc42069..d93328d 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Element is a new type of messaging app. You choose where your messages are store ### Multi-users support -Now this application support the SSO. If you want to use the sso you need to define the path to the default homeserver as your homeserver witch is installed on your YunoHost instance. +This application support the SSO. If you want to use the SSO, you need to define the path to the default homeserver as your homeserver witch is installed on your YunoHost instance. ## Additional informations @@ -47,16 +47,6 @@ We have put some coarse mitigations into place to try to protect against this situation, but it's still not good practice to do it in the first place. See https://github.com/vector-im/riot-web/issues/1977 for more details. -### Migration from old app name "Riot" - -As this app don't contains any data on the server side no migration was made to migrate from "Riot" to "Element". -So you just will need to remove Riot and install Element on the same domain (you can change the path) to be able to keep the data on your web browser. -So the process to migrate to element is the following: - -1. Get the domain of "Riot": `yunohost app setting riot domain` -2. Remove Riot: `yunohost app remove riot` -3. Install Element: `yunohost app install element` - ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index b0b6e12..9d76011 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Element est un nouveau type d'application de messagerie. Vous choisissez où vos ### Prise en charge multi-utilisateurs -Maintenant, cette application prend en charge le SSO. Si vous souhaitez utiliser le sso, vous devez définir le chemin d'accès au serveur domestique par défaut car votre serveur domestique est installé sur votre instance YunoHost. +Cette application prend en charge le SSO. Si vous souhaitez utiliser le SSO, vous devez définir le chemin d'accès au serveur domestique par défaut car votre serveur domestique est installé sur votre instance YunoHost. ## Informations supplémentaires @@ -47,16 +47,6 @@ Nous avons mis en place des mesures d'atténuation grossières pour essayer de n situation, mais ce n'est toujours pas une bonne pratique de le faire en premier lieu. Voir https://github.com/vector-im/riot-web/issues/1977 pour plus de détails. -### Migration à partir de l'ancien nom d'application "Riot" - -Comme cette application ne contient aucune donnée côté serveur, aucune migration n'a été effectuée pour migrer de "Riot" vers "Element". -Il vous suffira donc de supprimer Riot et d'installer Element sur le même domaine (vous pouvez modifier le chemin) pour pouvoir conserver les données sur votre navigateur Web. -Ainsi, le processus de migration vers l'élément est le suivant : - -1. Obtenez le domaine de "Riot": `yunohost app setting riot domain` -2. Supprimer Riot : `yunohost app remove riot` -3. Élément d'installation : `yunohost app install element` - ## Documentations et ressources * Site officiel de l'app : From 97dd44a1ce7db9716263c7b576136c8da0142598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 19 Jun 2022 18:06:50 +0200 Subject: [PATCH 48/48] Update config_panel.toml --- config_panel.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index fceb861..577ee16 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -8,7 +8,7 @@ name = "Element configuration" [main.config.default_home_server] ask = "Choose a home server" - type = "domain" - default = "" - help = "Choose your default Matrix server's domain name" + type = "string" + default = "matrix.org" + help = "Choose your default Matrix server's domain name. Default is matrix.org" bind = "default_server_name:__FINALPATH__/config.json"