1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/element_ynh.git synced 2024-09-03 18:36:08 +02:00
This commit is contained in:
ericgaspar 2022-01-13 15:53:18 +01:00
parent 0301a5f5d6
commit 04606c1d4a
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 11 additions and 5 deletions

View file

@ -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__",

View file

@ -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"

View file

@ -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