diff --git a/config.yaml b/config.yaml index 1a1c428..35cc28d 100644 --- a/config.yaml +++ b/config.yaml @@ -23,6 +23,10 @@ storage-path: /home/pierre/Documents/projets_web/comunic/current/user_data/ # URL where Comunic Terms of use are available terms-url: http://devweb.local/comunic/current/about.php?cgu +# Android application download URL +play-store-url: https://play.google.com/store/apps/details?id=org.communiquons.comunic +android-direct-download-url: https://files.communiquons.org/comunic/mobile/latest-android.php + # Print more information to the console verbose-mode: true diff --git a/src/api_data/server_config.rs b/src/api_data/server_config.rs index a7e18d4..a2459ed 100644 --- a/src/api_data/server_config.rs +++ b/src/api_data/server_config.rs @@ -32,6 +32,8 @@ struct DataConservationPolicy { pub struct ServerConfig { min_supported_mobile_version: &'static str, terms_url: String, + play_store_url: String, + android_direct_download_url: String, password_policy: PasswordPolicy, data_conservation_policy: DataConservationPolicy, } @@ -41,6 +43,8 @@ impl ServerConfig { ServerConfig { min_supported_mobile_version: MIN_SUPPORTED_MOBILE_VERSION, terms_url: conf().terms_url.clone(), + play_store_url: conf().play_store_url.clone(), + android_direct_download_url: conf().android_direct_download_url.clone(), password_policy: PasswordPolicy { allow_email_in_password: password_policy::ALLOW_EMAIL_IN_PASSWORD, allow_name_in_password: password_policy::ALLOW_NAME_IN_PASSWORD, diff --git a/src/data/config.rs b/src/data/config.rs index 2c9bf39..f403b27 100644 --- a/src/data/config.rs +++ b/src/data/config.rs @@ -31,6 +31,8 @@ pub struct Config { pub storage_url: String, pub storage_path: String, pub terms_url: String, + pub play_store_url: String, + pub android_direct_download_url: String, pub proxy: Option, pub force_https: bool, pub verbose_mode: bool, @@ -104,6 +106,9 @@ impl Config { terms_url: Config::yaml_str(parsed, "terms-url"), + play_store_url: Config::yaml_str(parsed, "play-store-url"), + android_direct_download_url: Config::yaml_str(parsed, "android-direct-download-url"), + proxy: match proxy.as_ref() { "none" => None, s => Some(s.to_string())