修复系统设置展示版本失败

This commit is contained in:
whyour
2023-09-23 11:14:24 +08:00
parent 16734326cf
commit d7e0531935
3 changed files with 8 additions and 13 deletions
+4 -9
View File
@@ -7,15 +7,7 @@ import dayjs from 'dayjs';
const { Link } = Typography;
enum TVersion {
'develop' = '开发版',
'master' = '正式版',
'debian' = '正式版',
}
const About = ({ systemInfo }: { systemInfo: SharedContext['systemInfo'] }) => {
const version = TVersion[systemInfo.branch] || '正式版';
return (
<div className={styles.container}>
<img
@@ -32,7 +24,10 @@ const About = ({ systemInfo }: { systemInfo: SharedContext['systemInfo'] }) => {
</span>
<Descriptions>
<Descriptions.Item label={intl.get('版本')} span={3}>
{intl.get(version)} v{systemInfo.version}
{systemInfo?.branch === 'develop'
? intl.get('开发版')
: intl.get('正式版')}{' '}
v{systemInfo.version}
</Descriptions.Item>
<Descriptions.Item label={intl.get('更新时间')} span={3}>
{dayjs(systemInfo.publishTime * 1000).format('YYYY-MM-DD HH:mm')}