New: Display build version in header
This commit is contained in:
parent
217611d716
commit
b0fc173140
|
@ -37,6 +37,11 @@
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.version {
|
||||||
|
margin-right: 5px;
|
||||||
|
line-height: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
.donate {
|
.donate {
|
||||||
composes: link from '~Components/Link/Link.css';
|
composes: link from '~Components/Link/Link.css';
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ interface CssExports {
|
||||||
'logoLink': string;
|
'logoLink': string;
|
||||||
'right': string;
|
'right': string;
|
||||||
'sidebarToggleContainer': string;
|
'sidebarToggleContainer': string;
|
||||||
|
'version': string;
|
||||||
}
|
}
|
||||||
export const cssExports: CssExports;
|
export const cssExports: CssExports;
|
||||||
export default cssExports;
|
export default cssExports;
|
||||||
|
|
|
@ -46,6 +46,8 @@ class PageHeader extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
|
version,
|
||||||
|
isSmallScreen,
|
||||||
onSidebarToggle
|
onSidebarToggle
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
@ -75,6 +77,14 @@ class PageHeader extends Component {
|
||||||
<SeriesSearchInputConnector />
|
<SeriesSearchInputConnector />
|
||||||
|
|
||||||
<div className={styles.right}>
|
<div className={styles.right}>
|
||||||
|
{
|
||||||
|
!isSmallScreen && version ?
|
||||||
|
<div className={styles.version} title={translate('Version')}>
|
||||||
|
v{version}
|
||||||
|
</div> :
|
||||||
|
null
|
||||||
|
}
|
||||||
|
|
||||||
<IconButton
|
<IconButton
|
||||||
className={styles.donate}
|
className={styles.donate}
|
||||||
name={icons.HEART}
|
name={icons.HEART}
|
||||||
|
@ -98,6 +108,8 @@ class PageHeader extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
PageHeader.propTypes = {
|
PageHeader.propTypes = {
|
||||||
|
version: PropTypes.string.isRequired,
|
||||||
|
isSmallScreen: PropTypes.bool.isRequired,
|
||||||
onSidebarToggle: PropTypes.func.isRequired,
|
onSidebarToggle: PropTypes.func.isRequired,
|
||||||
bindShortcut: PropTypes.func.isRequired
|
bindShortcut: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
|
@ -77,6 +77,7 @@ class Page extends Component {
|
||||||
isSidebarVisible,
|
isSidebarVisible,
|
||||||
enableColorImpairedMode,
|
enableColorImpairedMode,
|
||||||
authenticationEnabled,
|
authenticationEnabled,
|
||||||
|
version,
|
||||||
onSidebarToggle,
|
onSidebarToggle,
|
||||||
onSidebarVisibleChange
|
onSidebarVisibleChange
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
@ -87,6 +88,8 @@ class Page extends Component {
|
||||||
<SignalRConnector />
|
<SignalRConnector />
|
||||||
|
|
||||||
<PageHeader
|
<PageHeader
|
||||||
|
version={version}
|
||||||
|
isSmallScreen={isSmallScreen}
|
||||||
onSidebarToggle={onSidebarToggle}
|
onSidebarToggle={onSidebarToggle}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -130,6 +133,7 @@ Page.propTypes = {
|
||||||
isDisconnected: PropTypes.bool.isRequired,
|
isDisconnected: PropTypes.bool.isRequired,
|
||||||
enableColorImpairedMode: PropTypes.bool.isRequired,
|
enableColorImpairedMode: PropTypes.bool.isRequired,
|
||||||
authenticationEnabled: PropTypes.bool.isRequired,
|
authenticationEnabled: PropTypes.bool.isRequired,
|
||||||
|
version: PropTypes.string.isRequired,
|
||||||
onResize: PropTypes.func.isRequired,
|
onResize: PropTypes.func.isRequired,
|
||||||
onSidebarToggle: PropTypes.func.isRequired,
|
onSidebarToggle: PropTypes.func.isRequired,
|
||||||
onSidebarVisibleChange: PropTypes.func.isRequired
|
onSidebarVisibleChange: PropTypes.func.isRequired
|
||||||
|
|
|
@ -259,6 +259,7 @@ class PageConnector extends Component {
|
||||||
dispatchFetchUISettings,
|
dispatchFetchUISettings,
|
||||||
dispatchFetchStatus,
|
dispatchFetchStatus,
|
||||||
dispatchFetchTranslations,
|
dispatchFetchTranslations,
|
||||||
|
version,
|
||||||
...otherProps
|
...otherProps
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
@ -275,6 +276,7 @@ class PageConnector extends Component {
|
||||||
return (
|
return (
|
||||||
<Page
|
<Page
|
||||||
{...otherProps}
|
{...otherProps}
|
||||||
|
version={version}
|
||||||
onSidebarToggle={this.onSidebarToggle}
|
onSidebarToggle={this.onSidebarToggle}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@ -300,6 +302,7 @@ PageConnector.propTypes = {
|
||||||
dispatchFetchUISettings: PropTypes.func.isRequired,
|
dispatchFetchUISettings: PropTypes.func.isRequired,
|
||||||
dispatchFetchStatus: PropTypes.func.isRequired,
|
dispatchFetchStatus: PropTypes.func.isRequired,
|
||||||
dispatchFetchTranslations: PropTypes.func.isRequired,
|
dispatchFetchTranslations: PropTypes.func.isRequired,
|
||||||
|
version: PropTypes.string.isRequired,
|
||||||
onSidebarVisibleChange: PropTypes.func.isRequired
|
onSidebarVisibleChange: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue