diff --git a/src/client/components/facet_results/ResultClassRoute.js b/src/client/components/facet_results/ResultClassRoute.js index 10277ab8dc01fe3ffb815e0ebd5fa8c49f3ace5c..5189d9a9f1cd8985eecaf4e4b77b5a408dc567da 100644 --- a/src/client/components/facet_results/ResultClassRoute.js +++ b/src/client/components/facet_results/ResultClassRoute.js @@ -2,7 +2,7 @@ import React, { lazy } from 'react' import intl from 'react-intl-universal' import { Route } from 'react-router-dom' import { has } from 'lodash' -import LineChartSotasurmat from '../perspectives/sotasurmat/LineChartSotasurmat' +// import LineChartSotasurmat from '../perspectives/sotasurmat/LineChartSotasurmat' const ResultTable = lazy(() => import('./ResultTable')) const InstancePageTable = lazy(() => import('../main_layout/InstancePageTable')) const ReactVirtualizedList = lazy(() => import('./ReactVirtualizedList')) @@ -316,24 +316,24 @@ const ResultClassRoute = props => { ) break } - case 'LineChartSotasurmat': { - const lineChartProps = { - data: perspectiveState, - facetUpdateID: facetState.facetUpdateID, - fetchResults: props.fetchResults, - updatePage: props.updatePage, - routeProps: props.routeProps, - resultCount: perspectiveState.resultCount - } - routeComponent = ( - <Route - path={path} - render={() => - <LineChartSotasurmat {...lineChartProps} />} - /> - ) - break - } + // case 'LineChartSotasurmat': { + // const lineChartProps = { + // data: perspectiveState, + // facetUpdateID: facetState.facetUpdateID, + // fetchResults: props.fetchResults, + // updatePage: props.updatePage, + // routeProps: props.routeProps, + // resultCount: perspectiveState.resultCount + // } + // routeComponent = ( + // <Route + // path={path} + // render={() => + // <LineChartSotasurmat {...lineChartProps} />} + // /> + // ) + // break + // } case 'Network': { const { networkConfig } = props const { diff --git a/src/client/components/main_layout/MuiIcon.js b/src/client/components/main_layout/MuiIcon.js index be78abc81de2e7a6de68743f43d47bda397ba5c2..552c629a4cb13c979f2c984553d9289e5046513e 100644 --- a/src/client/components/main_layout/MuiIcon.js +++ b/src/client/components/main_layout/MuiIcon.js @@ -16,7 +16,8 @@ import { OndemandVideo, KeyboardVoice, Autorenew, - Add + Add, + PlayArrow } from '@material-ui/icons' import has from 'lodash' @@ -38,7 +39,8 @@ const MuiIcon = props => { OndemandVideo: OndemandVideo, KeyboardVoice: KeyboardVoice, Autorenew: Autorenew, - Add: Add + Add: Add, + PlayArrow: PlayArrow } if (has(MuiIcons, props.iconName)) { const MuiIconComponent = MuiIcons[props.iconName] diff --git a/src/client/components/main_layout/TopBar.js b/src/client/components/main_layout/TopBar.js index 02442ec0d61ed4fb6df78eac9a51daf079d1c77f..37b128ee61beb33d1dabd8f51f7df197817ebd85 100644 --- a/src/client/components/main_layout/TopBar.js +++ b/src/client/components/main_layout/TopBar.js @@ -71,9 +71,9 @@ const useStyles = makeStyles(theme => ({ } }), mainLogo: props => ({ - height: 23, + height: props.layoutConfig.topBar.logoImageReducedHeight || 23, [theme.breakpoints.up(props.layoutConfig.reducedHeightBreakpoint)]: { - height: 40 + height: props.layoutConfig.topBar.logoImageHeight || 40 }, marginRight: theme.spacing(1) }), @@ -101,6 +101,15 @@ const useStyles = makeStyles(theme => ({ } }) }), + logoSecondary: props => ({ + height: 26, + [theme.breakpoints.up('sm')]: { + height: 32 + }, + [theme.breakpoints.up(props.layoutConfig.reducedHeightBreakpoint)]: { + height: 52 + } + }), mobileMenuButton: { padding: 12 } @@ -295,10 +304,21 @@ const TopBar = props => { src={topBar.logoImage} alt={`${intl.get('appTitle.short')} logo`} />} - <Typography className={classes.mainLogoTypography} variant='h5'> - {props.xsScreen ? intl.get('appTitle.mobile') : intl.get('appTitle.short')} - </Typography> + {!topBar.hideLogoText && + <Typography className={classes.mainLogoTypography} variant='h5'> + {props.xsScreen ? intl.get('appTitle.mobile') : intl.get('appTitle.short')} + </Typography>} </Button> + {topBar.logoImageSecondary && + <a + href={topBar.logoImageSecondaryLink} + target='_blank' + rel='noopener noreferrer' + > + <Button> + <img className={classes.logoSecondary} src={topBar.logoImageSecondary} alt='logoSecondary' /> + </Button> + </a>} {showSearchField && <TopBarSearchField fetchFullTextResults={props.fetchFullTextResults} diff --git a/src/client/helpers/helpers.js b/src/client/helpers/helpers.js index e3780518d9dc5699a6363c0532339add68a1182f..555a30b7931d258f8c13467d5eb3257b88171156 100644 --- a/src/client/helpers/helpers.js +++ b/src/client/helpers/helpers.js @@ -205,6 +205,10 @@ export const processPortalConfig = async portalConfig => { const { default: image } = await import(/* webpackMode: "eager" */ `../img/${layoutConfig.topBar.logoImage}`) layoutConfig.topBar.logoImage = image } + if (layoutConfig.topBar.logoImageSecondary) { + const { default: image } = await import(/* webpackMode: "eager" */ `../img/${layoutConfig.topBar.logoImageSecondary}`) + layoutConfig.topBar.logoImageSecondary = image + } } export const createPerspectiveConfig = async ({ portalID, searchPerspectives }) => {