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 --- webapp/components/admin_console/admin_sidebar.jsx | 10 ++ .../admin_console/native_app_link_settings.jsx | 104 +++++++++++++++++++++ webapp/components/navbar_dropdown.jsx | 22 +++++ webapp/components/sidebar_right_menu.jsx | 20 ++++ .../components/tutorial/tutorial_intro_screens.jsx | 46 ++++++++- 5 files changed, 200 insertions(+), 2 deletions(-) create mode 100644 webapp/components/admin_console/native_app_link_settings.jsx (limited to 'webapp/components') diff --git a/webapp/components/admin_console/admin_sidebar.jsx b/webapp/components/admin_console/admin_sidebar.jsx index 49df8f820..5c02f419e 100644 --- a/webapp/components/admin_console/admin_sidebar.jsx +++ b/webapp/components/admin_console/admin_sidebar.jsx @@ -581,6 +581,16 @@ export default class AdminSidebar extends React.Component { /> } /> + + + } + /> + + + ); + } + + renderSettings() { + return ( + + + } + helpText={ + + } + value={this.state.appDownloadLink} + onChange={this.handleChange} + /> + + } + helpText={ + + } + value={this.state.androidAppDownloadLink} + onChange={this.handleChange} + /> + + } + helpText={ + + } + value={this.state.iosAppDownloadLink} + onChange={this.handleChange} + /> + + ); + } +} diff --git a/webapp/components/navbar_dropdown.jsx b/webapp/components/navbar_dropdown.jsx index 4912b8ebf..81bd31269 100644 --- a/webapp/components/navbar_dropdown.jsx +++ b/webapp/components/navbar_dropdown.jsx @@ -332,6 +332,26 @@ export default class NavbarDropdown extends React.Component { ); } + let nativeAppDivider = null; + let nativeAppLink = null; + if (global.window.mm_config.AppDownloadLink) { + nativeAppDivider =
  • ; + nativeAppLink = ( +
  • + + + +
  • + ); + } + return (
    • + {nativeAppDivider} + {nativeAppLink} this.setState({showUserSettingsModal: false})} diff --git a/webapp/components/sidebar_right_menu.jsx b/webapp/components/sidebar_right_menu.jsx index 25136e8bc..27e7c25d4 100644 --- a/webapp/components/sidebar_right_menu.jsx +++ b/webapp/components/sidebar_right_menu.jsx @@ -295,6 +295,25 @@ export default class SidebarRightMenu extends React.Component { this.openRightSidebar(); } + let nativeAppLink = null; + if (global.window.mm_config.AppDownloadLink && !Utils.isMobileApp()) { + nativeAppLink = ( +
    • + + + + +
    • + ); + } + return (
      + {nativeAppLink}
    + + + ) + }} + /> + ); + + appDownloadImage = ( + + + + ); + } + return (
    Communication happens in public discussion channels, private groups and direct messages.

    Everything is archived and searchable from any web-enabled desktop, laptop or phone.

    ' /> + {appDownloadLink} + {appDownloadImage} {circles}
    ); -- cgit v1.2.3-1-g7c22