diff options
author | Ryan Wang <R-Wang97@users.noreply.github.com> | 2017-05-09 08:53:13 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-05-09 07:53:13 -0500 |
commit | 37586d26bc7460f5bc77e2094a83c65a08bd4583 (patch) | |
tree | 9a83719e36bfe0bdb3acaf9f73fda623a4204dd2 /webapp | |
parent | 5efcd2d9d3fb91ae7475918b807b7947b533da9b (diff) | |
download | chat-37586d26bc7460f5bc77e2094a83c65a08bd4583.tar.gz chat-37586d26bc7460f5bc77e2094a83c65a08bd4583.tar.bz2 chat-37586d26bc7460f5bc77e2094a83c65a08bd4583.zip |
[PLT-5440] Add Options to System Console Dropdown Menu (#5939)
* Add options to system console dropdown menu
* Updating modal css
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/admin_console/admin_navbar_dropdown.jsx | 69 | ||||
-rwxr-xr-x | webapp/i18n/en.json | 3 | ||||
-rw-r--r-- | webapp/sass/routes/_about-modal.scss | 105 |
3 files changed, 125 insertions, 52 deletions
diff --git a/webapp/components/admin_console/admin_navbar_dropdown.jsx b/webapp/components/admin_console/admin_navbar_dropdown.jsx index 00cbbdb0c..d46732d40 100644 --- a/webapp/components/admin_console/admin_navbar_dropdown.jsx +++ b/webapp/components/admin_console/admin_navbar_dropdown.jsx @@ -6,6 +6,7 @@ import ReactDOM from 'react-dom'; import TeamStore from 'stores/team_store.jsx'; import Constants from 'utils/constants.jsx'; +import AboutBuildModal from 'components/about_build_modal.jsx'; import {sortTeamsByDisplayName} from 'utils/team_utils.jsx'; import * as GlobalActions from 'actions/global_actions.jsx'; @@ -22,10 +23,13 @@ export default class AdminNavbarDropdown extends React.Component { super(props); this.blockToggle = false; this.onTeamChange = this.onTeamChange.bind(this); + this.handleAboutModal = this.handleAboutModal.bind(this); + this.aboutModalDismissed = this.aboutModalDismissed.bind(this); this.state = { teams: TeamStore.getAll(), - teamMembers: TeamStore.getMyTeamMembers() + teamMembers: TeamStore.getMyTeamMembers(), + showAboutModal: false }; } @@ -45,6 +49,16 @@ export default class AdminNavbarDropdown extends React.Component { TeamStore.removeChangeListener(this.onTeamChange); } + handleAboutModal(e) { + e.preventDefault(); + + this.setState({showAboutModal: true}); + } + + aboutModalDismissed() { + this.setState({showAboutModal: false}); + } + onTeamChange() { this.setState({ teams: TeamStore.getAll(), @@ -53,6 +67,7 @@ export default class AdminNavbarDropdown extends React.Component { } render() { + const config = global.window.mm_config; var teamsArray = []; // Array of team objects var teams = []; // Array of team components let switchTeams; @@ -138,6 +153,54 @@ export default class AdminNavbarDropdown extends React.Component { className='divider' /> <li> + <Link + to={config.AdministratorsGuideLink} + rel='noopener noreferrer' + target='_blank' + > + <FormattedMessage + id='admin.nav.administratorsGuide' + defaultMessage='Administrator Guide' + /> + </Link> + </li> + <li> + <Link + to={config.TroubleshootingForumLink} + rel='noopener noreferrer' + target='_blank' + > + <FormattedMessage + id='admin.nav.troubleshootingForum' + defaultMessage='Troubleshooting Forum' + /> + </Link> + </li> + <li> + <Link + to={config.CommercialSupportLink} + rel='noopener noreferrer' + target='_blank' + > + <FormattedMessage + id='admin.nav.commercialSupport' + defaultMessage='Commercial Support' + /> + </Link> + </li> + <li> + <a + href='#' + onClick={this.handleAboutModal} + > + <FormattedMessage + id='navbar_dropdown.about' + defaultMessage='About Mattermost' + /> + </a> + </li> + <li className='divider'/> + <li> <a href='#' id='logout' @@ -149,6 +212,10 @@ export default class AdminNavbarDropdown extends React.Component { /> </a> </li> + <AboutBuildModal + show={this.state.showAboutModal} + onModalDismissed={this.aboutModalDismissed} + /> </ul> </li> </ul> diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json index 951c9647e..d2bd3478b 100755 --- a/webapp/i18n/en.json +++ b/webapp/i18n/en.json @@ -545,10 +545,13 @@ "admin.mfa.bannerDesc": "<a href='https://docs.mattermost.com/deployment/auth.html' target='_blank'>Multi-factor authentication</a> is available for accounts with AD/LDAP or email login. If other login methods are used, MFA should be configured with the authentication provider.", "admin.mfa.cluster": "High", "admin.mfa.title": "Multi-factor Authentication", + "admin.nav.administratorsGuide": "Administrator's Guide", + "admin.nav.commercialSupport": "Commercial Support", "admin.nav.help": "Help", "admin.nav.logout": "Logout", "admin.nav.report": "Report a Problem", "admin.nav.switch": "Team Selection", + "admin.nav.troubleshootingForum": "Troubleshooting Forum", "admin.notifications.email": "Email", "admin.notifications.push": "Mobile Push", "admin.notifications.title": "Notification Settings", diff --git a/webapp/sass/routes/_about-modal.scss b/webapp/sass/routes/_about-modal.scss index 4506eac4e..46c1676ea 100644 --- a/webapp/sass/routes/_about-modal.scss +++ b/webapp/sass/routes/_about-modal.scss @@ -1,9 +1,13 @@ @charset 'UTF-8'; -.app__body { +.modal { + .modal-content { + @include box-shadow(0 0 10px rgba($black, .5)); + border-radius: $border-rad; + } - .modal { - .about-modal { + .about-modal { + .modal-content { .modal-header { background: transparent; border: none; @@ -25,69 +29,68 @@ margin: 0 4px 0 8px; } } + } - .modal-body { - padding: 20px 25px 5px; - } + .modal-body { + padding: 20px 25px 10px; + } - &.large { - .modal-body { - padding-bottom: 20px; - } + &.large { + .modal-body { + padding-bottom: 20px; } + } - .about-modal__content { - @include clearfix; - @include display-flex; - @include flex-direction(row); - padding: 1em 0 3em; - } + .about-modal__content { + @include clearfix; + @include display-flex; + @include flex-direction(row); + padding: 1em 0 3em; + } - .about-modal__copyright { - @include opacity(.6); - margin-top: .5em; - } + .about-modal__copyright { + @include opacity(.6); + margin-top: .5em; + } - .about-modal__footer { - font-size: 13.5px; - } + .about-modal__footer { + font-size: 13.5px; + } - .about-modal__title { - line-height: 1.5; - margin: 0 0 10px; - } + .about-modal__title { + line-height: 1.5; + margin: 0 0 10px; + } - .about-modal__subtitle { - @include opacity(.6); - } + .about-modal__subtitle { + @include opacity(.6); + } - .about-modal__hash { - @include opacity(.4); - font-size: .75em; - text-align: right; + .about-modal__hash { + @include opacity(.4); + font-size: .75em; + text-align: right; - p { - &:first-child { - float: left; - text-align: left; - } + p { + &:first-child { + float: left; + text-align: left; } } + } - .about-modal__logo { - @include opacity(.9); - padding: 0 40px 0 20px; + .about-modal__logo { + @include opacity(.9); + padding: 0 40px 0 20px; - svg { - height: 125px; - width: 125px; - } + svg { + height: 125px; + width: 125px; + } - path { - fill: inherit; - } + path { + fill: inherit; } } } - -} +}
\ No newline at end of file |