mirror of
https://github.com/YunoHost-Apps/element_ynh.git
synced 2024-09-03 18:36:08 +02:00
Fix
This commit is contained in:
parent
251cb8443e
commit
1051d110b4
4 changed files with 18 additions and 0 deletions
|
@ -33,6 +33,9 @@
|
||||||
"matrix.org"
|
"matrix.org"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"branding": {
|
||||||
|
"welcome_background_url": "--WELCOME_BACKGROUND_URL__",
|
||||||
|
},
|
||||||
"piwik": {
|
"piwik": {
|
||||||
"url": "https://piwik.riot.im/",
|
"url": "https://piwik.riot.im/",
|
||||||
"whitelistedHSUrls": ["https://matrix.org"],
|
"whitelistedHSUrls": ["https://matrix.org"],
|
||||||
|
|
|
@ -12,3 +12,10 @@ name = "Element configuration"
|
||||||
default = "https://matrix-client.matrix.org"
|
default = "https://matrix-client.matrix.org"
|
||||||
pattern.regexp = '^https://'
|
pattern.regexp = '^https://'
|
||||||
bind = "base_url:__FINALPATH__/config.json"
|
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"
|
||||||
|
|
|
@ -25,6 +25,7 @@ domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER
|
default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER
|
||||||
|
welcome_background_url=$""
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_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)
|
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
|
# 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
|
ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server
|
||||||
fi
|
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
|
# Cleaning legacy permissions
|
||||||
if ynh_legacy_permissions_exists; then
|
if ynh_legacy_permissions_exists; then
|
||||||
ynh_legacy_permissions_delete_all
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
Loading…
Add table
Reference in a new issue