From 9c2c941449c387b2407d10c101f39a2266a2e65a Mon Sep 17 00:00:00 2001
From: Harrison Healey <harrisonmhealey@gmail.com>
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/navbar_dropdown.jsx | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

(limited to 'webapp/components/navbar_dropdown.jsx')

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 = <li className='divider'/>;
+            nativeAppLink = (
+                <li>
+                    <Link
+                        target='_blank'
+                        rel='noopener noreferrer'
+                        to={global.window.mm_config.AppDownloadLink}
+                    >
+                        <FormattedMessage
+                            id='navbar_dropdown.nativeApps'
+                            defaultMessage='Download Native Apps'
+                        />
+                    </Link>
+                </li>
+            );
+        }
+
         return (
             <ul className='nav navbar-nav navbar-right'>
                 <li
@@ -403,6 +423,8 @@ export default class NavbarDropdown extends React.Component {
                                 />
                             </a>
                         </li>
+                        {nativeAppDivider}
+                        {nativeAppLink}
                         <UserSettingsModal
                             show={this.state.showUserSettingsModal}
                             onModalDismissed={() => this.setState({showUserSettingsModal: false})}
-- 
cgit v1.2.3-1-g7c22

