You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
112 lines
2.8 KiB
112 lines
2.8 KiB
import PropTypes from 'prop-types';
|
|
import React, { Component } from 'react';
|
|
import titleCase from 'Utilities/String/titleCase';
|
|
import FieldSet from 'Components/FieldSet';
|
|
import InlineMarkdown from 'Components/Markdown/InlineMarkdown';
|
|
import DescriptionList from 'Components/DescriptionList/DescriptionList';
|
|
import DescriptionListItem from 'Components/DescriptionList/DescriptionListItem';
|
|
import StartTime from './StartTime';
|
|
import styles from './About.css';
|
|
|
|
class About extends Component {
|
|
|
|
//
|
|
// Render
|
|
|
|
render() {
|
|
const {
|
|
version,
|
|
packageVersion,
|
|
packageAuthor,
|
|
isNetCore,
|
|
isDocker,
|
|
runtimeVersion,
|
|
appData,
|
|
startupPath,
|
|
mode,
|
|
startTime,
|
|
timeFormat,
|
|
longDateFormat
|
|
} = this.props;
|
|
|
|
return (
|
|
<FieldSet legend="About">
|
|
<DescriptionList className={styles.descriptionList}>
|
|
<DescriptionListItem
|
|
title="Version"
|
|
data={version}
|
|
/>
|
|
|
|
{
|
|
packageVersion &&
|
|
<DescriptionListItem
|
|
title="Package Version"
|
|
data={(packageAuthor ? <span> {packageVersion} {' by '} <InlineMarkdown data={packageAuthor} /> </span> : packageVersion)}
|
|
/>
|
|
}
|
|
|
|
{
|
|
isNetCore &&
|
|
<DescriptionListItem
|
|
title=".Net Version"
|
|
data={`Yes (${runtimeVersion})`}
|
|
/>
|
|
}
|
|
|
|
{
|
|
isDocker &&
|
|
<DescriptionListItem
|
|
title="Docker"
|
|
data={'Yes'}
|
|
/>
|
|
}
|
|
|
|
<DescriptionListItem
|
|
title="AppData directory"
|
|
data={appData}
|
|
/>
|
|
|
|
<DescriptionListItem
|
|
title="Startup directory"
|
|
data={startupPath}
|
|
/>
|
|
|
|
<DescriptionListItem
|
|
title="Mode"
|
|
data={titleCase(mode)}
|
|
/>
|
|
|
|
<DescriptionListItem
|
|
title="Uptime"
|
|
data={
|
|
<StartTime
|
|
startTime={startTime}
|
|
timeFormat={timeFormat}
|
|
longDateFormat={longDateFormat}
|
|
/>
|
|
}
|
|
/>
|
|
</DescriptionList>
|
|
</FieldSet>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
About.propTypes = {
|
|
version: PropTypes.string.isRequired,
|
|
packageVersion: PropTypes.string,
|
|
packageAuthor: PropTypes.string,
|
|
isNetCore: PropTypes.bool.isRequired,
|
|
runtimeVersion: PropTypes.string.isRequired,
|
|
isDocker: PropTypes.bool.isRequired,
|
|
appData: PropTypes.string.isRequired,
|
|
startupPath: PropTypes.string.isRequired,
|
|
mode: PropTypes.string.isRequired,
|
|
startTime: PropTypes.string.isRequired,
|
|
timeFormat: PropTypes.string.isRequired,
|
|
longDateFormat: PropTypes.string.isRequired
|
|
};
|
|
|
|
export default About;
|