diff --git a/client/src/Home.js b/client/src/Home.js index 600321a5..11fedf9c 100644 --- a/client/src/Home.js +++ b/client/src/Home.js @@ -5,6 +5,7 @@ import PropTypes from 'prop-types'; import {withTranslation} from './lib/i18n'; import {requiresAuthenticatedUser} from './lib/page'; import {withComponentMixins} from "./lib/decorator-helpers"; +import mailtrainConfig from 'mailtrainConfig'; @withComponentMixins([ withTranslation, @@ -16,7 +17,6 @@ export default class List extends Component { } static propTypes = { - configItems: PropTypes.object } render() { @@ -26,7 +26,7 @@ export default class List extends Component {

{t('Mailtrain 2 beta')}

{t('Build') + ' 2020-07-18-0813'}
-

{this.props.configItems.shoutout}

+

{mailtrainConfig.shoutout}

); } diff --git a/client/src/root.js b/client/src/root.js index 831a337e..f6e3dfea 100644 --- a/client/src/root.js +++ b/client/src/root.js @@ -116,10 +116,7 @@ class Root extends Component { structure = { title: t('home'), link: '/', - localResolve: { - configItems: params => `rest/settings` - }, - panelRender: props => , + panelRender: props => , primaryMenuComponent: MainMenu, children: { ...login.getMenus(t), diff --git a/server/lib/client-helpers.js b/server/lib/client-helpers.js index c00a9389..2e61b332 100644 --- a/server/lib/client-helpers.js +++ b/server/lib/client-helpers.js @@ -33,7 +33,7 @@ async function getAuthenticatedConfig(context) { globalPermissions[perm] = true; } - const setts = await settings.get(contextHelpers.getAdminContext(), ['mapsApiKey']); + const setts = await settings.get(contextHelpers.getAdminContext(), ['mapsApiKey', 'shoutout']); return { defaultCustomFormValues: await forms.getDefaultCustomFormValues(), @@ -49,7 +49,8 @@ async function getAuthenticatedConfig(context) { verpEnabled: config.verp.enabled, reportsEnabled: config.reports.enabled, mapsApiKey: setts.mapsApiKey, - builtinZoneMTAEnabled: config.builtinZoneMTA.enabled + builtinZoneMTAEnabled: config.builtinZoneMTA.enabled, + shoutout: setts.shoutout } }