From 30b61dc02e34ca6f5d92b03b37a42a4b7a567836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 3 Jun 2023 10:34:58 +0200 Subject: [PATCH] remove theme from install --- manifest.toml | 9 --------- scripts/install | 2 ++ scripts/upgrade | 11 +++++++++++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/manifest.toml b/manifest.toml index 4795ddb..233800d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -43,15 +43,6 @@ ram.runtime = "50M" type = "string" default = "Nitter" - [install.theme] - ask.en = "Choose a default theme for this instance" - ask.fr = "Choisissez un thème par défaut pour cette instance" - help.en = "Users can override this setting" - help.fr = "Les utilisateurs peuvent modifier ce paramétre" - type = "string" - default = "Auto" - choices = ["Auto", "Black", "Mastodon", "Nitter", "Pleroma", "Twitter", "Twitter dark"] - [install.replace_youtube] ask.en = "Replace YouTube links with an Invidious instance" ask.fr = "Remplacer les liens YouTube avec une instance Invidious" diff --git a/scripts/install b/scripts/install index 8049450..0f71e92 100755 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,9 @@ source /usr/share/yunohost/helpers #================================================= hmac_key=$(ynh_string_random --length=64) +theme="Auto" ynh_app_setting_set --app=$app --key=hmac_key --value=$hmac_key +ynh_app_setting_set --app=$app --key=theme --value=$theme #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE diff --git a/scripts/upgrade b/scripts/upgrade index da18765..8998c74 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,6 +15,17 @@ source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 + +# If theme doesn't exist, create it +if [ -z "${theme:-}" ]; then + theme="Auto" + ynh_app_setting_set --app=$app --key=theme --value=$theme +fi + #================================================= # STANDARD UPGRADE STEPS #=================================================