Skip to content

Commit

Permalink
Merge pull request #523 from antvis/chore/update-site
Browse files Browse the repository at this point in the history
feat: add security alert
  • Loading branch information
pomelo-nwu authored Sep 20, 2023
2 parents fc097e5 + ff46ec5 commit 2fc85c4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/gi-site/src/components/Navbar/Language.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface LanguageProps {}
const options = [
{
value: LANGUAGE_KEY_NAME.ZhCN,
label: '中',
label: $i18n.get({ id: 'gi-site.components.Navbar.Language.Medium', dm: '中' }),
},
{
value: LANGUAGE_KEY_NAME.EnUs,
Expand Down
4 changes: 3 additions & 1 deletion packages/gi-site/src/i18n/strings/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -716,5 +716,7 @@
"gi-site.src.services.user.AvailableVipAssets": "Available VIP assets",
"gi-site.src.services.user.DetectedAvailableVipAssetsWhether": "Detected available VIP assets, whether to log in to obtain",
"gi-site.components.Navbar.Preview.Preview": "Preview",
"gi-site.src.layouts.SideNav.Solution": "Solution"
"gi-site.src.layouts.SideNav.Solution": "Solution",
"gi-site.components.Navbar.Language.Medium": "",
"gi-site.pages.Workspace.Recover.AttentionTheSiteParsesAnd": "Attention⚠The site parses and runs files. If the files are shared by others, make sure that they are secure and trusted first."
}
4 changes: 3 additions & 1 deletion packages/gi-site/src/i18n/strings/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -716,5 +716,7 @@
"gi-site.src.services.user.AvailableVipAssets": "可用的 VIP 资产",
"gi-site.src.services.user.DetectedAvailableVipAssetsWhether": "检测到可用的 VIP 资产,是否前往登陆获取",
"gi-site.components.Navbar.Preview.Preview": "预览",
"gi-site.src.layouts.SideNav.Solution": "解决方案"
"gi-site.src.layouts.SideNav.Solution": "解决方案",
"gi-site.components.Navbar.Language.Medium": "",
"gi-site.pages.Workspace.Recover.AttentionTheSiteParsesAnd": "注意⚠️:站点会解析文件并运行,如果是他人分享的文件,请先确保安全可信。"
}
11 changes: 10 additions & 1 deletion packages/gi-site/src/pages/Workspace/Recover.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FileTextOutlined } from '@ant-design/icons';
import { Button, Upload } from 'antd';
import { Alert, Button, Upload } from 'antd';
import * as React from 'react';
import $i18n from '../../i18n';
const { Dragger } = Upload;
Expand Down Expand Up @@ -63,6 +63,15 @@ const Recover: React.FunctionComponent<RecoverProps> = props => {

return (
<>
<Alert
style={{ marginBottom: '8px' }}
type="warning"
message={$i18n.get({
id: 'gi-site.pages.Workspace.Recover.AttentionTheSiteParsesAnd',
dm: '注意⚠️:站点会解析文件并运行,如果是他人分享的文件,请先确保安全可信。',
})}
/>

<div
style={{
textAlign: 'center',
Expand Down

0 comments on commit 2fc85c4

Please sign in to comment.