diff --git a/_locales/en/messages.json b/_locales/en/messages.json index c334c6792..f1515b434 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2166,5 +2166,12 @@ "already_subscribed_sign_in": { "message": "Already subscribed? Sign In", "description": "Character limit: 28." + }, + "promos_turned_off_notification": { + "message": "Promos turned off. You can turn them back on in", + "description": "translation must take into account that 'Settings' is appended to this string" + }, + "settings": { + "message": "Settings" } } diff --git a/app/panel/components/Panel.jsx b/app/panel/components/Panel.jsx index 22ebb0c0e..33b252314 100644 --- a/app/panel/components/Panel.jsx +++ b/app/panel/components/Panel.jsx @@ -12,6 +12,7 @@ */ import React from 'react'; +import { NavLink } from 'react-router-dom'; import Header from '../containers/HeaderContainer'; import { PlusPromoModal } from '../../shared-components'; import InsightsPromoModal from './InsightsPromoModal'; @@ -151,7 +152,6 @@ class Panel extends React.Component { } } - /** * Helper render function for the notification callout * @return {JSX} JSX for the notification callout @@ -163,6 +163,9 @@ class Panel extends React.Component { return ( + {this.props.notificationText === t('promos_turned_off_notification') && ( + {t('settings')} + )} {needsReload && (
{ t('alert_reload') }
)} @@ -207,6 +210,12 @@ class Panel extends React.Component { } else if (modal === 'plus_upgrade') { sendMessage('ping', 'promo_modals_decline_plus_upgrade'); } + + this.props.actions.showNotification({ + classes: 'warning', + reload: false, + text: t('promos_turned_off_notification'), + }); }; _handlePromoSignInClick = () => { diff --git a/app/panel/components/Settings.jsx b/app/panel/components/Settings.jsx index d8837b28d..48884d790 100644 --- a/app/panel/components/Settings.jsx +++ b/app/panel/components/Settings.jsx @@ -50,7 +50,10 @@ class Settings extends React.Component { * Lifecycle event. Default sub view is set here. */ UNSAFE_componentWillMount() { - this.props.history.push('/settings/globalblocking'); + // Do not redirect to the default if we are trying to access a specific other subview + if (this.props.history[this.props.history.length - 1] === '/settings') { + this.props.history.push('/settings/globalblocking'); + } } /** diff --git a/app/scss/partials/_callout.scss b/app/scss/partials/_callout.scss index d0f63d4db..fc259c4bd 100644 --- a/app/scss/partials/_callout.scss +++ b/app/scss/partials/_callout.scss @@ -63,6 +63,7 @@ .needs-reload-link, .filter-link, .sign-in-link, + .settings-link, .verify-account-link { @extend %pointer; margin-left: 5px;