diff --git a/client/src/campaigns/CUD.js b/client/src/campaigns/CUD.js index c1fe1701..b2da20c7 100644 --- a/client/src/campaigns/CUD.js +++ b/client/src/campaigns/CUD.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; import {withTranslation} from '../lib/i18n'; import { - NavButton, + LinkButton, requiresAuthenticatedUser, Title, withPageHelpers @@ -738,7 +738,7 @@ export default class CUD extends Component { + } + +
Mailtrain
+ + + +
+ {primaryMenu} +
+
+ {showSidebar && +
+ {secondaryMenu} +
+ }
{content}
@@ -330,6 +376,7 @@ export class SectionContent extends Component { super(props); this.state = { + flashMessageText: '' }; this.historyUnlisten = props.history.listen((location, action) => { @@ -457,7 +504,7 @@ export class Toolbar extends Component { }; render() { - let className = 'float-right ' + styles.buttonRow; + let className = styles.toolbar + ' ' + styles.buttonRow; if (this.props.className) { className += ' ' + this.props.className; } @@ -470,24 +517,24 @@ export class Toolbar extends Component { } } -export class NavButton extends Component { +export class LinkButton extends Component { static propTypes = { label: PropTypes.string, icon: PropTypes.string, className: PropTypes.string, - linkTo: PropTypes.string + to: PropTypes.string }; render() { const props = this.props; return ( -
diff --git a/client/src/lists/List.js b/client/src/lists/List.js index 6de136f8..a1c15daf 100644 --- a/client/src/lists/List.js +++ b/client/src/lists/List.js @@ -3,7 +3,7 @@ import React, {Component} from 'react'; import {withTranslation} from '../lib/i18n'; import { - NavButton, + LinkButton, requiresAuthenticatedUser, Title, Toolbar, @@ -146,8 +146,8 @@ export default class List extends Component { {tableRestActionDialogRender(this)} {this.state.createPermitted && - - + + } diff --git a/client/src/lists/fields/CUD.js b/client/src/lists/fields/CUD.js index b2a01758..fcf297be 100644 --- a/client/src/lists/fields/CUD.js +++ b/client/src/lists/fields/CUD.js @@ -6,7 +6,7 @@ import PropTypes import {Trans} from 'react-i18next'; import {withTranslation} from '../../lib/i18n'; import { - NavButton, + LinkButton, requiresAuthenticatedUser, Title, withPageHelpers @@ -509,7 +509,7 @@ export default class CUD extends Component { - - {mailtrainConfig.isAuthenticated ? -
-
    - {topLevelMenu} - - {t('users')} - {t('namespaces')} - {mailtrainConfig.globalPermissions.manageSettings && {t('globalSettings')}} - {t('sendConfigurations')} - {mailtrainConfig.globalPermissions.manageBlacklist && {t('blacklist')}} - {t('api')} - -
-
    - {languageChooser} - - {t('account')} - {t('logOut')} - -
-
- : -
-
    -
-
    - {languageChooser} -
-
- } - - ); + if (mailtrainConfig.isAuthenticated) { + return ( + <> + + + + ); + } else { + return ( + <> + + + ); + } } } diff --git a/client/src/scss/mailtrain.scss b/client/src/scss/mailtrain.scss index 96e64c2d..3ac8352a 100644 --- a/client/src/scss/mailtrain.scss +++ b/client/src/scss/mailtrain.scss @@ -13,19 +13,111 @@ $fa-font-path: "../static-npm/fontawesome"; body.mailtrain { background-color: white; - .app-header { - height: auto; - padding: 0; - flex: none; - border-bottom: 0px none; + .dropdown-item { + border-bottom: none 0px; + } - .navbar-brand { - width: auto; - height: auto; - display: inline-block; - padding-top: $navbar-brand-padding-y; - padding-bottom: $navbar-brand-padding-y; - margin-right: $navbar-padding-x; + .mt-breadcrumb-and-tertiary-navbar { + display: flex; + border-radius: 0; + @include border-radius($breadcrumb-border-radius); + @include borders($breadcrumb-borders); + background-color: $breadcrumb-bg; + + .breadcrumb { + border: 0px none; + margin-bottom: 0px; + padding-top: 11px; + padding-bottom: 12px; + } + + margin-bottom: 1.5rem; + } + + @include media-breakpoint-down(md) { + .app-header { + position: relative; + } + + .app-body { + margin-top: 0px; + } + } + + .app-header { + + .navbar { + padding: 0 15px; + + .navbar-brand { + width: $sidebar-width - 30px; + + justify-content: left; + + @include media-breakpoint-down(md) { + // This is to keep the title and the menu buttons in order. Normally the brand is position: absolute which distorts the order + position: relative; + top: auto; + left: auto; + margin: 0px; + } + } + } + + @include media-breakpoint-down(md) { + .navbar-toggler { + color: #fff; + height: 35px; + margin-top: 10px; + margin-bottom: 10px; + } + } + + .navbar-toggler { + .navbar-toggler-icon, &:hover .navbar-toggler-icon { + background-image: $navbar-dark-toggler-icon-bg; + } + } + + .navbar-nav { + margin-top: 8px; + margin-bottom: 8px; + } + + .mt-navbar-nav-right { + @include media-breakpoint-up(lg) { + flex-grow: 1; + justify-content: flex-end; + } + + .nav-item { + .nav-link { + padding: 0px; + } + + @include media-breakpoint-up(lg) { + margin-left: 15px; + } + + @include media-breakpoint-down(md) { + margin-right: 15px; + + .dropdown-menu-right { + right: auto; + left: 0; + } + } + } + } + + .mt-navbar-nav-left { + @include media-breakpoint-up(lg) { + margin-left: 15px; + } + + .nav-item { + margin-right: 15px; + } } .nav-item { @@ -35,6 +127,10 @@ body.mailtrain { .main .container-fluid { padding: 0 15px; + + @include media-breakpoint-down(md) { + padding: 0 3px; + } } .navbar-dark { @@ -44,8 +140,9 @@ body.mailtrain { } } } - - .gpg-text { - font-family: monospace; - } } + +.gpg-text { + font-family: monospace; +} + diff --git a/client/src/send-configurations/CUD.js b/client/src/send-configurations/CUD.js index f073a0b4..5e5b2c44 100644 --- a/client/src/send-configurations/CUD.js +++ b/client/src/send-configurations/CUD.js @@ -6,7 +6,7 @@ import PropTypes import {Trans} from 'react-i18next'; import {withTranslation} from '../lib/i18n'; import { - NavButton, + LinkButton, requiresAuthenticatedUser, Title, withPageHelpers @@ -249,7 +249,7 @@ export default class CUD extends Component {