@antv/dumi-theme-antv 0.8.0-beta.1 → 0.8.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AI/HomeDialog/ModeSelector/index.js +4 -1
- package/dist/components/AI/HomeDialog/PromptTextarea/ChooseLib/index.js +5 -2
- package/dist/components/AI/HomeDialog/PromptTextarea/ChooseLib/index.module.less +0 -1
- package/dist/components/AI/HomeDialog/PromptTextarea/Uploader/DataUploader.js +225 -0
- package/dist/components/AI/HomeDialog/PromptTextarea/index.js +57 -26
- package/dist/components/AI/HomeDialog/PromptTextarea/index.module.less +1 -0
- package/dist/components/AI/HomeDialog/RecommendCase/Card.js +10 -3
- package/dist/components/AI/HomeDialog/RecommendCase/index.js +7 -2
- package/dist/components/AI/HomeDialog/index.js +11 -3
- package/dist/components/AI/constant.js +2 -2
- package/dist/hooks/useProducts.js +3 -2
- package/dist/locales/en.json +91 -1
- package/dist/locales/zh.json +91 -1
- package/dist/model/AIChat.js +5 -3
- package/dist/pages/AIPlayground/components/ConversationsMenu/index.js +26 -7
- package/dist/pages/AIPlayground/components/MarkdownComponent/MarkdownCodeBlock.js +14 -4
- package/dist/pages/AIPlayground/components/MsgBox/index.js +29 -9
- package/dist/pages/AIPlayground/components/SessionLayout/index.js +18 -10
- package/dist/pages/AIPlayground/components/SessionLayout/index.module.less +2 -0
- package/dist/pages/AIPlayground/components/TaskBox/index.js +77 -33
- package/dist/plugin/index.js +2 -2
- package/dist/slots/CodeEditor/Toolbar.js +15 -9
- package/dist/slots/CodeEditor/index.js +15 -9
- package/dist/slots/CodeRunner/index.js +5 -2
- package/dist/slots/Header/Search/SearchResult.js +8 -3
- package/dist/slots/Header/index.js +24 -8
- package/package.json +1 -1
|
@@ -1,14 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { Sandpack } from '@codesandbox/sandpack-react';
|
|
2
|
+
import { useSiteData } from 'dumi';
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
|
+
import { useSnapshot } from 'valtio';
|
|
4
5
|
import { AIChatStore } from "../../../../model/AIChat";
|
|
5
|
-
import
|
|
6
|
+
import CodeRunner from "dumi/theme/slots/CodeRunner";
|
|
6
7
|
import { wrap2Sandpack } from "./generateCode";
|
|
8
|
+
import styles from "./index.module.less";
|
|
7
9
|
// import {code} from "../../demo";
|
|
8
10
|
// import {requestProxy, useVisionsnapSdk} from "../../../../hooks/useVisionsnapSdk";
|
|
9
11
|
|
|
10
12
|
function TaskBox() {
|
|
11
13
|
var snap = useSnapshot(AIChatStore);
|
|
14
|
+
var _useSiteData = useSiteData(),
|
|
15
|
+
themeConfig = _useSiteData.themeConfig;
|
|
16
|
+
var demoId = useMemo(function () {
|
|
17
|
+
return crypto.randomUUID();
|
|
18
|
+
}, [snap.codeBlock]);
|
|
19
|
+
var exampleTopics = useMemo(function () {
|
|
20
|
+
return [{
|
|
21
|
+
icon: '',
|
|
22
|
+
title: {},
|
|
23
|
+
id: snap.anonymousUserId,
|
|
24
|
+
examples: [
|
|
25
|
+
// 这是一个 Example 对象
|
|
26
|
+
{
|
|
27
|
+
icon: '',
|
|
28
|
+
title: {},
|
|
29
|
+
id: snap.activeSessionId,
|
|
30
|
+
api: 'https://example.com/api/pie-chart',
|
|
31
|
+
// 必须的 api 属性
|
|
32
|
+
demos: [
|
|
33
|
+
// 这是一个 Demo 对象
|
|
34
|
+
{
|
|
35
|
+
id: demoId,
|
|
36
|
+
screenshot: '',
|
|
37
|
+
title: {},
|
|
38
|
+
filename: 'index.tsx',
|
|
39
|
+
// 必须的 filename 属性
|
|
40
|
+
source: snap.codeBlock
|
|
41
|
+
}]
|
|
42
|
+
}]
|
|
43
|
+
}];
|
|
44
|
+
}, [demoId, snap.activeSessionId, snap.anonymousUserId, snap.codeBlock]);
|
|
12
45
|
|
|
13
46
|
// const { sdk, loading } = useVisionsnapSdk('3.2.4');
|
|
14
47
|
//
|
|
@@ -27,35 +60,46 @@ function TaskBox() {
|
|
|
27
60
|
// // requestProxy={requestProxy}
|
|
28
61
|
// isStreaming={false} />
|
|
29
62
|
// );
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
63
|
+
if (themeConfig.isAntVSite) {
|
|
64
|
+
return /*#__PURE__*/React.createElement(Sandpack, {
|
|
65
|
+
template: "vanilla" // 指定项目模板,Sandpack 会据此配置环境
|
|
66
|
+
,
|
|
67
|
+
files: wrap2Sandpack(snap.codeBlock),
|
|
68
|
+
options: {
|
|
69
|
+
showLineNumbers: true,
|
|
70
|
+
// 显示行号
|
|
71
|
+
showTabs: true,
|
|
72
|
+
closableTabs: false,
|
|
73
|
+
editorHeight: 'calc(100vh - 150px)',
|
|
74
|
+
rtl: true,
|
|
75
|
+
classes: {
|
|
76
|
+
'sp-layout': styles['antv-sp-layout']
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
theme: "light" // 主题:dark, light, auto
|
|
80
|
+
,
|
|
81
|
+
customSetup: {
|
|
82
|
+
entry: '/index.tsx',
|
|
83
|
+
npmRegistries: [{
|
|
84
|
+
limitToScopes: false,
|
|
85
|
+
// 设为 false 使所有包都从自定义 registry 获取
|
|
86
|
+
registryUrl: 'https://registry.npmmirror.com',
|
|
87
|
+
// 使用淘宝镜像
|
|
88
|
+
enabledScopes: [],
|
|
89
|
+
proxyEnabled: false
|
|
90
|
+
}]
|
|
44
91
|
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}]
|
|
58
|
-
}
|
|
59
|
-
});
|
|
92
|
+
});
|
|
93
|
+
} else {
|
|
94
|
+
return /*#__PURE__*/React.createElement(CodeRunner, {
|
|
95
|
+
isPlayground: true,
|
|
96
|
+
showAI: false,
|
|
97
|
+
size: 0.5,
|
|
98
|
+
topic: snap.anonymousUserId,
|
|
99
|
+
example: snap.activeSessionId,
|
|
100
|
+
demo: demoId,
|
|
101
|
+
exampleTopics: exampleTopics
|
|
102
|
+
});
|
|
103
|
+
}
|
|
60
104
|
}
|
|
61
105
|
export default TaskBox;
|
package/dist/plugin/index.js
CHANGED
|
@@ -168,8 +168,8 @@ export default function ThemeAntVContextWrapper() {
|
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
170
|
id: "dumi-theme-antv-ai-playground-lang",
|
|
171
|
-
absPath: "/:language/ai-playground
|
|
172
|
-
path: ":language/ai-playground
|
|
171
|
+
absPath: "/:language/ai-playground",
|
|
172
|
+
path: ":language/ai-playground",
|
|
173
173
|
file: `${PAGES_DIR}/AIPlayground`
|
|
174
174
|
}
|
|
175
175
|
];
|
|
@@ -44,7 +44,9 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
44
44
|
onToggleFullscreen = _ref$onToggleFullscre === void 0 ? null : _ref$onToggleFullscre,
|
|
45
45
|
onExecuteCode = _ref.onExecuteCode,
|
|
46
46
|
onClickAI = _ref.onClickAI,
|
|
47
|
-
onReload = _ref.onReload
|
|
47
|
+
onReload = _ref.onReload,
|
|
48
|
+
_ref$showAI = _ref.showAI,
|
|
49
|
+
showAI = _ref$showAI === void 0 ? true : _ref$showAI;
|
|
48
50
|
var locale = useLocale();
|
|
49
51
|
var exampleTitle = _typeof(title) === 'object' ? title[locale.id] : title;
|
|
50
52
|
|
|
@@ -80,15 +82,19 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
80
82
|
return onEditorTabChange(tab);
|
|
81
83
|
}
|
|
82
84
|
}, tab, " ", slot && slot);
|
|
83
|
-
})), /*#__PURE__*/React.createElement("a", {
|
|
85
|
+
})), showAI ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("a", {
|
|
84
86
|
className: styles.ai,
|
|
85
87
|
onClick: onClickAI
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
89
|
+
id: "ai.toolbar.assistant"
|
|
90
|
+
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
91
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
92
|
+
id: "ai.toolbar.restore"
|
|
93
|
+
})
|
|
88
94
|
}, /*#__PURE__*/React.createElement("span", {
|
|
89
95
|
className: styles.ai,
|
|
90
96
|
onClick: onReload
|
|
91
|
-
}, /*#__PURE__*/React.createElement(ReloadOutlined, null))), riddleVisible ? /*#__PURE__*/React.createElement("form", {
|
|
97
|
+
}, /*#__PURE__*/React.createElement(ReloadOutlined, null)))) : null, riddleVisible ? /*#__PURE__*/React.createElement("form", {
|
|
92
98
|
action: "//riddle.alibaba-inc.com/riddles/define",
|
|
93
99
|
method: "POST",
|
|
94
100
|
target: "_blank"
|
|
@@ -98,7 +104,7 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
98
104
|
value: JSON.stringify(riddlePrefillConfig)
|
|
99
105
|
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
100
106
|
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
101
|
-
id: "
|
|
107
|
+
id: "ai.toolbar.open.riddle"
|
|
102
108
|
})
|
|
103
109
|
}, /*#__PURE__*/React.createElement("input", {
|
|
104
110
|
type: "submit",
|
|
@@ -106,7 +112,7 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
106
112
|
className: styles.riddle
|
|
107
113
|
}))) : null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
108
114
|
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
109
|
-
id: "
|
|
115
|
+
id: "ai.toolbar.open.stackblitz"
|
|
110
116
|
})
|
|
111
117
|
}, /*#__PURE__*/React.createElement(ThunderboltOutlined, {
|
|
112
118
|
className: styles.stackblitz,
|
|
@@ -115,7 +121,7 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
115
121
|
}
|
|
116
122
|
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
117
123
|
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
118
|
-
id: "
|
|
124
|
+
id: "ai.toolbar.open.codesandbox"
|
|
119
125
|
})
|
|
120
126
|
}, /*#__PURE__*/React.createElement("form", {
|
|
121
127
|
action: "https://codesandbox.io/api/v1/sandboxes/define",
|
|
@@ -141,7 +147,7 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
141
147
|
}
|
|
142
148
|
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
143
149
|
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
144
|
-
id: "
|
|
150
|
+
id: "ai.toolbar.execute"
|
|
145
151
|
})
|
|
146
152
|
}, /*#__PURE__*/React.createElement(PlayCircleOutlined, {
|
|
147
153
|
onClick: onExecuteCode,
|
|
@@ -15,7 +15,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
15
15
|
import MonacoEditor, { loader } from '@monaco-editor/react';
|
|
16
16
|
import { Drawer, Switch } from 'antd';
|
|
17
17
|
import { autoType as d3AutoType, dsvFormat } from 'd3-dsv';
|
|
18
|
-
import { useLocale, useSiteData } from 'dumi';
|
|
18
|
+
import { useLocale, useSiteData, useIntl } from 'dumi';
|
|
19
19
|
import { debounce, noop } from 'lodash-es';
|
|
20
20
|
import { format } from 'prettier';
|
|
21
21
|
import parserBabel from 'prettier/parser-babel';
|
|
@@ -57,10 +57,13 @@ var CodeEditor = function CodeEditor(_ref) {
|
|
|
57
57
|
_ref$onError = _ref.onError,
|
|
58
58
|
onError = _ref$onError === void 0 ? noop : _ref$onError,
|
|
59
59
|
_ref$onFullscreen = _ref.onFullscreen,
|
|
60
|
-
onFullscreen = _ref$onFullscreen === void 0 ? noop : _ref$onFullscreen
|
|
60
|
+
onFullscreen = _ref$onFullscreen === void 0 ? noop : _ref$onFullscreen,
|
|
61
|
+
_ref$showAI = _ref.showAI,
|
|
62
|
+
showAI = _ref$showAI === void 0 ? true : _ref$showAI;
|
|
61
63
|
var locale = useLocale();
|
|
62
64
|
var _useSiteData = useSiteData(),
|
|
63
65
|
themeConfig = _useSiteData.themeConfig;
|
|
66
|
+
var intl = useIntl();
|
|
64
67
|
var _themeConfig$es = themeConfig.es5,
|
|
65
68
|
es5 = _themeConfig$es === void 0 ? true : _themeConfig$es,
|
|
66
69
|
_themeConfig$showSpec = themeConfig.showSpecTab,
|
|
@@ -103,8 +106,8 @@ var CodeEditor = function CodeEditor(_ref) {
|
|
|
103
106
|
setCurrentEditorTab = _useState12[1];
|
|
104
107
|
var _useState13 = useState(false),
|
|
105
108
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
showAIDrawer = _useState14[0],
|
|
110
|
+
setShowAIDrawer = _useState14[1];
|
|
108
111
|
var containerId = "playgroundScriptContainer_".concat(exampleId);
|
|
109
112
|
|
|
110
113
|
// 出发 auto resize
|
|
@@ -280,7 +283,7 @@ var CodeEditor = function CodeEditor(_ref) {
|
|
|
280
283
|
// 用于更新当前 example 的 spec 和 data
|
|
281
284
|
useEffect(function () {
|
|
282
285
|
setCurrentEditorTab(EDITOR_TABS.JAVASCRIPT);
|
|
283
|
-
|
|
286
|
+
setShowAIDrawer(false);
|
|
284
287
|
}, [exampleId]);
|
|
285
288
|
|
|
286
289
|
// hook 用户的数据
|
|
@@ -384,7 +387,7 @@ var CodeEditor = function CodeEditor(_ref) {
|
|
|
384
387
|
}
|
|
385
388
|
};
|
|
386
389
|
var onClickAI = function onClickAI() {
|
|
387
|
-
|
|
390
|
+
setShowAIDrawer(true);
|
|
388
391
|
};
|
|
389
392
|
var onReload = function onReload() {
|
|
390
393
|
setCode(source);
|
|
@@ -406,6 +409,7 @@ var CodeEditor = function CodeEditor(_ref) {
|
|
|
406
409
|
onEditorTabChange: onTabChange,
|
|
407
410
|
onToggleFullscreen: onFullscreen,
|
|
408
411
|
onClickAI: onClickAI,
|
|
412
|
+
showAI: showAI,
|
|
409
413
|
onReload: onReload,
|
|
410
414
|
slots: {
|
|
411
415
|
Spec: /*#__PURE__*/React.createElement("span", {
|
|
@@ -461,10 +465,10 @@ var CodeEditor = function CodeEditor(_ref) {
|
|
|
461
465
|
}), /*#__PURE__*/React.createElement(Drawer, {
|
|
462
466
|
placement: "right",
|
|
463
467
|
closable: true,
|
|
464
|
-
open:
|
|
468
|
+
open: showAIDrawer,
|
|
465
469
|
getContainer: false,
|
|
466
470
|
onClose: function onClose() {
|
|
467
|
-
return
|
|
471
|
+
return setShowAIDrawer(false);
|
|
468
472
|
},
|
|
469
473
|
rootClassName: styles.drawer,
|
|
470
474
|
width: '90%'
|
|
@@ -473,7 +477,9 @@ var CodeEditor = function CodeEditor(_ref) {
|
|
|
473
477
|
messages: [{
|
|
474
478
|
id: crypto.randomUUID(),
|
|
475
479
|
role: 'assistant',
|
|
476
|
-
content:
|
|
480
|
+
content: intl.formatMessage({
|
|
481
|
+
id: 'ai.assistant.editor.intro'
|
|
482
|
+
}),
|
|
477
483
|
createdAt: Date.now()
|
|
478
484
|
}],
|
|
479
485
|
context: valueOf(tab),
|
|
@@ -32,7 +32,9 @@ var CodeRunner = function CodeRunner(_ref) {
|
|
|
32
32
|
replaceId = _ref.replaceId,
|
|
33
33
|
isPlayground = _ref.isPlayground,
|
|
34
34
|
_ref$notFound = _ref.notFound,
|
|
35
|
-
notFound = _ref$notFound === void 0 ? /*#__PURE__*/React.createElement(NotFound, null) : _ref$notFound
|
|
35
|
+
notFound = _ref$notFound === void 0 ? /*#__PURE__*/React.createElement(NotFound, null) : _ref$notFound,
|
|
36
|
+
_ref$showAI = _ref.showAI,
|
|
37
|
+
showAI = _ref$showAI === void 0 ? true : _ref$showAI;
|
|
36
38
|
var demoInfo = getDemoInfo(exampleTopics, topic, example, demo);
|
|
37
39
|
|
|
38
40
|
// 找不到,啥也别干了,404 页面
|
|
@@ -80,7 +82,8 @@ var CodeRunner = function CodeRunner(_ref) {
|
|
|
80
82
|
onDestroy: noop,
|
|
81
83
|
onReady: noop,
|
|
82
84
|
playground: playground,
|
|
83
|
-
title: ic(title)
|
|
85
|
+
title: ic(title),
|
|
86
|
+
showAI: showAI
|
|
84
87
|
}))));
|
|
85
88
|
};
|
|
86
89
|
export default CodeRunner;
|
|
@@ -39,16 +39,21 @@ export var SearchResult = function SearchResult(_ref) {
|
|
|
39
39
|
promptText: keywords,
|
|
40
40
|
mode: "solve",
|
|
41
41
|
lib: !themeConfig.isAntVSite ? themeConfig.title : undefined,
|
|
42
|
-
jump: true
|
|
42
|
+
jump: true,
|
|
43
|
+
lang: intl.locale === 'zh' ? 'zh' : 'en'
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
46
|
}, /*#__PURE__*/React.createElement("div", {
|
|
46
47
|
className: classnames(styles.title, styles.highlighted)
|
|
47
48
|
}, keywords), /*#__PURE__*/React.createElement("div", {
|
|
48
49
|
className: styles.description
|
|
49
|
-
},
|
|
50
|
+
}, intl.formatMessage({
|
|
51
|
+
id: 'ai.search.try'
|
|
52
|
+
}), "\xA0", /*#__PURE__*/React.createElement("span", {
|
|
50
53
|
className: styles.highlighted
|
|
51
|
-
}, "AI"), "\xA0
|
|
54
|
+
}, "AI"), "\xA0", intl.formatMessage({
|
|
55
|
+
id: 'ai.search.visualization'
|
|
56
|
+
})))), results !== null && results !== void 0 && results.length ? results.map(function (r, index) {
|
|
52
57
|
return /*#__PURE__*/React.createElement("div", {
|
|
53
58
|
className: styles.item,
|
|
54
59
|
key: index
|
|
@@ -195,7 +195,9 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
195
195
|
href: href,
|
|
196
196
|
target: "_blank",
|
|
197
197
|
rel: "noreferrer"
|
|
198
|
-
},
|
|
198
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
199
|
+
id: "header.ai.code"
|
|
200
|
+
})));
|
|
199
201
|
}, [isInternalUser, showWeavefox]);
|
|
200
202
|
var menu = /*#__PURE__*/React.createElement("ul", {
|
|
201
203
|
className: cx(styles.menu, _defineProperty(_defineProperty({}, styles.popup, !isWide), styles.popupHidden, !popupMenuVisible))
|
|
@@ -235,7 +237,9 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
235
237
|
style: {
|
|
236
238
|
marginRight: '8px'
|
|
237
239
|
}
|
|
238
|
-
}, "\uD83C\uDDE8\uD83C\uDDF3"),
|
|
240
|
+
}, "\uD83C\uDDE8\uD83C\uDDF3"), /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
241
|
+
id: "header.china.mirror.title"
|
|
242
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
239
243
|
style: {
|
|
240
244
|
marginTop: 16,
|
|
241
245
|
textAlign: 'right'
|
|
@@ -248,14 +252,18 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
248
252
|
style: {
|
|
249
253
|
marginRight: 8
|
|
250
254
|
}
|
|
251
|
-
},
|
|
255
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
256
|
+
id: "header.china.mirror.temp.close"
|
|
257
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
252
258
|
type: "primary",
|
|
253
259
|
size: "small",
|
|
254
260
|
onClick: function onClick() {
|
|
255
261
|
localStorage.setItem('china-mirror-no-more-hint', Date.now().toString());
|
|
256
262
|
updateChinaMirrorHintVisible(false);
|
|
257
263
|
}
|
|
258
|
-
},
|
|
264
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
265
|
+
id: "header.china.mirror.no.more"
|
|
266
|
+
})))),
|
|
259
267
|
open: chinaMirrorHintVisible,
|
|
260
268
|
placement: "bottomRight",
|
|
261
269
|
align: {
|
|
@@ -273,8 +281,12 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
273
281
|
}
|
|
274
282
|
})))) : null, showChinaMirror && !isWide && /*#__PURE__*/React.createElement(Modal, {
|
|
275
283
|
open: chinaMirrorHintVisible,
|
|
276
|
-
cancelText:
|
|
277
|
-
|
|
284
|
+
cancelText: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
285
|
+
id: "header.china.mirror.no.more"
|
|
286
|
+
}),
|
|
287
|
+
okText: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
288
|
+
id: "header.china.mirror.temp.close"
|
|
289
|
+
}),
|
|
278
290
|
onCancel: function onCancel() {
|
|
279
291
|
updateChinaMirrorHintVisible(false);
|
|
280
292
|
},
|
|
@@ -292,7 +304,9 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
292
304
|
}, /*#__PURE__*/React.createElement("span", {
|
|
293
305
|
role: "img",
|
|
294
306
|
"aria-labelledby": "\u4E2D\u56FD"
|
|
295
|
-
}, "\uD83C\uDDE8\uD83C\uDDF3"),
|
|
307
|
+
}, "\uD83C\uDDE8\uD83C\uDDF3"), /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
308
|
+
id: "header.china.mirror.title"
|
|
309
|
+
}), /*#__PURE__*/React.createElement("a", {
|
|
296
310
|
href: chinaMirrorUrl,
|
|
297
311
|
onClick: function onClick(e) {
|
|
298
312
|
e.preventDefault();
|
|
@@ -370,7 +384,9 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
370
384
|
src: "https://gw.alipayobjects.com/zos/antfincdn/ZKlx96dsfs/qrcode_for_gh_f52d8b6aa591_258.jpg",
|
|
371
385
|
alt: "wx-qrcode"
|
|
372
386
|
}),
|
|
373
|
-
title:
|
|
387
|
+
title: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
388
|
+
id: "header.wx.qrcode.title"
|
|
389
|
+
}),
|
|
374
390
|
styles: {
|
|
375
391
|
body: {
|
|
376
392
|
padding: 2
|