Skip to content
Snippets Groups Projects
Commit 443f0126 authored by esikkala's avatar esikkala
Browse files

Adapt configs

parent b08eb518
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
......@@ -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]
......
......@@ -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}
......
......@@ -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 }) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment