forked from mattermost/mattermost-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLT-1866/PLT-3509 Added links to download the native apps (mattermost…
…#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
- Loading branch information
Showing
10 changed files
with
223 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. | ||
// See License.txt for license information. | ||
|
||
import React from 'react'; | ||
|
||
import AdminSettings from './admin_settings.jsx'; | ||
import {FormattedMessage} from 'react-intl'; | ||
import SettingsGroup from './settings_group.jsx'; | ||
import TextSetting from './text_setting.jsx'; | ||
|
||
export default class NativeAppLinkSettings extends AdminSettings { | ||
constructor(props) { | ||
super(props); | ||
|
||
this.getConfigFromState = this.getConfigFromState.bind(this); | ||
|
||
this.renderSettings = this.renderSettings.bind(this); | ||
} | ||
|
||
getConfigFromState(config) { | ||
config.NativeAppSettings.AppDownloadLink = this.state.appDownloadLink; | ||
config.NativeAppSettings.AndroidAppDownloadLink = this.state.androidAppDownloadLink; | ||
config.NativeAppSettings.IosAppDownloadLink = this.state.iosAppDownloadLink; | ||
|
||
return config; | ||
} | ||
|
||
getStateFromConfig(config) { | ||
return { | ||
appDownloadLink: config.NativeAppSettings.AppDownloadLink, | ||
androidAppDownloadLink: config.NativeAppSettings.AndroidAppDownloadLink, | ||
iosAppDownloadLink: config.NativeAppSettings.IosAppDownloadLink | ||
}; | ||
} | ||
|
||
renderTitle() { | ||
return ( | ||
<h3> | ||
<FormattedMessage | ||
id='admin.customization.nativeAppLinks' | ||
defaultMessage='Native App Links' | ||
/> | ||
</h3> | ||
); | ||
} | ||
|
||
renderSettings() { | ||
return ( | ||
<SettingsGroup> | ||
<TextSetting | ||
id='appDownloadLink' | ||
label={ | ||
<FormattedMessage | ||
id='admin.customization.appDownloadLinkTitle' | ||
defaultMessage='Mattermost Apps Download Page Link:' | ||
/> | ||
} | ||
helpText={ | ||
<FormattedMessage | ||
id='admin.customization.appDownloadLinkDesc' | ||
defaultMessage='Add a link to a download page for the Mattermost apps. When a link is present, an option to "Download Mattermost Apps" will be added in the Main Menu so users can find the download page. Leave this field blank to hide the option from the Main Menu.' | ||
/> | ||
} | ||
value={this.state.appDownloadLink} | ||
onChange={this.handleChange} | ||
/> | ||
<TextSetting | ||
id='androidAppDownloadLink' | ||
label={ | ||
<FormattedMessage | ||
id='admin.customization.androidAppDownloadLinkTitle' | ||
defaultMessage='Android App Download Link:' | ||
/> | ||
} | ||
helpText={ | ||
<FormattedMessage | ||
id='admin.customization.androidAppDownloadLinkDesc' | ||
defaultMessage='Add a link to download the Android app. Users who access the site on a mobile web browser will be prompted with a page giving them the option to download the app. Leave this field blank to prevent the page from appearing.' | ||
/> | ||
} | ||
value={this.state.androidAppDownloadLink} | ||
onChange={this.handleChange} | ||
/> | ||
<TextSetting | ||
id='iosAppDownloadLink' | ||
label={ | ||
<FormattedMessage | ||
id='admin.customization.iosAppDownloadLinkTitle' | ||
defaultMessage='iOS App Download Link:' | ||
/> | ||
} | ||
helpText={ | ||
<FormattedMessage | ||
id='admin.customization.iosAppDownloadLinkDesc' | ||
defaultMessage='Add a link to download the iOS app. Users who access the site on a mobile web browser will be prompted with a page giving them the option to download the app. Leave this field blank to prevent the page from appearing.' | ||
/> | ||
} | ||
value={this.state.iosAppDownloadLink} | ||
onChange={this.handleChange} | ||
/> | ||
</SettingsGroup> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters