Unverified Commit 591c67fa authored by zhu-mingye's avatar zhu-mingye Committed by GitHub

[Optimize][dinky-web] Optimize about page (#1605)

* Optimize about page * Optimize nav of version * Optimize about page
parent 1a6b2288
...@@ -225,7 +225,7 @@ export default [ ...@@ -225,7 +225,7 @@ export default [
path: '/about', path: '/about',
name: 'about', name: 'about',
icon: 'smile', icon: 'smile',
component: './Welcome', component: './About',
}, },
{ {
path: '*', path: '*',
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
"@ant-design/icons": "^5.0.1", "@ant-design/icons": "^5.0.1",
"@ant-design/pro-components": "^2.3.52", "@ant-design/pro-components": "^2.3.52",
"@ant-design/use-emotion-css": "1.0.4", "@ant-design/use-emotion-css": "1.0.4",
"@umijs/route-utils": "^2.1.3", "@umijs/route-utils": "^4.0.1",
"antd": "^5.0.0", "antd": "^5.0.0",
"classnames": "^2.3.2", "classnames": "^2.3.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
......
...@@ -20,6 +20,9 @@ import {useEmotionCss} from '@ant-design/use-emotion-css'; ...@@ -20,6 +20,9 @@ import {useEmotionCss} from '@ant-design/use-emotion-css';
import {SelectLang, useModel} from '@umijs/max'; import {SelectLang, useModel} from '@umijs/max';
import React from 'react'; import React from 'react';
import Avatar from './AvatarDropdown'; import Avatar from './AvatarDropdown';
import {VERSION} from "@/components/Version/Version";
import { l } from '@/utils/intl';
import {Space} from "antd";
export type SiderTheme = 'light' | 'dark'; export type SiderTheme = 'light' | 'dark';
...@@ -61,6 +64,7 @@ const GlobalHeaderRight: React.FC = () => { ...@@ -61,6 +64,7 @@ const GlobalHeaderRight: React.FC = () => {
<div className={className}> <div className={className}>
<Avatar /> <Avatar />
<SelectLang icon={<GlobalOutlined/>} className={actionClassName} /> <SelectLang icon={<GlobalOutlined/>} className={actionClassName} />
<Space className={actionClassName}>{l('menu.version','',{version: VERSION})}</Space>
</div> </div>
); );
}; };
......
...@@ -60,4 +60,5 @@ export default { ...@@ -60,4 +60,5 @@ export default {
'menu.settings.systemInfo': 'System Info', 'menu.settings.systemInfo': 'System Info',
'menu.settings.processList': 'Process List', 'menu.settings.processList': 'Process List',
'menu.about': 'About', 'menu.about': 'About',
'menu.version': 'Version: {version}',
}; };
...@@ -26,10 +26,19 @@ export default { ...@@ -26,10 +26,19 @@ export default {
'pages.login.password.placeholder': 'Password', 'pages.login.password.placeholder': 'Password',
'pages.login.password.required': 'Please input your password!', 'pages.login.password.required': 'Please input your password!',
'pages.login.rememberMe': 'Remember me', 'pages.login.rememberMe': 'Remember me',
'pages.welcome.alertMessage': 'The real-time computing platform Dinky will be released soon, and it is currently a trial version with version number {version}.', 'pages.about.alertMessage': 'The real-time computing platform Dinky will be released soon, and it is currently a trial version with version number {version}.',
'pages.welcome.Community' : 'Welcome to join the Official Community', 'pages.about.Community' : 'Welcome to join the Dinky Official Community, Build a win-win situation',
'pages.welcome.QQcode': 'QQ Official Community Group', 'pages.about.QQcode': 'QQ Official Community Group',
'pages.welcome.wechatCode': 'Wechat Official Account', 'pages.about.wechatCode': 'Wechat Official Account',
'pages.welcome.dingTalkCode': 'DingTalk Official Community Group', 'pages.about.dingTalkCode': 'DingTalk Official Community Group',
'pages.about.wechatApply': 'WeChat user community group: recommendation, add wechat wenmo_ai to invite into the group (application notes Dinky + company name + position, no approval will not be written)`',
'pages.about.precautions': 'Precautions',
'pages.about.usingHelp': 'Using Help',
'pages.about.communityRules': 'Community Rules',
'pages.about.communityRules.1': 'It is forbidden to publish or discuss content that is irrelevant or inappropriate to the subject of this group, once found it will be kicked immediately. ',
'pages.about.communityRules.2': 'For bug feedback and feature improvements or suggestions, please use issue, please read the issue document requirements. ',
'pages.about.communityRules.3': 'Please read the Readme, official account articles, official website documents, and Bilibili videos carefully before deployment and use. ',
'pages.about.communityRules.4': 'Please be polite and explain [version, execution mode, operation description, screenshot] when asking questions in the group. ',
'pages.about.communityRules.5': ' Register who is using Dinky, and can enter the enterprise user group to provide technical support. ',
}; };
...@@ -60,4 +60,5 @@ export default { ...@@ -60,4 +60,5 @@ export default {
'menu.settings.systemInfo': '系统信息', 'menu.settings.systemInfo': '系统信息',
'menu.settings.processList': '进程列表', 'menu.settings.processList': '进程列表',
'menu.about': '关于', 'menu.about': '关于',
'menu.version': '版本:{version}',
}; };
...@@ -25,10 +25,21 @@ export default { ...@@ -25,10 +25,21 @@ export default {
'pages.login.password.placeholder': '密码', 'pages.login.password.placeholder': '密码',
'pages.login.password.required': '密码是必填项!', 'pages.login.password.required': '密码是必填项!',
'pages.login.rememberMe': '自动登录', 'pages.login.rememberMe': '自动登录',
'pages.welcome.alertMessage': '实时计算平台 Dinky 即将发布,目前为体验版,版本号为 {version}。',
'pages.admin.subPage.title': ' 这个页面只有 admin 权限才能查看', 'pages.admin.subPage.title': ' 这个页面只有 admin 权限才能查看',
'pages.welcome.Community' : '欢迎加入官方社区', 'pages.about.alertMessage': '实时计算平台 Dinky 即将发布,目前为体验版,版本号为 {version}。',
'pages.welcome.QQcode': 'QQ官方社区群', 'pages.about.Community' : '欢迎加入 Dinky 官方社区,共建共赢',
'pages.welcome.wechatCode': '微信公众号', 'pages.about.QQcode': 'QQ官方社区群',
'pages.welcome.dingTalkCode': '钉钉官方社区群', 'pages.about.wechatCode': '微信公众号',
'pages.about.dingTalkCode': '钉钉官方社区群',
'pages.about.wechatApply': '微信用户社区群:推荐,添加微信号 wenmo_ai 邀请进群 (申请备注 Dinky + 企业名 + 职位,不写不批)',
'pages.about.precautions': '注意事项',
'pages.about.usingHelp': '使用帮助',
'pages.about.communityRules': '社区守则',
'pages.about.communityRules.1': '禁止发布或讨论与本群主旨无关或不良的内容,一经发现立马被踢。',
'pages.about.communityRules.2': '关于 Bug 反馈与功能改进或提议请通过 issue 进行,请阅读 issue 文档要求。',
'pages.about.communityRules.3': '部署和使用前请先仔细阅读 Readme、公众号文章、官网文档、B站视频。',
'pages.about.communityRules.4': '群提问题请礼貌并且说明【版本、执行模式、操作描述、截图】。',
'pages.about.communityRules.5': ' 登记谁在使用 Dinky,可进入企业用户群提供技术支持。',
}; };
...@@ -20,16 +20,18 @@ import {l} from '@/utils/intl'; ...@@ -20,16 +20,18 @@ import {l} from '@/utils/intl';
import {PageContainer} from '@ant-design/pro-components'; import {PageContainer} from '@ant-design/pro-components';
import {Alert, Card, Image, Typography} from 'antd'; import {Alert, Card, Image, Typography} from 'antd';
import React from 'react'; import React from 'react';
import {HeartOutlined, LinkOutlined, SmileOutlined} from "@ant-design/icons";
const { Paragraph} = Typography; const {Paragraph} = Typography;
const Welcome: React.FC = () => { const About: React.FC = () => {
return ( return (
<PageContainer title={false} > <PageContainer title={false}>
<Card> <Card>
<Alert <Alert
message={l('pages.welcome.alertMessage', '', {version: VERSION})} message={l('pages.about.Community', '', {version: VERSION})}
type="success" type="success"
icon={<SmileOutlined height={30} width={30}/>}
showIcon showIcon
banner banner
style={{ style={{
...@@ -37,31 +39,89 @@ const Welcome: React.FC = () => { ...@@ -37,31 +39,89 @@ const Welcome: React.FC = () => {
marginBottom: 24, marginBottom: 24,
}} }}
/> />
<Typography.Text strong>
{l('pages.welcome.Community')}
</Typography.Text>
<br/><br/>
<Paragraph style={{marginRight: 30}}> <Paragraph style={{marginRight: 30}}>
<Typography.Text title={l('pages.welcome.QQcode')} style={{marginRight: 80}} strong ellipsis={true}> <Typography.Text title={l('pages.about.QQcode')} style={{marginRight: 80}} strong ellipsis={true}>
<Image title={l('pages.welcome.QQcode')} height={300} width={250} src="community/qq.png"/> <Image title={l('pages.about.QQcode')} height={300} width={250} src="community/qq.png"/>
</Typography.Text> </Typography.Text>
<Typography.Text style={{marginRight: 80}} strong ellipsis={true}> <Typography.Text style={{marginRight: 80}} strong ellipsis={true}>
<Image title={l('pages.welcome.wechatCode')} height={300} width={250} src="community/wechat.jpg"/> <Image title={l('pages.about.wechatCode')} height={300} width={250} src="community/wechat.jpg"/>
</Typography.Text> </Typography.Text>
<Typography.Text strong ellipsis={true}> <Typography.Text strong ellipsis={true}>
<Image title={l('pages.welcome.dingTalkCode')} height={300} width={250} src="community/dingtalk.jpg"/> <Image title={l('pages.about.dingTalkCode')} height={300} width={250} src="community/dingtalk.jpg"/>
</Typography.Text> </Typography.Text>
</Paragraph> </Paragraph>
<br/>
<Alert
message={l('pages.about.precautions')}
description={l('pages.about.wechatApply')}
type="warning"
showIcon
banner
style={{
margin: -12,
marginBottom: 24,
}}
/>
<br/><br/>
<Typography.Text strong>
<Alert
message={l('pages.about.usingHelp')}
icon={<SmileOutlined/>}
type="info"
showIcon
banner
style={{
margin: -12,
marginBottom: 24,
}}
/>
<Paragraph style={{marginRight: 30}}>
<Typography.Text ellipsis strong>
<LinkOutlined/> GitHub:<a href={'https://github.com/DataLinkDC/dinky'} target={'_blank'}>https://github.com/DataLinkDC/dinky</a>
</Typography.Text>
<br/>
<Typography.Text ellipsis strong>
<LinkOutlined/> Gitee: <a href={'https://gitee.com/DataLinkDC/Dinky'} target={"_blank"}>https://gitee.com/DataLinkDC/Dinky</a>
</Typography.Text>
<br/>
<Typography.Text ellipsis strong>
<LinkOutlined/> Document: <a href={'http://www.dlink.top'} target={"_blank"}>http://www.dlink.top</a>
</Typography.Text>
<br/>
<Typography.Text ellipsis strong>
<LinkOutlined/> bilibili: <a href={'https://space.bilibili.com/366484959/video'} target={"_blank"}>https://space.bilibili.com/366484959/video</a>
</Typography.Text>
</Paragraph>
<br/>
<Alert
message={l('pages.about.communityRules')}
type="success"
showIcon
icon={<HeartOutlined style={{color: "red"}}/>}
banner
style={{
margin: -12,
marginBottom: 24,
}}
/>
<ul>
<li>{l('pages.about.communityRules.1')}</li>
<li>{l('pages.about.communityRules.2')}</li>
<li>{l('pages.about.communityRules.3')}</li>
<li>{l('pages.about.communityRules.4')}</li>
<li><a href={'https://github.com/DataLinkDC/dinky/issues/66'} target={"_blank"}>Issue</a>{l('pages.about.communityRules.5')}</li>
</ul>
</Typography.Text>
</Card> </Card>
</PageContainer> </PageContainer>
); );
}; };
export default Welcome; export default About;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment