From 9c2c941449c387b2407d10c101f39a2266a2e65a Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 22 Jul 2016 10:53:57 -0400 Subject: PLT-1866/PLT-3509 Added links to download the native apps (#3651) * PLT-1866 Added configurable links for native app downloads * PLT-1866 Added native app download link to main menu * PLT-3509 Added native app link to tutorial * PLT-3509 Added native app link to welcome email * PLT-3509 Made link to apps in welcome email conditional on being set --- model/config.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'model/config.go') diff --git a/model/config.go b/model/config.go index 4767378fb..b38179cf1 100644 --- a/model/config.go +++ b/model/config.go @@ -268,6 +268,12 @@ type SamlSettings struct { LoginButtonText *string } +type NativeAppSettings struct { + AppDownloadLink *string + AndroidAppDownloadLink *string + IosAppDownloadLink *string +} + type Config struct { ServiceSettings ServiceSettings TeamSettings TeamSettings @@ -285,6 +291,7 @@ type Config struct { ComplianceSettings ComplianceSettings LocalizationSettings LocalizationSettings SamlSettings SamlSettings + NativeAppSettings NativeAppSettings } func (o *Config) ToJson() string { @@ -792,6 +799,21 @@ func (o *Config) SetDefaults() { o.SamlSettings.LocaleAttribute = new(string) *o.SamlSettings.LocaleAttribute = "" } + + if o.NativeAppSettings.AppDownloadLink == nil { + o.NativeAppSettings.AppDownloadLink = new(string) + *o.NativeAppSettings.AppDownloadLink = "https://about.mattermost.com/downloads/" + } + + if o.NativeAppSettings.AndroidAppDownloadLink == nil { + o.NativeAppSettings.AndroidAppDownloadLink = new(string) + *o.NativeAppSettings.AndroidAppDownloadLink = "https://about.mattermost.com/mattermost-android-app/" + } + + if o.NativeAppSettings.IosAppDownloadLink == nil { + o.NativeAppSettings.IosAppDownloadLink = new(string) + *o.NativeAppSettings.IosAppDownloadLink = "https://about.mattermost.com/mattermost-ios-app/" + } } func (o *Config) IsValid() *AppError { -- cgit v1.2.3-1-g7c22