mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
feat: optimize i18n implementation for better localization (#2062)
* feat: optimize i18n implementation for better localization * delete i18n-ally-custom-framework.yml * update common key
This commit is contained in:
parent
1e4ffc2481
commit
fc96bb99cc
|
|
@ -1,46 +0,0 @@
|
|||
# .vscode/i18n-ally-custom-framework.yml
|
||||
|
||||
# An array of strings which contain Language Ids defined by VS Code
|
||||
# You can check available language ids here: https://code.visualstudio.com/docs/languages/identifiers
|
||||
languageIds:
|
||||
- javascript
|
||||
- typescript
|
||||
- javascriptreact
|
||||
- typescriptreact
|
||||
|
||||
# An array of RegExes to find the key usage. **The key should be captured in the first match group**.
|
||||
# You should unescape RegEx strings in order to fit in the YAML file
|
||||
# To help with this, you can use https://www.freeformatter.com/json-escape.html
|
||||
usageMatchRegex:
|
||||
# The following example shows how to detect `t("your.i18n.keys")`
|
||||
# the `{key}` will be placed by a proper keypath matching regex,
|
||||
# you can ignore it and use your own matching rules as well
|
||||
- "[^\\w\\d]t\\(['\"`]({key})['\"`]"
|
||||
- "[^\\w\\d]commonT\\(['\"`]({key})['\"`]"
|
||||
# 支持 appT("your.i18n.keys")
|
||||
- "[^\\w\\d]appT\\(['\"`]({key})['\"`]"
|
||||
# 支持 datasetT("your.i18n.keys")
|
||||
- "[^\\w\\d]datasetT\\(['\"`]({key})['\"`]"
|
||||
- "[^\\w\\d]fileT\\(['\"`]({key})['\"`]"
|
||||
- "[^\\w\\d]publishT\\(['\"`]({key})['\"`]"
|
||||
- "[^\\w\\d]workflowT\\(['\"`]({key})['\"`]"
|
||||
- "[^\\w\\d]userT\\(['\"`]({key})['\"`]"
|
||||
- "[^\\w\\d]chatT\\(['\"`]({key})['\"`]"
|
||||
|
||||
# A RegEx to set a custom scope range. This scope will be used as a prefix when detecting keys
|
||||
# and works like how the i18next framework identifies the namespace scope from the
|
||||
# useTranslation() hook.
|
||||
# You should unescape RegEx strings in order to fit in the YAML file
|
||||
# To help with this, you can use https://www.freeformatter.com/json-escape.html
|
||||
scopeRangeRegex: "useTranslation\\(\\s*\\[?\\s*['\"`](.*?)['\"`]"
|
||||
|
||||
# An array of strings containing refactor templates.
|
||||
# The "$1" will be replaced by the keypath specified.
|
||||
# Optional: uncomment the following two lines to use
|
||||
|
||||
# refactorTemplates:
|
||||
# - i18n.get("$1")
|
||||
|
||||
|
||||
# If set to true, only enables this custom framework (will disable all built-in frameworks)
|
||||
monopoly: true
|
||||
|
|
@ -7,11 +7,18 @@
|
|||
"i18n-ally.localesPaths": [
|
||||
"packages/web/i18n",
|
||||
],
|
||||
"i18n-ally.enabledParsers": ["json", "yaml", "js", "ts"],
|
||||
"i18n-ally.enabledParsers": [
|
||||
"json",
|
||||
"yaml",
|
||||
"js",
|
||||
"ts"
|
||||
],
|
||||
"i18n-ally.keystyle": "nested",
|
||||
"i18n-ally.sortKeys": true,
|
||||
"i18n-ally.keepFulfilled": false,
|
||||
"i18n-ally.sourceLanguage": "zh", // 根据此语言文件翻译其他语言文件的变量和内容
|
||||
"i18n-ally.displayLanguage": "zh", // 显示语言
|
||||
"i18n-ally.namespace": true,
|
||||
"i18n-ally.pathMatcher": "{locale}/{namespaces}.json",
|
||||
"i18n-ally.extract.targetPickingStrategy": "most-similar-by-key"
|
||||
}
|
||||
|
|
@ -14,11 +14,11 @@
|
|||
"devDependencies": {
|
||||
"@chakra-ui/cli": "^2.4.1",
|
||||
"husky": "^8.0.3",
|
||||
"i18next": "23.10.0",
|
||||
"lint-staged": "^13.3.0",
|
||||
"next-i18next": "15.2.0",
|
||||
"i18next": "23.11.5",
|
||||
"next-i18next": "15.3.0",
|
||||
"react-i18next": "14.1.2",
|
||||
"prettier": "3.2.4",
|
||||
"react-i18next": "13.5.0",
|
||||
"zhlint": "^0.7.4"
|
||||
},
|
||||
"lint-staged": {
|
||||
|
|
@ -29,4 +29,4 @@
|
|||
"node": ">=18.16.0",
|
||||
"pnpm": ">=9.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -597,8 +597,7 @@
|
|||
"success": "Start syncing"
|
||||
}
|
||||
},
|
||||
"training": {
|
||||
}
|
||||
"training": {}
|
||||
},
|
||||
"data": {
|
||||
"Auxiliary Data": "Auxiliary data",
|
||||
|
|
@ -1373,7 +1372,7 @@
|
|||
"Terms": "Terms of service",
|
||||
"Username": "Username",
|
||||
"Wechat": "Login with Wechat",
|
||||
"Wx qr login": "Wechat QR code login"
|
||||
"wx_qr_login": "Wechat QR code login"
|
||||
},
|
||||
"team": {
|
||||
"Dataset usage": "Knowledge base capacity",
|
||||
|
|
@ -1638,4 +1637,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -600,8 +600,7 @@
|
|||
"success": "开始同步"
|
||||
}
|
||||
},
|
||||
"training": {
|
||||
}
|
||||
"training": {}
|
||||
},
|
||||
"data": {
|
||||
"Auxiliary Data": "辅助数据",
|
||||
|
|
@ -1382,7 +1381,7 @@
|
|||
"Terms": "服务协议",
|
||||
"Username": "用户名",
|
||||
"Wechat": "微信登录",
|
||||
"Wx qr login": "微信扫码登录"
|
||||
"wx_qr_login": "微信扫码登录"
|
||||
},
|
||||
"team": {
|
||||
"Dataset usage": "知识库容量",
|
||||
|
|
@ -1647,4 +1646,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -21,17 +21,17 @@
|
|||
"ahooks": "^3.7.11",
|
||||
"date-fns": "2.30.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"i18next": "23.10.0",
|
||||
"lexical": "0.12.6",
|
||||
"lodash": "^4.17.21",
|
||||
"next-i18next": "15.2.0",
|
||||
"i18next": "23.11.5",
|
||||
"next-i18next": "15.3.0",
|
||||
"react-i18next": "14.1.2",
|
||||
"papaparse": "^5.4.1",
|
||||
"react": "18.3.1",
|
||||
"react-beautiful-dnd": "^13.1.1",
|
||||
"react-day-picker": "^8.7.1",
|
||||
"react-dom": "18.3.1",
|
||||
"react-hook-form": "7.43.1",
|
||||
"react-i18next": "13.5.0",
|
||||
"react-photo-view": "^1.2.6",
|
||||
"use-context-selector": "^1.4.4"
|
||||
},
|
||||
|
|
@ -42,4 +42,4 @@
|
|||
"@types/react-beautiful-dnd": "^13.1.1",
|
||||
"@types/react-dom": "18.3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -15,20 +15,20 @@ importers:
|
|||
specifier: ^8.0.3
|
||||
version: 8.0.3
|
||||
i18next:
|
||||
specifier: 23.10.0
|
||||
version: 23.10.0
|
||||
specifier: 23.11.5
|
||||
version: 23.11.5
|
||||
lint-staged:
|
||||
specifier: ^13.3.0
|
||||
version: 13.3.0
|
||||
next-i18next:
|
||||
specifier: 15.2.0
|
||||
version: 15.2.0(i18next@23.10.0)(next@14.2.3(@babel/core@7.24.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.8))(react-i18next@13.5.0(i18next@23.10.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||
specifier: 15.3.0
|
||||
version: 15.3.0(i18next@23.11.5)(next@14.2.3(@babel/core@7.24.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.8))(react-i18next@14.1.2(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||
prettier:
|
||||
specifier: 3.2.4
|
||||
version: 3.2.4
|
||||
react-i18next:
|
||||
specifier: 13.5.0
|
||||
version: 13.5.0(i18next@23.10.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
specifier: 14.1.2
|
||||
version: 14.1.2(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
zhlint:
|
||||
specifier: ^0.7.4
|
||||
version: 0.7.4(@types/node@20.14.10)(sass@1.77.8)(terser@5.31.2)(typescript@5.5.3)
|
||||
|
|
@ -288,8 +288,8 @@ importers:
|
|||
specifier: ^1.11.7
|
||||
version: 1.11.11
|
||||
i18next:
|
||||
specifier: 23.10.0
|
||||
version: 23.10.0
|
||||
specifier: 23.11.5
|
||||
version: 23.11.5
|
||||
lexical:
|
||||
specifier: 0.12.6
|
||||
version: 0.12.6
|
||||
|
|
@ -297,8 +297,8 @@ importers:
|
|||
specifier: ^4.17.21
|
||||
version: 4.17.21
|
||||
next-i18next:
|
||||
specifier: 15.2.0
|
||||
version: 15.2.0(i18next@23.10.0)(next@14.2.3(@babel/core@7.24.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.8))(react-i18next@13.5.0(i18next@23.10.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||
specifier: 15.3.0
|
||||
version: 15.3.0(i18next@23.11.5)(next@14.2.3(@babel/core@7.24.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.8))(react-i18next@14.1.2(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||
papaparse:
|
||||
specifier: ^5.4.1
|
||||
version: 5.4.1
|
||||
|
|
@ -318,8 +318,8 @@ importers:
|
|||
specifier: 7.43.1
|
||||
version: 7.43.1(react@18.3.1)
|
||||
react-i18next:
|
||||
specifier: 13.5.0
|
||||
version: 13.5.0(i18next@23.10.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
specifier: 14.1.2
|
||||
version: 14.1.2(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
react-photo-view:
|
||||
specifier: ^1.2.6
|
||||
version: 1.2.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
|
|
@ -424,8 +424,8 @@ importers:
|
|||
specifier: ^2.4.29
|
||||
version: 2.4.29
|
||||
i18next:
|
||||
specifier: 23.10.0
|
||||
version: 23.10.0
|
||||
specifier: 23.11.5
|
||||
version: 23.11.5
|
||||
immer:
|
||||
specifier: ^9.0.19
|
||||
version: 9.0.21
|
||||
|
|
@ -451,8 +451,8 @@ importers:
|
|||
specifier: 14.2.3
|
||||
version: 14.2.3(@babel/core@7.24.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.8)
|
||||
next-i18next:
|
||||
specifier: 15.2.0
|
||||
version: 15.2.0(i18next@23.10.0)(next@14.2.3(@babel/core@7.24.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.8))(react-i18next@13.5.0(i18next@23.10.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||
specifier: 15.3.0
|
||||
version: 15.3.0(i18next@23.11.5)(next@14.2.3(@babel/core@7.24.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.8))(react-i18next@14.1.2(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
|
||||
nextjs-node-loader:
|
||||
specifier: ^1.1.5
|
||||
version: 1.1.5(webpack@5.92.1)
|
||||
|
|
@ -472,8 +472,8 @@ importers:
|
|||
specifier: 7.43.1
|
||||
version: 7.43.1(react@18.3.1)
|
||||
react-i18next:
|
||||
specifier: 13.5.0
|
||||
version: 13.5.0(i18next@23.10.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
specifier: 14.1.2
|
||||
version: 14.1.2(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
react-markdown:
|
||||
specifier: ^8.0.7
|
||||
version: 8.0.7(@types/react@18.3.1)(react@18.3.1)
|
||||
|
|
@ -5479,8 +5479,8 @@ packages:
|
|||
i18next-fs-backend@2.3.1:
|
||||
resolution: {integrity: sha512-tvfXskmG/9o+TJ5Fxu54sSO5OkY6d+uMn+K6JiUGLJrwxAVfer+8V3nU8jq3ts9Pe5lXJv4b1N7foIjJ8Iy2Gg==}
|
||||
|
||||
i18next@23.10.0:
|
||||
resolution: {integrity: sha512-/TgHOqsa7/9abUKJjdPeydoyDc0oTi/7u9F8lMSj6ufg4cbC1Oj3f/Jja7zj7WRIhEQKB7Q4eN6y68I9RDxxGQ==}
|
||||
i18next@23.11.5:
|
||||
resolution: {integrity: sha512-41pvpVbW9rhZPk5xjCX2TPJi2861LEig/YRhUkY+1FQ2IQPS0bKUDYnEqY8XPPbB48h1uIwLnP9iiEfuSl20CA==}
|
||||
|
||||
iconv-lite@0.4.24:
|
||||
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
|
||||
|
|
@ -6649,8 +6649,8 @@ packages:
|
|||
neo-async@2.6.2:
|
||||
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
|
||||
|
||||
next-i18next@15.2.0:
|
||||
resolution: {integrity: sha512-Rl5yZ4oGffsB0AjRykZ5PzNQ2M6am54MaMayldGmH/UKZisrIxk2SKEPJvaHhKlWe1qgdNi2FkodwK8sEjfEmg==}
|
||||
next-i18next@15.3.0:
|
||||
resolution: {integrity: sha512-bq7Cc9XJFcmGOCLnyEtHaeJ3+JJNsI/8Pkj9BaHAnhm4sZ9vNNC4ZsaqYnlRZ7VH5ypSo73fEqLK935jLsmCvQ==}
|
||||
engines: {node: '>=14'}
|
||||
peerDependencies:
|
||||
i18next: '>= 23.7.13'
|
||||
|
|
@ -7276,8 +7276,8 @@ packages:
|
|||
peerDependencies:
|
||||
react: ^16.8.0 || ^17 || ^18
|
||||
|
||||
react-i18next@13.5.0:
|
||||
resolution: {integrity: sha512-CFJ5NDGJ2MUyBohEHxljOq/39NQ972rh1ajnadG9BjTk+UXbHLq4z5DKEbEQBDoIhUmmbuS/fIMJKo6VOax1HA==}
|
||||
react-i18next@14.1.2:
|
||||
resolution: {integrity: sha512-FSIcJy6oauJbGEXfhUgVeLzvWBhIBIS+/9c6Lj4niwKZyGaGb4V4vUbATXSlsHJDXXB+ociNxqFNiFuV1gmoqg==}
|
||||
peerDependencies:
|
||||
i18next: '>= 23.2.3'
|
||||
react: '>= 16.8.0'
|
||||
|
|
@ -14665,7 +14665,7 @@ snapshots:
|
|||
|
||||
i18next-fs-backend@2.3.1: {}
|
||||
|
||||
i18next@23.10.0:
|
||||
i18next@23.11.5:
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.8
|
||||
|
||||
|
|
@ -16211,17 +16211,17 @@ snapshots:
|
|||
|
||||
neo-async@2.6.2: {}
|
||||
|
||||
next-i18next@15.2.0(i18next@23.10.0)(next@14.2.3(@babel/core@7.24.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.8))(react-i18next@13.5.0(i18next@23.10.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1):
|
||||
next-i18next@15.3.0(i18next@23.11.5)(next@14.2.3(@babel/core@7.24.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.8))(react-i18next@14.1.2(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1):
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.8
|
||||
'@types/hoist-non-react-statics': 3.3.5
|
||||
core-js: 3.37.1
|
||||
hoist-non-react-statics: 3.3.2
|
||||
i18next: 23.10.0
|
||||
i18next: 23.11.5
|
||||
i18next-fs-backend: 2.3.1
|
||||
next: 14.2.3(@babel/core@7.24.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.8)
|
||||
react: 18.3.1
|
||||
react-i18next: 13.5.0(i18next@23.10.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
react-i18next: 14.1.2(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
|
||||
next@14.2.3(@babel/core@7.24.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.77.8):
|
||||
dependencies:
|
||||
|
|
@ -16878,11 +16878,11 @@ snapshots:
|
|||
dependencies:
|
||||
react: 18.3.1
|
||||
|
||||
react-i18next@13.5.0(i18next@23.10.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
|
||||
react-i18next@14.1.2(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.8
|
||||
html-parse-stringify: 3.0.1
|
||||
i18next: 23.10.0
|
||||
i18next: 23.11.5
|
||||
react: 18.3.1
|
||||
optionalDependencies:
|
||||
react-dom: 18.3.1(react@18.3.1)
|
||||
|
|
|
|||
|
|
@ -12,4 +12,4 @@ module.exports = {
|
|||
localePath:
|
||||
typeof window === 'undefined' ? require('path').resolve('../../packages/web/i18n') : '/i18n',
|
||||
reloadOnPrerender: process.env.NODE_ENV === 'development'
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
"formidable": "^2.1.1",
|
||||
"framer-motion": "^9.0.6",
|
||||
"hyperdown": "^2.4.29",
|
||||
"i18next": "23.10.0",
|
||||
"immer": "^9.0.19",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
|
|
@ -44,14 +43,15 @@
|
|||
"nanoid": "^4.0.1",
|
||||
"next": "14.2.3",
|
||||
"json5": "^2.2.3",
|
||||
"next-i18next": "15.2.0",
|
||||
"nextjs-node-loader": "^1.1.5",
|
||||
"nprogress": "^0.2.0",
|
||||
"react": "18.3.1",
|
||||
"react-day-picker": "^8.7.1",
|
||||
"react-dom": "18.3.1",
|
||||
"react-hook-form": "7.43.1",
|
||||
"react-i18next": "13.5.0",
|
||||
"i18next": "23.11.5",
|
||||
"next-i18next": "15.3.0",
|
||||
"react-i18next": "14.1.2",
|
||||
"react-markdown": "^8.0.7",
|
||||
"react-syntax-highlighter": "^15.5.0",
|
||||
"reactflow": "^11.7.4",
|
||||
|
|
@ -81,4 +81,4 @@
|
|||
"nextjs-node-loader": "^1.1.5",
|
||||
"typescript": "^5.1.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,12 @@ const CommunityModal = ({ onClose }: { onClose: () => void }) => {
|
|||
const { feConfigs } = useSystemStore();
|
||||
|
||||
return (
|
||||
<MyModal isOpen={true} onClose={onClose} iconSrc="modal/concat" title={t('system.Concat us')}>
|
||||
<MyModal
|
||||
isOpen={true}
|
||||
onClose={onClose}
|
||||
iconSrc="modal/concat"
|
||||
title={t('common:system.Concat us')}
|
||||
>
|
||||
<ModalBody textAlign={'center'}>
|
||||
<Markdown source={feConfigs?.concatMd || ''} />
|
||||
</ModalBody>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ const Auth = ({ children }: { children: JSX.Element }) => {
|
|||
);
|
||||
toast({
|
||||
status: 'warning',
|
||||
title: t('support.user.Need to login')
|
||||
title: t('common:support.user.Need to login')
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,28 +27,28 @@ const Navbar = ({ unread }: { unread: number }) => {
|
|||
const navbarList = useMemo(
|
||||
() => [
|
||||
{
|
||||
label: t('navbar.Chat'),
|
||||
label: t('common:navbar.Chat'),
|
||||
icon: 'core/chat/chatLight',
|
||||
activeIcon: 'core/chat/chatFill',
|
||||
link: `/chat?appId=${lastChatAppId}&chatId=${lastChatId}`,
|
||||
activeLink: ['/chat']
|
||||
},
|
||||
{
|
||||
label: t('navbar.Studio'),
|
||||
label: t('common:navbar.Studio'),
|
||||
icon: 'core/app/aiLight',
|
||||
activeIcon: 'core/app/aiFill',
|
||||
link: `/app/list`,
|
||||
activeLink: ['/app/list', '/app/detail']
|
||||
},
|
||||
{
|
||||
label: t('navbar.Datasets'),
|
||||
label: t('common:navbar.Datasets'),
|
||||
icon: 'core/dataset/datasetLight',
|
||||
activeIcon: 'core/dataset/datasetFill',
|
||||
link: `/dataset/list`,
|
||||
activeLink: ['/dataset/list', '/dataset/detail']
|
||||
},
|
||||
{
|
||||
label: t('navbar.Account'),
|
||||
label: t('common:navbar.Account'),
|
||||
icon: 'support/user/userLight',
|
||||
activeIcon: 'support/user/userFill',
|
||||
link: '/account',
|
||||
|
|
@ -163,7 +163,7 @@ const Navbar = ({ unread }: { unread: number }) => {
|
|||
</Box>
|
||||
)}
|
||||
{(feConfigs?.docUrl || feConfigs?.chatbotUrl) && (
|
||||
<MyTooltip label={t('common.system.Use Helper')} placement={'right-end'}>
|
||||
<MyTooltip label={t('common:common.system.Use Helper')} placement={'right-end'}>
|
||||
<Link
|
||||
{...itemStyles}
|
||||
{...hoverStyle}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
|
|||
const navbarList = useMemo(
|
||||
() => [
|
||||
{
|
||||
label: t('navbar.Chat'),
|
||||
label: t('common:navbar.Chat'),
|
||||
icon: 'core/chat/chatLight',
|
||||
activeIcon: 'core/chat/chatFill',
|
||||
link: `/chat?appId=${lastChatAppId}&chatId=${lastChatId}`,
|
||||
|
|
@ -21,7 +21,7 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
|
|||
unread: 0
|
||||
},
|
||||
{
|
||||
label: t('navbar.Studio'),
|
||||
label: t('common:navbar.Studio'),
|
||||
icon: 'core/app/aiLight',
|
||||
activeIcon: 'core/app/aiFill',
|
||||
link: `/app/list`,
|
||||
|
|
@ -29,7 +29,7 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
|
|||
unread: 0
|
||||
},
|
||||
{
|
||||
label: t('navbar.Tools'),
|
||||
label: t('common:navbar.Tools'),
|
||||
icon: 'phoneTabbar/tool',
|
||||
activeIcon: 'phoneTabbar/toolFill',
|
||||
link: '/tools',
|
||||
|
|
@ -37,7 +37,7 @@ const NavbarPhone = ({ unread }: { unread: number }) => {
|
|||
unread: 0
|
||||
},
|
||||
{
|
||||
label: t('navbar.Account'),
|
||||
label: t('common:navbar.Account'),
|
||||
icon: 'support/user/userLight',
|
||||
activeIcon: 'support/user/userFill',
|
||||
link: '/account',
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ const CodeLight = ({
|
|||
<Box flex={1}>{codeBoxName}</Box>
|
||||
<Flex cursor={'pointer'} onClick={() => copyData(String(children))} alignItems={'center'}>
|
||||
<Icon name={'copy'} width={15} height={15}></Icon>
|
||||
<Box ml={1}>{t('common.Copy')}</Box>
|
||||
<Box ml={1}>{t('common:common.Copy')}</Box>
|
||||
</Flex>
|
||||
</Flex>
|
||||
<SyntaxHighlighter style={codeLight as any} language={match?.[1]} PreTag="pre">
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const QuestionGuide = ({ text }: { text: string }) => {
|
|||
|
||||
return questionGuides.length > 0 ? (
|
||||
<Box mt={2}>
|
||||
<ChatBoxDivider icon="core/chat/QGFill" text={t('core.chat.Question Guide')} />
|
||||
<ChatBoxDivider icon="core/chat/QGFill" text={t('common:core.chat.Question Guide')} />
|
||||
<Flex alignItems={'center'} flexWrap={'wrap'} gap={2}>
|
||||
{questionGuides.map((text) => (
|
||||
<Flex
|
||||
|
|
@ -60,7 +60,7 @@ const QuestionGuide = ({ text }: { text: string }) => {
|
|||
lineHeight={0}
|
||||
bg={`linear-gradient(to left, white,white min(60px,100%),rgba(255,255,255,0) 80%)`}
|
||||
>
|
||||
<MyTooltip label={t('core.chat.markdown.Edit Question')}>
|
||||
<MyTooltip label={t('common:core.chat.markdown.Edit Question')}>
|
||||
<MyIcon
|
||||
name={'edit'}
|
||||
w={'14px'}
|
||||
|
|
@ -71,7 +71,7 @@ const QuestionGuide = ({ text }: { text: string }) => {
|
|||
onClick={() => eventBus.emit(EventNameEnum.editQuestion, { text })}
|
||||
/>
|
||||
</MyTooltip>
|
||||
<MyTooltip label={t('core.chat.markdown.Send Question')}>
|
||||
<MyTooltip label={t('common:core.chat.markdown.Send Question')}>
|
||||
<MyIcon
|
||||
ml={4}
|
||||
name={'core/chat/sendLight'}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ const A = React.memo(function A({ children, ...props }: any) {
|
|||
const text = useMemo(() => String(children), [children]);
|
||||
|
||||
return (
|
||||
<MyTooltip label={t('core.chat.markdown.Quick Question')}>
|
||||
<MyTooltip label={t('common:core.chat.markdown.Quick Question')}>
|
||||
<Button
|
||||
variant={'whitePrimary'}
|
||||
size={'xs'}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ const AIModelSelector = ({ list, onchange, disableTip, ...props }: Props) => {
|
|||
label: (
|
||||
<Flex alignItems={'center'}>
|
||||
<Avatar borderRadius={'0'} mr={2} src={LOGO_ICON} w={'18px'} />
|
||||
<Box>{t('support.user.Price')}</Box>
|
||||
<Box>{t('common:support.user.Price')}</Box>
|
||||
</Flex>
|
||||
),
|
||||
value: 'price'
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ const EditResourceModal = ({
|
|||
setValue('avatar', src);
|
||||
} catch (err: any) {
|
||||
toast({
|
||||
title: getErrText(err, t('common.error.Select avatar failed')),
|
||||
title: getErrText(err, t('common:common.error.Select avatar failed')),
|
||||
status: 'warning'
|
||||
});
|
||||
}
|
||||
|
|
@ -76,9 +76,9 @@ const EditResourceModal = ({
|
|||
<MyModal isOpen onClose={onClose} iconSrc={avatar} title={title}>
|
||||
<ModalBody>
|
||||
<Box>
|
||||
<FormLabel mb={1}>{t('core.app.Name and avatar')}</FormLabel>
|
||||
<FormLabel mb={1}>{t('common:core.app.Name and avatar')}</FormLabel>
|
||||
<HStack spacing={4}>
|
||||
<MyTooltip label={t('common.Set Avatar')}>
|
||||
<MyTooltip label={t('common:common.Set Avatar')}>
|
||||
<Avatar
|
||||
flexShrink={0}
|
||||
src={avatar}
|
||||
|
|
@ -98,13 +98,13 @@ const EditResourceModal = ({
|
|||
</HStack>
|
||||
</Box>
|
||||
<Box mt={4}>
|
||||
<FormLabel mb={1}>{t('common.Intro')}</FormLabel>
|
||||
<FormLabel mb={1}>{t('common:common.Intro')}</FormLabel>
|
||||
<Textarea {...register('intro')} bg={'myGray.50'} maxLength={200} />
|
||||
</Box>
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button isLoading={loading} onClick={handleSubmit(onSave)} px={6}>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const ParentPaths = (props: {
|
|||
const { t } = useTranslation();
|
||||
const {
|
||||
paths = [],
|
||||
rootName = t('common.folder.Root Path'),
|
||||
rootName = t('common:common.folder.Root Path'),
|
||||
FirstPathDom,
|
||||
onClick,
|
||||
fontSize
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const MyTextarea = React.forwardRef<HTMLTextAreaElement, Props>(function MyTexta
|
|||
const TextareaRef = useRef<HTMLTextAreaElement>(null);
|
||||
|
||||
const { t } = useTranslation();
|
||||
const { title = t('core.app.edit.Prompt Editor'), ...childProps } = props;
|
||||
const { title = t('common:core.app.edit.Prompt Editor'), ...childProps } = props;
|
||||
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ const MyTextarea = React.forwardRef<HTMLTextAreaElement, Props>(function MyTexta
|
|||
onClose();
|
||||
}}
|
||||
>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
@ -85,7 +85,7 @@ const Editor = React.memo(function Editor({
|
|||
cursor={'pointer'}
|
||||
onClick={onOpenModal}
|
||||
>
|
||||
<MyTooltip label={t('common.ui.textarea.Magnifying')}>
|
||||
<MyTooltip label={t('common:common.ui.textarea.Magnifying')}>
|
||||
<MyIcon name={'common/fullScreenLight'} w={'14px'} color={'myGray.600'} />
|
||||
</MyTooltip>
|
||||
</Box>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const TagTextarea = ({ defaultValues, onUpdate, ...props }: Props) => {
|
|||
if (tags.includes(value)) {
|
||||
return toast({
|
||||
status: 'warning',
|
||||
title: t('common.input.Repeat Value')
|
||||
title: t('common:common.input.Repeat Value')
|
||||
});
|
||||
}
|
||||
setTags([...tags, value]);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ const MoveModal = ({ moveResourceId, title, server, onConfirm, onClose }: Props)
|
|||
setFolderList([
|
||||
{
|
||||
id: rootId,
|
||||
name: t('common.folder.Root Path'),
|
||||
name: t('common:common.folder.Root Path'),
|
||||
open: true,
|
||||
children: data.map((item) => ({
|
||||
id: item.id,
|
||||
|
|
@ -156,7 +156,7 @@ const MoveModal = ({ moveResourceId, title, server, onConfirm, onClose }: Props)
|
|||
onSuccess: () => {
|
||||
onClose();
|
||||
},
|
||||
successToast: t('common.folder.Move Success')
|
||||
successToast: t('common:common.folder.Move Success')
|
||||
}
|
||||
);
|
||||
|
||||
|
|
@ -174,7 +174,7 @@ const MoveModal = ({ moveResourceId, title, server, onConfirm, onClose }: Props)
|
|||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button isLoading={confirming} isDisabled={!selectedId} onClick={onConfirmSelect}>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const FolderPath = (props: {
|
|||
const { t } = useTranslation();
|
||||
const {
|
||||
paths,
|
||||
rootName = t('common.folder.Root Path'),
|
||||
rootName = t('common:common.folder.Root Path'),
|
||||
FirstPathDom,
|
||||
onClick,
|
||||
fontSize,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ const SelectOneResource = ({
|
|||
id: rootId,
|
||||
open: true,
|
||||
avatar: FolderImgUrl,
|
||||
name: t('common.folder.Root Path'),
|
||||
name: t('common:common.folder.Root Path'),
|
||||
isFolder: true,
|
||||
children: dataList
|
||||
};
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ const FolderSlideCard = ({
|
|||
<MyDivider my={6} />
|
||||
|
||||
<Box>
|
||||
<FormLabel>{t('common.Operation')}</FormLabel>
|
||||
<FormLabel>{t('common:common.Operation')}</FormLabel>
|
||||
|
||||
<Button
|
||||
variant={'transparentBase'}
|
||||
|
|
@ -101,7 +101,7 @@ const FolderSlideCard = ({
|
|||
mt={4}
|
||||
onClick={onMove}
|
||||
>
|
||||
{t('common.Move')}
|
||||
{t('common:common.Move')}
|
||||
</Button>
|
||||
{managePer.permission.isOwner && (
|
||||
<Button
|
||||
|
|
@ -118,7 +118,7 @@ const FolderSlideCard = ({
|
|||
openConfirm(onDelete)();
|
||||
}}
|
||||
>
|
||||
{t('common.Delete folder')}
|
||||
{t('common:common.Delete folder')}
|
||||
</Button>
|
||||
)}
|
||||
</Box>
|
||||
|
|
@ -130,7 +130,7 @@ const FolderSlideCard = ({
|
|||
<MyDivider my={6} />
|
||||
|
||||
<Box>
|
||||
<FormLabel>{t('support.permission.Permission')}</FormLabel>
|
||||
<FormLabel>{t('common:support.permission.Permission')}</FormLabel>
|
||||
|
||||
{!isInheritPermission && (
|
||||
<Box mt={2}>
|
||||
|
|
@ -141,7 +141,7 @@ const FolderSlideCard = ({
|
|||
{managePer.permission.hasManagePer && (
|
||||
<Box mt={5}>
|
||||
<Box fontSize={'sm'} color={'myGray.500'}>
|
||||
{t('permission.Default permission')}
|
||||
{t('common:permission.Default permission')}
|
||||
</Box>
|
||||
<DefaultPermissionList
|
||||
mt="1"
|
||||
|
|
@ -166,11 +166,11 @@ const FolderSlideCard = ({
|
|||
<>
|
||||
<Flex alignItems="center" justifyContent="space-between">
|
||||
<Box fontSize={'sm'} color={'myGray.500'}>
|
||||
{t('permission.Collaborator')}
|
||||
{t('common:permission.Collaborator')}
|
||||
</Box>
|
||||
{managePer.permission.hasManagePer && (
|
||||
<HStack spacing={3}>
|
||||
<MyTooltip label={t('permission.Manage')}>
|
||||
<MyTooltip label={t('common:permission.Manage')}>
|
||||
<MyIcon
|
||||
w="1rem"
|
||||
name="common/settingLight"
|
||||
|
|
@ -179,7 +179,7 @@ const FolderSlideCard = ({
|
|||
onClick={onOpenManageModal}
|
||||
/>
|
||||
</MyTooltip>
|
||||
<MyTooltip label={t('common.Add')}>
|
||||
<MyTooltip label={t('common:common.Add')}>
|
||||
<MyIcon
|
||||
w="1rem"
|
||||
name="support/permission/collaborator"
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ const AIChatSettingsModal = ({
|
|||
onClose={onClose}
|
||||
title={
|
||||
<>
|
||||
{t('core.ai.AI settings')}
|
||||
{t('common:core.ai.AI settings')}
|
||||
{feConfigs?.docUrl && (
|
||||
<Link
|
||||
href={getDocPath('/docs/course/ai_settings/')}
|
||||
|
|
@ -85,7 +85,7 @@ const AIChatSettingsModal = ({
|
|||
fontWeight={'normal'}
|
||||
fontSize={'md'}
|
||||
>
|
||||
{t('common.Read intro')}
|
||||
{t('common:common.Read intro')}
|
||||
</Link>
|
||||
)}
|
||||
</>
|
||||
|
|
@ -95,7 +95,7 @@ const AIChatSettingsModal = ({
|
|||
<ModalBody overflowY={'auto'}>
|
||||
<Flex alignItems={'center'}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.ai.Model')}
|
||||
{t('common:core.ai.Model')}
|
||||
</Box>
|
||||
<Box flex={'1 0 0'}>
|
||||
<AIModelSelector
|
||||
|
|
@ -112,7 +112,7 @@ const AIChatSettingsModal = ({
|
|||
{feConfigs && (
|
||||
<Flex mt={8}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.ai.Ai point price')}
|
||||
{t('common:core.ai.Ai point price')}
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
{t('support.wallet.Ai point every thousand tokens', {
|
||||
|
|
@ -123,7 +123,7 @@ const AIChatSettingsModal = ({
|
|||
)}
|
||||
<Flex mt={8}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.ai.Max context')}
|
||||
{t('common:core.ai.Max context')}
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
{selectedModel?.maxContext || 4096}Tokens
|
||||
|
|
@ -131,8 +131,8 @@ const AIChatSettingsModal = ({
|
|||
</Flex>
|
||||
<Flex mt={8}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.ai.Support tool')}
|
||||
<QuestionTip ml={1} label={t('core.module.template.AI support tool tip')} />
|
||||
{t('common:core.ai.Support tool')}
|
||||
<QuestionTip ml={1} label={t('common:core.module.template.AI support tool tip')} />
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
{selectedModel?.toolChoice || selectedModel?.functionCall ? '支持' : '不支持'}
|
||||
|
|
@ -140,13 +140,13 @@ const AIChatSettingsModal = ({
|
|||
</Flex>
|
||||
<Flex mt={8}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.app.Temperature')}
|
||||
{t('common:core.app.Temperature')}
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
<MySlider
|
||||
markList={[
|
||||
{ label: t('core.app.deterministic'), value: 0 },
|
||||
{ label: t('core.app.Random'), value: 10 }
|
||||
{ label: t('common:core.app.deterministic'), value: 0 },
|
||||
{ label: t('common:core.app.Random'), value: 10 }
|
||||
]}
|
||||
width={'95%'}
|
||||
min={0}
|
||||
|
|
@ -161,7 +161,7 @@ const AIChatSettingsModal = ({
|
|||
</Flex>
|
||||
<Flex mt={8}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.app.Max tokens')}
|
||||
{t('common:core.app.Max tokens')}
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
<MySlider
|
||||
|
|
@ -184,7 +184,7 @@ const AIChatSettingsModal = ({
|
|||
{showMaxHistoriesSlider && (
|
||||
<Flex mt={8}>
|
||||
<Box {...LabelStyles} mr={2}>
|
||||
{t('core.app.Max histories')}
|
||||
{t('common:core.app.Max histories')}
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
<MySlider
|
||||
|
|
@ -207,10 +207,10 @@ const AIChatSettingsModal = ({
|
|||
{showResponseAnswerText && (
|
||||
<Flex mt={8} alignItems={'center'}>
|
||||
<Box {...LabelStyles}>
|
||||
{t('core.app.Ai response')}
|
||||
{t('common:core.app.Ai response')}
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('core.module.template.AI response switch tip')}
|
||||
label={t('common:core.module.template.AI response switch tip')}
|
||||
></QuestionTip>
|
||||
</Box>
|
||||
<Box flex={1} ml={'10px'}>
|
||||
|
|
@ -228,10 +228,10 @@ const AIChatSettingsModal = ({
|
|||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button ml={4} onClick={handleSubmit(onSuccess)}>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ const SettingLLMModel = ({ llmModelType = LLMModelTypeEnum.all, defaultData, onC
|
|||
})}
|
||||
position={'relative'}
|
||||
>
|
||||
<MyTooltip label={t('core.app.Setting ai property')}>
|
||||
<MyTooltip label={t('common:core.app.Setting ai property')}>
|
||||
<Button
|
||||
w={'100%'}
|
||||
justifyContent={'flex-start'}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ const DatasetParamsModal = ({
|
|||
isOpen={true}
|
||||
onClose={onClose}
|
||||
iconSrc="/imgs/modal/params.svg"
|
||||
title={t('core.dataset.search.Dataset Search Params')}
|
||||
title={t('common:core.dataset.search.Dataset Search Params')}
|
||||
w={['90vw', '550px']}
|
||||
>
|
||||
<ModalBody flex={'auto'} overflow={'auto'}>
|
||||
|
|
@ -132,16 +132,16 @@ const DatasetParamsModal = ({
|
|||
list={[
|
||||
{
|
||||
icon: 'modal/setting',
|
||||
label: t('core.dataset.search.search mode'),
|
||||
label: t('common:core.dataset.search.search mode'),
|
||||
value: SearchSettingTabEnum.searchMode
|
||||
},
|
||||
{
|
||||
icon: 'support/outlink/apikeyFill',
|
||||
label: t('core.dataset.search.Filter'),
|
||||
label: t('common:core.dataset.search.Filter'),
|
||||
value: SearchSettingTabEnum.limit
|
||||
},
|
||||
{
|
||||
label: t('core.module.template.Query extension'),
|
||||
label: t('common:core.module.template.Query extension'),
|
||||
value: SearchSettingTabEnum.queryExtension,
|
||||
icon: '/imgs/workflow/cfr.svg'
|
||||
}
|
||||
|
|
@ -182,7 +182,7 @@ const DatasetParamsModal = ({
|
|||
if (!showReRank) {
|
||||
return toast({
|
||||
status: 'warning',
|
||||
title: t('core.ai.Not deploy rerank model')
|
||||
title: t('common:core.ai.Not deploy rerank model')
|
||||
});
|
||||
}
|
||||
if (
|
||||
|
|
@ -191,7 +191,7 @@ const DatasetParamsModal = ({
|
|||
) {
|
||||
return toast({
|
||||
status: 'warning',
|
||||
title: t('support.team.limit.No permission rerank')
|
||||
title: t('common:support.team.limit.No permission rerank')
|
||||
});
|
||||
}
|
||||
setValue('usingReRank', !getValues('usingReRank'));
|
||||
|
|
@ -200,9 +200,9 @@ const DatasetParamsModal = ({
|
|||
>
|
||||
<MyIcon name="core/dataset/rerank" w={'18px'} mr={'14px'} />
|
||||
<Box pr={2} color={'myGray.800'} flex={'1 0 0'}>
|
||||
<Box fontSize={'sm'}>{t('core.dataset.search.ReRank')}</Box>
|
||||
<Box fontSize={'sm'}>{t('common:core.dataset.search.ReRank')}</Box>
|
||||
<Box fontSize={'xs'} color={'myGray.500'}>
|
||||
{t('core.dataset.search.ReRank desc')}
|
||||
{t('common:core.dataset.search.ReRank desc')}
|
||||
</Box>
|
||||
</Box>
|
||||
<Box position={'relative'} w={'18px'} h={'18px'}>
|
||||
|
|
@ -218,10 +218,10 @@ const DatasetParamsModal = ({
|
|||
{limit !== undefined && (
|
||||
<Box display={['block', 'flex']}>
|
||||
<Flex flex={'0 0 120px'} mb={[8, 0]}>
|
||||
<FormLabel>{t('core.dataset.search.Max Tokens')}</FormLabel>
|
||||
<FormLabel>{t('common:core.dataset.search.Max Tokens')}</FormLabel>
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('core.dataset.search.Max Tokens Tips')}
|
||||
label={t('common:core.dataset.search.Max Tokens Tips')}
|
||||
></QuestionTip>
|
||||
</Flex>
|
||||
<Box flex={1} mx={4}>
|
||||
|
|
@ -244,10 +244,10 @@ const DatasetParamsModal = ({
|
|||
)}
|
||||
<Box display={['block', 'flex']} mt={10}>
|
||||
<Flex flex={'0 0 120px'} mb={[8, 0]}>
|
||||
<FormLabel>{t('core.dataset.search.Min Similarity')}</FormLabel>
|
||||
<FormLabel>{t('common:core.dataset.search.Min Similarity')}</FormLabel>
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('core.dataset.search.Min Similarity Tips')}
|
||||
label={t('common:core.dataset.search.Min Similarity Tips')}
|
||||
></QuestionTip>
|
||||
</Flex>
|
||||
<Box flex={1} mx={4}>
|
||||
|
|
@ -267,7 +267,9 @@ const DatasetParamsModal = ({
|
|||
}}
|
||||
/>
|
||||
) : (
|
||||
<Box color={'myGray.500'}>{t('core.dataset.search.No support similarity')}</Box>
|
||||
<Box color={'myGray.500'}>
|
||||
{t('common:core.dataset.search.No support similarity')}
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
|
|
@ -276,16 +278,18 @@ const DatasetParamsModal = ({
|
|||
{currentTabType === SearchSettingTabEnum.queryExtension && (
|
||||
<Box>
|
||||
<Box transform={'translateY(-5px)'} fontSize={'xs'} color={'myGray.500'}>
|
||||
{t('core.dataset.Query extension intro')}
|
||||
{t('common:core.dataset.Query extension intro')}
|
||||
</Box>
|
||||
<Flex mt={3} alignItems={'center'}>
|
||||
<FormLabel flex={'1 0 0'}>{t('core.dataset.search.Using query extension')}</FormLabel>
|
||||
<FormLabel flex={'1 0 0'}>
|
||||
{t('common:core.dataset.search.Using query extension')}
|
||||
</FormLabel>
|
||||
<Switch {...register('datasetSearchUsingExtensionQuery')} />
|
||||
</Flex>
|
||||
{datasetSearchUsingCfrForm === true && (
|
||||
<>
|
||||
<Flex mt={4} alignItems={'center'}>
|
||||
<FormLabel flex={['0 0 80px', '1 0 0']}>{t('core.ai.Model')}</FormLabel>
|
||||
<FormLabel flex={['0 0 80px', '1 0 0']}>{t('common:core.ai.Model')}</FormLabel>
|
||||
<Box flex={['1 0 0', '0 0 300px']}>
|
||||
<SelectAiModel
|
||||
width={'100%'}
|
||||
|
|
@ -299,17 +303,19 @@ const DatasetParamsModal = ({
|
|||
</Flex>
|
||||
<Box mt={3}>
|
||||
<Flex alignItems={'center'}>
|
||||
<FormLabel>{t('core.app.edit.Query extension background prompt')}</FormLabel>
|
||||
<FormLabel>
|
||||
{t('common:core.app.edit.Query extension background prompt')}
|
||||
</FormLabel>
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('core.app.edit.Query extension background tip')}
|
||||
label={t('common:core.app.edit.Query extension background tip')}
|
||||
></QuestionTip>
|
||||
</Flex>
|
||||
<Box mt={1}>
|
||||
<PromptEditor
|
||||
h={200}
|
||||
showOpenModal={false}
|
||||
placeholder={t('core.module.QueryExtension.placeholder')}
|
||||
placeholder={t('common:core.module.QueryExtension.placeholder')}
|
||||
value={cfbBgDesc}
|
||||
onChange={(e) => {
|
||||
setValue('datasetSearchExtensionBg', e);
|
||||
|
|
@ -324,7 +330,7 @@ const DatasetParamsModal = ({
|
|||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
|
|
@ -332,7 +338,7 @@ const DatasetParamsModal = ({
|
|||
handleSubmit(onSuccess)();
|
||||
}}
|
||||
>
|
||||
{t('common.Done')}
|
||||
{t('common:common.Done')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export const DatasetSelectModal = ({
|
|||
isOpen={isOpen}
|
||||
paths={paths}
|
||||
setParentId={setParentId}
|
||||
tips={t('dataset.Select Dataset Tips')}
|
||||
tips={t('common:dataset.Select Dataset Tips')}
|
||||
onClose={onClose}
|
||||
>
|
||||
<Flex h={'100%'} flexDirection={'column'} flex={'1 0 0'}>
|
||||
|
|
@ -124,8 +124,8 @@ export const DatasetSelectModal = ({
|
|||
key={item._id}
|
||||
label={
|
||||
item.type === DatasetTypeEnum.folder
|
||||
? t('dataset.Select Folder')
|
||||
: t('dataset.Select Dataset')
|
||||
? t('common:dataset.Select Folder')
|
||||
: t('common:dataset.Select Dataset')
|
||||
}
|
||||
>
|
||||
<Card
|
||||
|
|
@ -148,7 +148,7 @@ export const DatasetSelectModal = ({
|
|||
if (vectorModel && vectorModel !== item.vectorModel.model) {
|
||||
return toast({
|
||||
status: 'warning',
|
||||
title: t('dataset.Select Dataset Tips')
|
||||
title: t('common:dataset.Select Dataset Tips')
|
||||
});
|
||||
}
|
||||
setSelectedDatasets((state) => [...state, { datasetId: item._id }]);
|
||||
|
|
@ -170,7 +170,7 @@ export const DatasetSelectModal = ({
|
|||
</Flex>
|
||||
<Flex justifyContent={'flex-end'} alignItems={'center'} fontSize={'sm'}>
|
||||
{item.type === DatasetTypeEnum.folder ? (
|
||||
<Box color={'myGray.500'}>{t('Folder')}</Box>
|
||||
<Box color={'myGray.500'}>{t('common:Folder')}</Box>
|
||||
) : (
|
||||
<>
|
||||
<MyIcon mr={1} name="kbTest" w={'12px'} />
|
||||
|
|
@ -184,7 +184,9 @@ export const DatasetSelectModal = ({
|
|||
})()
|
||||
)}
|
||||
</Grid>
|
||||
{filterDatasets.unSelected.length === 0 && <EmptyTip text={t('common.folder.empty')} />}
|
||||
{filterDatasets.unSelected.length === 0 && (
|
||||
<EmptyTip text={t('common:common.folder.empty')} />
|
||||
)}
|
||||
</ModalBody>
|
||||
|
||||
<ModalFooter>
|
||||
|
|
@ -199,7 +201,7 @@ export const DatasetSelectModal = ({
|
|||
onChange(filterDatasets);
|
||||
}}
|
||||
>
|
||||
{t('common.Done')}
|
||||
{t('common:common.Done')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
|
||||
|
|
|
|||
|
|
@ -77,9 +77,9 @@ const InputGuideConfig = ({
|
|||
|
||||
const formLabel = useMemo(() => {
|
||||
if (!isOpenQuestionGuide) {
|
||||
return t('core.app.whisper.Close');
|
||||
return t('common:core.app.whisper.Close');
|
||||
}
|
||||
return t('core.app.whisper.Open');
|
||||
return t('common:core.app.whisper.Open');
|
||||
}, [t, isOpenQuestionGuide]);
|
||||
|
||||
return (
|
||||
|
|
@ -110,7 +110,7 @@ const InputGuideConfig = ({
|
|||
>
|
||||
<ModalBody px={[5, 16]} py={[4, 8]}>
|
||||
<Flex justifyContent={'space-between'} alignItems={'center'}>
|
||||
<FormLabel>{t('Is open')}</FormLabel>
|
||||
<FormLabel>{t('common:Is open')}</FormLabel>
|
||||
<Switch
|
||||
isChecked={isOpenQuestionGuide}
|
||||
onChange={(e) => {
|
||||
|
|
@ -231,7 +231,7 @@ const LexiconConfigModal = ({ appId, onClose }: { appId: string; onClose: () =>
|
|||
} else {
|
||||
toast({
|
||||
status: 'success',
|
||||
title: t('common.Add Success')
|
||||
title: t('common:common.Add Success')
|
||||
});
|
||||
}
|
||||
fetchData(1);
|
||||
|
|
@ -241,7 +241,7 @@ const LexiconConfigModal = ({ appId, onClose }: { appId: string; onClose: () =>
|
|||
onSuccess() {
|
||||
setNewData(undefined);
|
||||
},
|
||||
errorToast: t('error.Create failed')
|
||||
errorToast: t('common:error.Create failed')
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const QGSwitch = (props: SwitchProps) => {
|
|||
return (
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon name={'core/chat/QGFill'} mr={2} w={'20px'} />
|
||||
<FormLabel>{t('core.app.Question Guide')}</FormLabel>
|
||||
<FormLabel>{t('common:core.app.Question Guide')}</FormLabel>
|
||||
<ChatFunctionTip type={'nextQuestion'} />
|
||||
<Box flex={1} />
|
||||
<Switch {...props} />
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ const ScheduledTriggerConfig = ({
|
|||
// cron config to show label
|
||||
const formatLabel = useMemo(() => {
|
||||
if (!isOpenSchedule) {
|
||||
return t('common.Not open');
|
||||
return t('common:common.Not open');
|
||||
}
|
||||
|
||||
if (cronField[0] === 'month') {
|
||||
|
|
@ -239,7 +239,7 @@ const ScheduledTriggerConfig = ({
|
|||
});
|
||||
}
|
||||
|
||||
return t('common.Not open');
|
||||
return t('common:common.Not open');
|
||||
}, [cronField, isOpenSchedule, t]);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -254,10 +254,10 @@ const ScheduledTriggerConfig = ({
|
|||
<Flex alignItems={'center'}>
|
||||
<MyIcon name={'core/app/schedulePlan'} w={'20px'} />
|
||||
<HStack ml={2} flex={1} spacing={1}>
|
||||
<FormLabel>{t('core.app.Interval timer run')}</FormLabel>
|
||||
<QuestionTip label={t('core.app.Interval timer tip')} />
|
||||
<FormLabel>{t('common:core.app.Interval timer run')}</FormLabel>
|
||||
<QuestionTip label={t('common:core.app.Interval timer tip')} />
|
||||
</HStack>
|
||||
<MyTooltip label={t('core.app.Config schedule plan')}>
|
||||
<MyTooltip label={t('common:core.app.Config schedule plan')}>
|
||||
<Button
|
||||
variant={'transparentBase'}
|
||||
iconSpacing={1}
|
||||
|
|
@ -274,12 +274,15 @@ const ScheduledTriggerConfig = ({
|
|||
isOpen={isOpen}
|
||||
onClose={onClose}
|
||||
iconSrc={'core/app/schedulePlan'}
|
||||
title={t('core.app.Interval timer config')}
|
||||
title={t('common:core.app.Interval timer config')}
|
||||
overflow={'unset'}
|
||||
>
|
||||
<ModalBody>
|
||||
<Flex justifyContent={'space-between'} alignItems={'center'}>
|
||||
<FormLabel flex={'0 0 80px'}> {t('core.app.schedule.Open schedule')}</FormLabel>
|
||||
<FormLabel flex={'0 0 80px'}>
|
||||
{' '}
|
||||
{t('common:core.app.schedule.Open schedule')}
|
||||
</FormLabel>
|
||||
<Switch
|
||||
isChecked={isOpenSchedule}
|
||||
onChange={(e) => {
|
||||
|
|
@ -318,12 +321,12 @@ const ScheduledTriggerConfig = ({
|
|||
</Box>
|
||||
</Flex>
|
||||
<Box mt={5}>
|
||||
<FormLabel mb={1}>{t('core.app.schedule.Default prompt')}</FormLabel>
|
||||
<FormLabel mb={1}>{t('common:core.app.schedule.Default prompt')}</FormLabel>
|
||||
<Textarea
|
||||
value={defaultPrompt}
|
||||
rows={8}
|
||||
bg={'myGray.50'}
|
||||
placeholder={t('core.app.schedule.Default prompt placeholder')}
|
||||
placeholder={t('common:core.app.schedule.Default prompt placeholder')}
|
||||
onChange={(e) => {
|
||||
onUpdate({ defaultPrompt: e.target.value });
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ const TTSSelect = ({
|
|||
|
||||
const list = useMemo(
|
||||
() => [
|
||||
{ label: t('core.app.tts.Close'), value: TTSTypeEnum.none },
|
||||
{ label: t('core.app.tts.Web'), value: TTSTypeEnum.web },
|
||||
{ label: t('common:core.app.tts.Close'), value: TTSTypeEnum.none },
|
||||
{ label: t('common:core.app.tts.Web'), value: TTSTypeEnum.web },
|
||||
...audioSpeechModelList.map((item) => item?.voices || []).flat()
|
||||
],
|
||||
[audioSpeechModelList, t]
|
||||
|
|
@ -44,7 +44,7 @@ const TTSSelect = ({
|
|||
return value.voice;
|
||||
}, [value]);
|
||||
const formLabel = useMemo(
|
||||
() => list.find((item) => item.value === formatValue)?.label || t('common.UnKnow'),
|
||||
() => list.find((item) => item.value === formatValue)?.label || t('common:common.UnKnow'),
|
||||
[formatValue, list, t]
|
||||
);
|
||||
|
||||
|
|
@ -82,10 +82,10 @@ const TTSSelect = ({
|
|||
return (
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon name={'core/app/simpleMode/tts'} mr={2} w={'20px'} />
|
||||
<FormLabel>{t('core.app.TTS')}</FormLabel>
|
||||
<FormLabel>{t('common:core.app.TTS')}</FormLabel>
|
||||
<ChatFunctionTip type={'tts'} />
|
||||
<Box flex={1} />
|
||||
<MyTooltip label={t('core.app.Select TTS')}>
|
||||
<MyTooltip label={t('common:core.app.Select TTS')}>
|
||||
<Button
|
||||
variant={'transparentBase'}
|
||||
iconSpacing={1}
|
||||
|
|
@ -100,7 +100,7 @@ const TTSSelect = ({
|
|||
title={
|
||||
<>
|
||||
<MyIcon name={'core/app/simpleMode/tts'} mr={2} w={'20px'} />
|
||||
{t('core.app.TTS')}
|
||||
{t('common:core.app.TTS')}
|
||||
</>
|
||||
}
|
||||
isOpen={isOpen}
|
||||
|
|
@ -109,11 +109,11 @@ const TTSSelect = ({
|
|||
>
|
||||
<ModalBody px={[5, 16]} py={[4, 8]}>
|
||||
<Flex justifyContent={'space-between'} alignItems={'center'}>
|
||||
<FormLabel>{t('core.app.tts.Speech model')}</FormLabel>
|
||||
<FormLabel>{t('common:core.app.tts.Speech model')}</FormLabel>
|
||||
<MySelect w={'220px'} value={formatValue} list={list} onchange={onclickChange} />
|
||||
</Flex>
|
||||
<Flex mt={8} justifyContent={'space-between'}>
|
||||
<FormLabel>{t('core.app.tts.Speech speed')}</FormLabel>
|
||||
<FormLabel>{t('common:core.app.tts.Speech speed')}</FormLabel>
|
||||
<MySlider
|
||||
markList={[
|
||||
{ label: '0.3', value: 0.3 },
|
||||
|
|
@ -145,7 +145,7 @@ const TTSSelect = ({
|
|||
leftIcon={<MyIcon name={'core/chat/stopSpeech'} w={'16px'} />}
|
||||
onClick={cancelAudio}
|
||||
>
|
||||
{t('core.chat.tts.Stop Speech')}
|
||||
{t('common:core.chat.tts.Stop Speech')}
|
||||
</Button>
|
||||
</Flex>
|
||||
) : (
|
||||
|
|
@ -154,11 +154,11 @@ const TTSSelect = ({
|
|||
leftIcon={<MyIcon name={'core/app/headphones'} w={'16px'} />}
|
||||
onClick={() => {
|
||||
playAudioByText({
|
||||
text: t('core.app.tts.Test Listen Text')
|
||||
text: t('common:core.app.tts.Test Listen Text')
|
||||
});
|
||||
}}
|
||||
>
|
||||
{t('core.app.tts.Test Listen')}
|
||||
{t('common:core.app.tts.Test Listen')}
|
||||
</Button>
|
||||
)}
|
||||
</Flex>
|
||||
|
|
|
|||
|
|
@ -25,26 +25,26 @@ const ChatFunctionTip = ({ type }: { type: `${FnTypeEnum}` }) => {
|
|||
},
|
||||
[FnTypeEnum.nextQuestion]: {
|
||||
icon: '/imgs/app/nextQuestion-icon.svg',
|
||||
title: t('core.app.Question Guide'),
|
||||
desc: t('core.app.Question Guide Tip'),
|
||||
title: t('common:core.app.Question Guide'),
|
||||
desc: t('common:core.app.Question Guide Tip'),
|
||||
imgUrl: '/imgs/app/nextQuestion.svg'
|
||||
},
|
||||
[FnTypeEnum.tts]: {
|
||||
icon: '/imgs/app/tts-icon.svg',
|
||||
title: t('core.app.TTS'),
|
||||
desc: t('core.app.TTS Tip'),
|
||||
title: t('common:core.app.TTS'),
|
||||
desc: t('common:core.app.TTS Tip'),
|
||||
imgUrl: '/imgs/app/tts.svg'
|
||||
},
|
||||
[FnTypeEnum.variable]: {
|
||||
icon: '/imgs/app/variable-icon.svg',
|
||||
title: t('core.module.Variable'),
|
||||
desc: t('core.app.tip.variableTip'),
|
||||
title: t('common:core.module.Variable'),
|
||||
desc: t('common:core.app.tip.variableTip'),
|
||||
imgUrl: '/imgs/app/variable.svg'
|
||||
},
|
||||
[FnTypeEnum.welcome]: {
|
||||
icon: '/imgs/app/welcome-icon.svg',
|
||||
title: t('core.app.Welcome Text'),
|
||||
desc: t('core.app.tip.welcomeTextTip'),
|
||||
title: t('common:core.app.Welcome Text'),
|
||||
desc: t('common:core.app.tip.welcomeTextTip'),
|
||||
imgUrl: '/imgs/app/welcome.svg'
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ const VariableEdit = ({
|
|||
<Flex alignItems={'center'}>
|
||||
<MyIcon name={'core/app/simpleMode/variable'} w={'20px'} />
|
||||
<FormLabel ml={2} fontWeight={'medium'}>
|
||||
{t('core.module.Variable')}
|
||||
{t('common:core.module.Variable')}
|
||||
</FormLabel>
|
||||
<ChatFunctionTip type={'variable'} />
|
||||
<Box flex={1} />
|
||||
|
|
@ -112,7 +112,7 @@ const VariableEdit = ({
|
|||
onOpenEdit();
|
||||
}}
|
||||
>
|
||||
{t('common.Add New')}
|
||||
{t('common:common.Add New')}
|
||||
</Button>
|
||||
</Flex>
|
||||
{formatVariables.length > 0 && (
|
||||
|
|
@ -127,9 +127,9 @@ const VariableEdit = ({
|
|||
w={'18px !important'}
|
||||
p={0}
|
||||
/>
|
||||
<Th fontSize={'mini'}>{t('core.module.variable.variable name')}</Th>
|
||||
<Th fontSize={'mini'}>{t('core.module.variable.key')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common.Require Input')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:core.module.variable.variable name')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:core.module.variable.key')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:common.Require Input')}</Th>
|
||||
<Th fontSize={'mini'} borderRadius={'none !important'}></Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
|
|
@ -171,7 +171,7 @@ const VariableEdit = ({
|
|||
)}
|
||||
<MyModal
|
||||
iconSrc="core/app/simpleMode/variable"
|
||||
title={t('core.module.Variable Setting')}
|
||||
title={t('common:core.module.Variable Setting')}
|
||||
isOpen={isOpenEdit}
|
||||
onClose={onCloseEdit}
|
||||
maxW={['90vw', '500px']}
|
||||
|
|
@ -179,29 +179,29 @@ const VariableEdit = ({
|
|||
<ModalBody>
|
||||
{variableType !== VariableInputEnum.custom && (
|
||||
<Flex alignItems={'center'}>
|
||||
<FormLabel w={'70px'}>{t('common.Require Input')}</FormLabel>
|
||||
<FormLabel w={'70px'}>{t('common:common.Require Input')}</FormLabel>
|
||||
<Switch {...registerEdit('variable.required')} />
|
||||
</Flex>
|
||||
)}
|
||||
<Flex mt={5} alignItems={'center'}>
|
||||
<FormLabel w={'80px'}>{t('core.module.variable.variable name')}</FormLabel>
|
||||
<FormLabel w={'80px'}>{t('common:core.module.variable.variable name')}</FormLabel>
|
||||
<Input
|
||||
{...registerEdit('variable.label', {
|
||||
required: t('core.module.variable.variable name is required')
|
||||
required: t('common:core.module.variable.variable name is required')
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
<Flex mt={5} alignItems={'center'}>
|
||||
<FormLabel w={'80px'}>{t('core.module.variable.key')}</FormLabel>
|
||||
<FormLabel w={'80px'}>{t('common:core.module.variable.key')}</FormLabel>
|
||||
<Input
|
||||
{...registerEdit('variable.key', {
|
||||
required: t('core.module.variable.key is required')
|
||||
required: t('common:core.module.variable.key is required')
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
|
||||
<FormLabel mt={5} mb={2}>
|
||||
{t('core.workflow.Variable.Variable type')}
|
||||
{t('common:core.workflow.Variable.Variable type')}
|
||||
</FormLabel>
|
||||
<MyRadio
|
||||
gridGap={4}
|
||||
|
|
@ -226,7 +226,7 @@ const VariableEdit = ({
|
|||
{variableType === VariableInputEnum.input && (
|
||||
<>
|
||||
<FormLabel mt={5} mb={2}>
|
||||
{t('core.module.variable.text max length')}
|
||||
{t('common:core.module.variable.text max length')}
|
||||
</FormLabel>
|
||||
<Box>
|
||||
<NumberInput max={500} min={1} step={1} position={'relative'}>
|
||||
|
|
@ -250,7 +250,7 @@ const VariableEdit = ({
|
|||
{variableType === VariableInputEnum.select && (
|
||||
<>
|
||||
<Box mt={5} mb={2}>
|
||||
{t('core.module.variable.variable options')}
|
||||
{t('common:core.module.variable.variable options')}
|
||||
</Box>
|
||||
<Box>
|
||||
{selectEnums.map((item, i) => (
|
||||
|
|
@ -258,7 +258,9 @@ const VariableEdit = ({
|
|||
<FormControl>
|
||||
<Input
|
||||
{...registerEdit(`variable.enums.${i}.value`, {
|
||||
required: t('core.module.variable.variable option is value is required')
|
||||
required: t(
|
||||
'common:core.module.variable.variable option is value is required'
|
||||
)
|
||||
})}
|
||||
/>
|
||||
</FormControl>
|
||||
|
|
@ -285,7 +287,7 @@ const VariableEdit = ({
|
|||
bg={'myGray.100 !important'}
|
||||
onClick={() => appendEnums({ value: '' })}
|
||||
>
|
||||
{t('core.module.variable add option')}
|
||||
{t('common:core.module.variable add option')}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
|
|
@ -293,7 +295,7 @@ const VariableEdit = ({
|
|||
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onCloseEdit}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={handleSubmitEdit(({ variable }) => {
|
||||
|
|
@ -303,7 +305,7 @@ const VariableEdit = ({
|
|||
if (enums.length === 0) {
|
||||
toast({
|
||||
status: 'warning',
|
||||
title: t('core.module.variable.variable option is required')
|
||||
title: t('common:core.module.variable.variable option is required')
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
@ -323,7 +325,9 @@ const VariableEdit = ({
|
|||
onCloseEdit();
|
||||
})}
|
||||
>
|
||||
{getValuesEdit('variable.id') ? t('common.Confirm Update') : t('common.Add New')}
|
||||
{getValuesEdit('variable.id')
|
||||
? t('common:common.Confirm Update')
|
||||
: t('common:common.Add New')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const WelcomeTextConfig = (props: TextareaProps) => {
|
|||
<>
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon name={'core/app/simpleMode/chat'} w={'20px'} />
|
||||
<FormLabel ml={2}>{t('core.app.Welcome Text')}</FormLabel>
|
||||
<FormLabel ml={2}>{t('common:core.app.Welcome Text')}</FormLabel>
|
||||
<ChatFunctionTip type={'welcome'} />
|
||||
</Flex>
|
||||
<MyTextarea
|
||||
|
|
@ -21,7 +21,7 @@ const WelcomeTextConfig = (props: TextareaProps) => {
|
|||
bg={'myWhite.400'}
|
||||
rows={6}
|
||||
fontSize={'sm'}
|
||||
placeholder={t('core.app.tip.welcomeTextTip')}
|
||||
placeholder={t('common:core.app.tip.welcomeTextTip')}
|
||||
{...props}
|
||||
/>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -26,17 +26,17 @@ const WhisperConfig = ({
|
|||
|
||||
const formLabel = useMemo(() => {
|
||||
if (!isOpenWhisper) {
|
||||
return t('core.app.whisper.Close');
|
||||
return t('common:core.app.whisper.Close');
|
||||
}
|
||||
return t('core.app.whisper.Open');
|
||||
return t('common:core.app.whisper.Open');
|
||||
}, [t, isOpenWhisper]);
|
||||
|
||||
return (
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon name={'core/app/simpleMode/whisper'} mr={2} w={'20px'} />
|
||||
<FormLabel>{t('core.app.Whisper')}</FormLabel>
|
||||
<FormLabel>{t('common:core.app.Whisper')}</FormLabel>
|
||||
<Box flex={1} />
|
||||
<MyTooltip label={t('core.app.Config whisper')}>
|
||||
<MyTooltip label={t('common:core.app.Config whisper')}>
|
||||
<Button
|
||||
variant={'transparentBase'}
|
||||
iconSpacing={1}
|
||||
|
|
@ -48,14 +48,14 @@ const WhisperConfig = ({
|
|||
</Button>
|
||||
</MyTooltip>
|
||||
<MyModal
|
||||
title={t('core.app.Whisper config')}
|
||||
title={t('common:core.app.Whisper config')}
|
||||
iconSrc="core/app/simpleMode/whisper"
|
||||
isOpen={isOpen}
|
||||
onClose={onClose}
|
||||
>
|
||||
<ModalBody px={[5, 16]} py={[4, 8]}>
|
||||
<Flex justifyContent={'space-between'} alignItems={'center'}>
|
||||
<FormLabel>{t('core.app.whisper.Switch')}</FormLabel>
|
||||
<FormLabel>{t('common:core.app.whisper.Switch')}</FormLabel>
|
||||
<Switch
|
||||
isChecked={isOpenWhisper}
|
||||
onChange={(e) => {
|
||||
|
|
@ -68,8 +68,8 @@ const WhisperConfig = ({
|
|||
</Flex>
|
||||
{isOpenWhisper && (
|
||||
<Flex mt={8} alignItems={'center'}>
|
||||
<FormLabel>{t('core.app.whisper.Auto send')}</FormLabel>
|
||||
<QuestionTip label={t('core.app.whisper.Auto send tip')} />
|
||||
<FormLabel>{t('common:core.app.whisper.Auto send')}</FormLabel>
|
||||
<QuestionTip label={t('common:core.app.whisper.Auto send tip')} />
|
||||
<Box flex={'1 0 0'} />
|
||||
<Switch
|
||||
isChecked={value.autoSend}
|
||||
|
|
@ -85,8 +85,8 @@ const WhisperConfig = ({
|
|||
{isOpenWhisper && isAutoSend && (
|
||||
<>
|
||||
<Flex mt={8} alignItems={'center'}>
|
||||
<FormLabel>{t('core.app.whisper.Auto tts response')}</FormLabel>
|
||||
<QuestionTip label={t('core.app.whisper.Auto tts response tip')} />
|
||||
<FormLabel>{t('common:core.app.whisper.Auto tts response')}</FormLabel>
|
||||
<QuestionTip label={t('common:core.app.whisper.Auto tts response tip')} />
|
||||
<Box flex={'1 0 0'} />
|
||||
<Switch
|
||||
isChecked={value.autoTTSResponse}
|
||||
|
|
@ -100,7 +100,7 @@ const WhisperConfig = ({
|
|||
</Flex>
|
||||
{!isOpenAudio && (
|
||||
<Box mt={1} color={'myGray.600'} fontSize={'sm'}>
|
||||
{t('core.app.whisper.Not tts tip')}
|
||||
{t('common:core.app.whisper.Not tts tip')}
|
||||
</Box>
|
||||
)}
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ const ChatInput = ({
|
|||
}
|
||||
}
|
||||
},
|
||||
errorToast: t('common.Upload File Failed')
|
||||
errorToast: t('common:common.Upload File Failed')
|
||||
});
|
||||
const onSelectFile = useCallback(
|
||||
async (files: File[]) => {
|
||||
|
|
@ -257,7 +257,7 @@ const ChatInput = ({
|
|||
visibility={isSpeaking && isTransCription ? 'visible' : 'hidden'}
|
||||
>
|
||||
<Spinner size={'sm'} mr={4} />
|
||||
{t('core.chat.Converting to text')}
|
||||
{t('common:core.chat.Converting to text')}
|
||||
</Flex>
|
||||
|
||||
{/* file preview */}
|
||||
|
|
@ -336,7 +336,7 @@ const ChatInput = ({
|
|||
onOpenSelectFile();
|
||||
}}
|
||||
>
|
||||
<MyTooltip label={t('core.chat.Select Image')}>
|
||||
<MyTooltip label={t('common:core.chat.Select Image')}>
|
||||
<MyIcon name={'core/chat/fileSelect'} w={'18px'} color={'myGray.600'} />
|
||||
</MyTooltip>
|
||||
<File onSelect={onSelectFile} />
|
||||
|
|
@ -353,7 +353,9 @@ const ChatInput = ({
|
|||
_focusVisible={{
|
||||
border: 'none'
|
||||
}}
|
||||
placeholder={isSpeaking ? t('core.chat.Speaking') : t('core.chat.Type a message')}
|
||||
placeholder={
|
||||
isSpeaking ? t('common:core.chat.Speaking') : t('common:core.chat.Type a message')
|
||||
}
|
||||
resize={'none'}
|
||||
rows={1}
|
||||
height={'22px'}
|
||||
|
|
@ -430,7 +432,7 @@ const ChatInput = ({
|
|||
}}
|
||||
/>
|
||||
{isSpeaking && (
|
||||
<MyTooltip label={t('core.chat.Cancel Speak')}>
|
||||
<MyTooltip label={t('common:core.chat.Cancel Speak')}>
|
||||
<Flex
|
||||
mr={2}
|
||||
alignItems={'center'}
|
||||
|
|
@ -451,7 +453,11 @@ const ChatInput = ({
|
|||
</Flex>
|
||||
</MyTooltip>
|
||||
)}
|
||||
<MyTooltip label={isSpeaking ? t('core.chat.Finish Speak') : t('core.chat.Record')}>
|
||||
<MyTooltip
|
||||
label={
|
||||
isSpeaking ? t('common:core.chat.Finish Speak') : t('common:core.chat.Record')
|
||||
}
|
||||
>
|
||||
<Flex
|
||||
mr={2}
|
||||
alignItems={'center'}
|
||||
|
|
@ -513,7 +519,7 @@ const ChatInput = ({
|
|||
color={'gray.500'}
|
||||
/>
|
||||
) : (
|
||||
<MyTooltip label={t('core.chat.Send Message')}>
|
||||
<MyTooltip label={t('common:core.chat.Send Message')}>
|
||||
<MyIcon
|
||||
name={'core/chat/sendFill'}
|
||||
width={['18px', '20px']}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ export default function InputGuideBox({
|
|||
<Box fontSize={'sm'} flex={'1 0 0'}>
|
||||
<HighlightText rawText={item} matchText={text} />
|
||||
</Box>
|
||||
<MyTooltip label={t('core.chat.markdown.Send Question')}>
|
||||
<MyTooltip label={t('common:core.chat.markdown.Send Question')}>
|
||||
<MyIcon
|
||||
className="send-icon"
|
||||
display={'none'}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ const ChatController = ({
|
|||
}
|
||||
})}
|
||||
>
|
||||
<MyTooltip label={t('common.Copy')}>
|
||||
<MyTooltip label={t('common:common.Copy')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
name={'copy'}
|
||||
|
|
@ -90,7 +90,7 @@ const ChatController = ({
|
|||
{!!onDelete && !isChatting && (
|
||||
<>
|
||||
{onRetry && (
|
||||
<MyTooltip label={t('core.chat.retry')}>
|
||||
<MyTooltip label={t('common:core.chat.retry')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
name={'common/retryLight'}
|
||||
|
|
@ -99,7 +99,7 @@ const ChatController = ({
|
|||
/>
|
||||
</MyTooltip>
|
||||
)}
|
||||
<MyTooltip label={t('common.Delete')}>
|
||||
<MyTooltip label={t('common:common.Delete')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
name={'delete'}
|
||||
|
|
@ -116,7 +116,7 @@ const ChatController = ({
|
|||
if (isPlayingChat && audioPlaying) {
|
||||
return (
|
||||
<Flex alignItems={'center'}>
|
||||
<MyTooltip label={t('core.chat.tts.Stop Speech')}>
|
||||
<MyTooltip label={t('common:core.chat.tts.Stop Speech')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
borderRight={'none'}
|
||||
|
|
@ -136,13 +136,13 @@ const ChatController = ({
|
|||
}
|
||||
if (isPlayingChat && audioLoading) {
|
||||
return (
|
||||
<MyTooltip label={t('common.Loading')}>
|
||||
<MyTooltip label={t('common:common.Loading')}>
|
||||
<MyIcon {...controlIconStyle} name={'common/loading'} />
|
||||
</MyTooltip>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<MyTooltip label={t('core.app.TTS start')}>
|
||||
<MyTooltip label={t('common:core.app.TTS start')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
name={'common/voiceLight'}
|
||||
|
|
@ -171,7 +171,7 @@ const ChatController = ({
|
|||
);
|
||||
})()}
|
||||
{!!onMark && (
|
||||
<MyTooltip label={t('core.chat.Mark')}>
|
||||
<MyTooltip label={t('common:core.chat.Mark')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
name={'core/app/markLight'}
|
||||
|
|
@ -183,7 +183,7 @@ const ChatController = ({
|
|||
{chat.obj === ChatRoleEnum.AI && (
|
||||
<>
|
||||
{!!onCloseUserLike && chat.userGoodFeedback && (
|
||||
<MyTooltip label={t('core.chat.feedback.Close User Like')}>
|
||||
<MyTooltip label={t('common:core.chat.feedback.Close User Like')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
color={'white'}
|
||||
|
|
@ -195,7 +195,7 @@ const ChatController = ({
|
|||
</MyTooltip>
|
||||
)}
|
||||
{!!onReadUserDislike && chat.userBadFeedback && (
|
||||
<MyTooltip label={t('core.chat.feedback.Read User dislike')}>
|
||||
<MyTooltip label={t('common:core.chat.feedback.Read User dislike')}>
|
||||
<MyIcon
|
||||
{...controlIconStyle}
|
||||
color={'white'}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ const FeedbackModal = ({
|
|||
|
||||
const { mutate, isLoading } = useRequest({
|
||||
mutationFn: async () => {
|
||||
const val = ref.current?.value || t('core.chat.feedback.No Content');
|
||||
const val = ref.current?.value || t('common:core.chat.feedback.No Content');
|
||||
return updateChatUserFeedback({
|
||||
appId,
|
||||
chatId,
|
||||
|
|
@ -44,10 +44,10 @@ const FeedbackModal = ({
|
|||
});
|
||||
},
|
||||
onSuccess() {
|
||||
onSuccess(ref.current?.value || t('core.chat.feedback.No Content'));
|
||||
onSuccess(ref.current?.value || t('common:core.chat.feedback.No Content'));
|
||||
},
|
||||
successToast: t('core.chat.Feedback Success'),
|
||||
errorToast: t('core.chat.Feedback Failed')
|
||||
successToast: t('common:core.chat.Feedback Success'),
|
||||
errorToast: t('common:core.chat.Feedback Failed')
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -55,17 +55,17 @@ const FeedbackModal = ({
|
|||
isOpen={true}
|
||||
onClose={onClose}
|
||||
iconSrc="/imgs/modal/badAnswer.svg"
|
||||
title={t('core.chat.Feedback Modal')}
|
||||
title={t('common:core.chat.Feedback Modal')}
|
||||
>
|
||||
<ModalBody>
|
||||
<Textarea ref={ref} rows={10} placeholder={t('core.chat.Feedback Modal Tip')} />
|
||||
<Textarea ref={ref} rows={10} placeholder={t('common:core.chat.Feedback Modal Tip')} />
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={2} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button isLoading={isLoading} onClick={mutate}>
|
||||
{t('core.chat.Feedback Submit')}
|
||||
{t('common:core.chat.Feedback Submit')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ const QuoteModal = ({
|
|||
<>{t('core.chat.Quote Amount', { amount: rawSearch.length })}</>
|
||||
)}
|
||||
<Box fontSize={'xs'} color={'myGray.500'} fontWeight={'normal'}>
|
||||
{t('core.chat.quote.Quote Tip')}
|
||||
{t('common:core.chat.quote.Quote Tip')}
|
||||
</Box>
|
||||
</Box>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ const ReadFeedbackModal = ({
|
|||
isOpen={true}
|
||||
onClose={onClose}
|
||||
iconSrc="/imgs/modal/readFeedback.svg"
|
||||
title={t('core.chat.Feedback Modal')}
|
||||
title={t('common:core.chat.Feedback Modal')}
|
||||
>
|
||||
<ModalBody>{content}</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button mr={2} onClick={onCloseFeedback}>
|
||||
{t('core.chat.feedback.Feedback Close')}
|
||||
{t('common:core.chat.feedback.Feedback Close')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -102,10 +102,10 @@ const ResponseTags = ({
|
|||
<>
|
||||
{sourceList.length > 0 && (
|
||||
<>
|
||||
<ChatBoxDivider icon="core/chat/quoteFill" text={t('core.chat.Quote')} />
|
||||
<ChatBoxDivider icon="core/chat/quoteFill" text={t('common:core.chat.Quote')} />
|
||||
<Flex alignItems={'center'} flexWrap={'wrap'} gap={2}>
|
||||
{sourceList.map((item) => (
|
||||
<MyTooltip key={item.collectionId} label={t('core.chat.quote.Read Quote')}>
|
||||
<MyTooltip key={item.collectionId} label={t('common:core.chat.quote.Read Quote')}>
|
||||
<Flex
|
||||
alignItems={'center'}
|
||||
fontSize={'xs'}
|
||||
|
|
@ -186,14 +186,14 @@ const ResponseTags = ({
|
|||
</MyTag>
|
||||
</MyTooltip>
|
||||
)}
|
||||
<MyTooltip label={t('core.chat.response.Read complete response tips')}>
|
||||
<MyTooltip label={t('common:core.chat.response.Read complete response tips')}>
|
||||
<MyTag
|
||||
colorSchema="gray"
|
||||
type="borderSolid"
|
||||
cursor={'pointer'}
|
||||
onClick={onOpenWholeModal}
|
||||
>
|
||||
{t('core.chat.response.Read complete response')}
|
||||
{t('common:core.chat.response.Read complete response')}
|
||||
</MyTag>
|
||||
</MyTooltip>
|
||||
</Flex>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ const SelectMarkCollection = ({
|
|||
onClose={onClose}
|
||||
setParentId={setParentId}
|
||||
isLoading={isFetching}
|
||||
tips={t('core.chat.Select dataset Desc')}
|
||||
tips={t('common:core.chat.Select dataset Desc')}
|
||||
>
|
||||
<ModalBody flex={'1 0 0'} overflowY={'auto'}>
|
||||
<Grid
|
||||
|
|
@ -100,7 +100,7 @@ const SelectMarkCollection = ({
|
|||
<SelectCollections
|
||||
datasetId={adminMarkData.datasetId}
|
||||
type={'collection'}
|
||||
title={t('dataset.collections.Select One Collection To Store')}
|
||||
title={t('common:dataset.collections.Select One Collection To Store')}
|
||||
onClose={onClose}
|
||||
onChange={({ collectionIds }) => {
|
||||
setAdminMarkData({
|
||||
|
|
@ -120,7 +120,7 @@ const SelectMarkCollection = ({
|
|||
});
|
||||
}}
|
||||
>
|
||||
{t('common.Last Step')}
|
||||
{t('common:common.Last Step')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ const VariableInput = ({
|
|||
chatForm.setValue('chatStarted', true);
|
||||
})}
|
||||
>
|
||||
{t('core.chat.Start Chat')}
|
||||
{t('common:core.chat.Start Chat')}
|
||||
</Button>
|
||||
)}
|
||||
</Card>
|
||||
|
|
|
|||
|
|
@ -814,7 +814,7 @@ const ChatBox = (
|
|||
|
||||
return {
|
||||
status: chatContent.status || 'loading',
|
||||
name: t(chatContent.moduleName || '') || t('common.Loading')
|
||||
name: t(chatContent.moduleName || '') || t('common:common.Loading')
|
||||
};
|
||||
}, [chatHistories, isChatting, t]);
|
||||
|
||||
|
|
@ -935,11 +935,13 @@ const ChatBox = (
|
|||
<Box>
|
||||
<ChatBoxDivider
|
||||
icon={'core/app/customFeedback'}
|
||||
text={t('core.app.feedback.Custom feedback')}
|
||||
text={t('common:core.app.feedback.Custom feedback')}
|
||||
/>
|
||||
{item.customFeedbacks.map((text, i) => (
|
||||
<Box key={`${text}${i}`}>
|
||||
<MyTooltip label={t('core.app.feedback.close custom feedback')}>
|
||||
<MyTooltip
|
||||
label={t('common:core.app.feedback.close custom feedback')}
|
||||
>
|
||||
<Checkbox onChange={onCloseCustomFeedback(item, i)}>
|
||||
{text}
|
||||
</Checkbox>
|
||||
|
|
@ -953,7 +955,7 @@ const ChatBox = (
|
|||
<Box fontSize={'sm'}>
|
||||
<ChatBoxDivider
|
||||
icon="core/app/markLight"
|
||||
text={t('core.chat.Admin Mark Content')}
|
||||
text={t('common:core.chat.Admin Mark Content')}
|
||||
/>
|
||||
<Box whiteSpace={'pre-wrap'}>
|
||||
<Box color={'black'}>{item.adminFeedback.q}</Box>
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ const RenderInput = () => {
|
|||
handleSubmit(onSubmit)();
|
||||
}}
|
||||
>
|
||||
{histories.length > 0 ? t('common.Restart') : t('common.Run')}
|
||||
{histories.length > 0 ? t('common:common.Restart') : t('common:common.Run')}
|
||||
</Button>
|
||||
</Flex>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ const WholeResponseModal = ({
|
|||
iconSrc="/imgs/modal/wholeRecord.svg"
|
||||
title={
|
||||
<Flex alignItems={'center'}>
|
||||
{t('core.chat.response.Complete Response')}
|
||||
{t('common:core.chat.response.Complete Response')}
|
||||
<QuestionTip ml={2} label={'从左往右,为各个模块的响应顺序'}></QuestionTip>
|
||||
</Flex>
|
||||
}
|
||||
|
|
@ -175,27 +175,33 @@ export const ResponseBox = React.memo(function ResponseBox({
|
|||
})}
|
||||
>
|
||||
<>
|
||||
<Row label={t('core.chat.response.module name')} value={t(activeModule.moduleName)} />
|
||||
<Row
|
||||
label={t('common:core.chat.response.module name')}
|
||||
value={t(activeModule.moduleName)}
|
||||
/>
|
||||
{activeModule?.totalPoints !== undefined && (
|
||||
<Row
|
||||
label={t('support.wallet.usage.Total points')}
|
||||
label={t('common:support.wallet.usage.Total points')}
|
||||
value={formatNumber(activeModule.totalPoints)}
|
||||
/>
|
||||
)}
|
||||
<Row
|
||||
label={t('core.chat.response.module time')}
|
||||
label={t('common:core.chat.response.module time')}
|
||||
value={`${activeModule?.runningTime || 0}s`}
|
||||
/>
|
||||
<Row label={t('core.chat.response.module model')} value={activeModule?.model} />
|
||||
<Row label={t('core.chat.response.module tokens')} value={`${activeModule?.tokens}`} />
|
||||
<Row label={t('common:core.chat.response.module model')} value={activeModule?.model} />
|
||||
<Row
|
||||
label={t('core.chat.response.Tool call tokens')}
|
||||
label={t('common:core.chat.response.module tokens')}
|
||||
value={`${activeModule?.tokens}`}
|
||||
/>
|
||||
<Row
|
||||
label={t('common:core.chat.response.Tool call tokens')}
|
||||
value={`${activeModule?.toolCallTokens}`}
|
||||
/>
|
||||
|
||||
<Row label={t('core.chat.response.module query')} value={activeModule?.query} />
|
||||
<Row label={t('common:core.chat.response.module query')} value={activeModule?.query} />
|
||||
<Row
|
||||
label={t('core.chat.response.context total length')}
|
||||
label={t('common:core.chat.response.context total length')}
|
||||
value={activeModule?.contextTotalLen}
|
||||
/>
|
||||
<Row label={workflowT('response.Error')} value={activeModule?.error} />
|
||||
|
|
@ -204,12 +210,15 @@ export const ResponseBox = React.memo(function ResponseBox({
|
|||
{/* ai chat */}
|
||||
<>
|
||||
<Row
|
||||
label={t('core.chat.response.module temperature')}
|
||||
label={t('common:core.chat.response.module temperature')}
|
||||
value={activeModule?.temperature}
|
||||
/>
|
||||
<Row label={t('core.chat.response.module maxToken')} value={activeModule?.maxToken} />
|
||||
<Row
|
||||
label={t('core.chat.response.module historyPreview')}
|
||||
label={t('common:core.chat.response.module maxToken')}
|
||||
value={activeModule?.maxToken}
|
||||
/>
|
||||
<Row
|
||||
label={t('common:core.chat.response.module historyPreview')}
|
||||
rawDom={
|
||||
activeModule.historyPreview ? (
|
||||
<Box px={3} py={2} border={theme.borders.base} borderRadius={'md'}>
|
||||
|
|
@ -239,31 +248,31 @@ export const ResponseBox = React.memo(function ResponseBox({
|
|||
<>
|
||||
{activeModule?.searchMode && (
|
||||
<Row
|
||||
label={t('core.dataset.search.search mode')}
|
||||
label={t('common:core.dataset.search.search mode')}
|
||||
// @ts-ignore
|
||||
value={t(DatasetSearchModeMap[activeModule.searchMode]?.title)}
|
||||
/>
|
||||
)}
|
||||
<Row
|
||||
label={t('core.chat.response.module similarity')}
|
||||
label={t('common:core.chat.response.module similarity')}
|
||||
value={activeModule?.similarity}
|
||||
/>
|
||||
<Row label={t('core.chat.response.module limit')} value={activeModule?.limit} />
|
||||
<Row label={t('common:core.chat.response.module limit')} value={activeModule?.limit} />
|
||||
<Row
|
||||
label={t('core.chat.response.search using reRank')}
|
||||
label={t('common:core.chat.response.search using reRank')}
|
||||
value={`${activeModule?.searchUsingReRank}`}
|
||||
/>
|
||||
<Row
|
||||
label={t('core.chat.response.Extension model')}
|
||||
label={t('common:core.chat.response.Extension model')}
|
||||
value={activeModule?.extensionModel}
|
||||
/>
|
||||
<Row
|
||||
label={t('support.wallet.usage.Extension result')}
|
||||
label={t('common:support.wallet.usage.Extension result')}
|
||||
value={`${activeModule?.extensionResult}`}
|
||||
/>
|
||||
{activeModule.quoteList && activeModule.quoteList.length > 0 && (
|
||||
<Row
|
||||
label={t('core.chat.response.module quoteList')}
|
||||
label={t('common:core.chat.response.module quoteList')}
|
||||
rawDom={<QuoteList showDetail={showDetail} rawSearch={activeModule.quoteList} />}
|
||||
/>
|
||||
)}
|
||||
|
|
@ -271,9 +280,12 @@ export const ResponseBox = React.memo(function ResponseBox({
|
|||
|
||||
{/* classify question */}
|
||||
<>
|
||||
<Row label={t('core.chat.response.module cq result')} value={activeModule?.cqResult} />
|
||||
<Row
|
||||
label={t('core.chat.response.module cq')}
|
||||
label={t('common:core.chat.response.module cq result')}
|
||||
value={activeModule?.cqResult}
|
||||
/>
|
||||
<Row
|
||||
label={t('common:core.chat.response.module cq')}
|
||||
value={(() => {
|
||||
if (!activeModule?.cqList) return '';
|
||||
return activeModule.cqList.map((item) => `* ${item.value}`).join('\n');
|
||||
|
|
@ -284,7 +296,7 @@ export const ResponseBox = React.memo(function ResponseBox({
|
|||
{/* if-else */}
|
||||
<>
|
||||
<Row
|
||||
label={t('core.chat.response.module if else Result')}
|
||||
label={t('common:core.chat.response.module if else Result')}
|
||||
value={activeModule?.ifElseResult}
|
||||
/>
|
||||
</>
|
||||
|
|
@ -292,11 +304,11 @@ export const ResponseBox = React.memo(function ResponseBox({
|
|||
{/* extract */}
|
||||
<>
|
||||
<Row
|
||||
label={t('core.chat.response.module extract description')}
|
||||
label={t('common:core.chat.response.module extract description')}
|
||||
value={activeModule?.extractDescription}
|
||||
/>
|
||||
<Row
|
||||
label={t('core.chat.response.module extract result')}
|
||||
label={t('common:core.chat.response.module extract result')}
|
||||
value={activeModule?.extractResult}
|
||||
/>
|
||||
</>
|
||||
|
|
@ -307,17 +319,20 @@ export const ResponseBox = React.memo(function ResponseBox({
|
|||
<Row label={'Params'} value={activeModule?.params} />
|
||||
<Row label={'Body'} value={activeModule?.body} />
|
||||
<Row
|
||||
label={t('core.chat.response.module http result')}
|
||||
label={t('common:core.chat.response.module http result')}
|
||||
value={activeModule?.httpResult}
|
||||
/>
|
||||
</>
|
||||
|
||||
{/* plugin */}
|
||||
<>
|
||||
<Row label={t('core.chat.response.plugin output')} value={activeModule?.pluginOutput} />
|
||||
<Row
|
||||
label={t('common:core.chat.response.plugin output')}
|
||||
value={activeModule?.pluginOutput}
|
||||
/>
|
||||
{activeModule?.pluginDetail && activeModule?.pluginDetail.length > 0 && (
|
||||
<Row
|
||||
label={t('core.chat.response.Plugin response detail')}
|
||||
label={t('common:core.chat.response.Plugin response detail')}
|
||||
rawDom={
|
||||
<ResponseBox response={activeModule.pluginDetail} showDetail={showDetail} />
|
||||
}
|
||||
|
|
@ -326,12 +341,15 @@ export const ResponseBox = React.memo(function ResponseBox({
|
|||
</>
|
||||
|
||||
{/* text output */}
|
||||
<Row label={t('core.chat.response.text output')} value={activeModule?.textOutput} />
|
||||
<Row
|
||||
label={t('common:core.chat.response.text output')}
|
||||
value={activeModule?.textOutput}
|
||||
/>
|
||||
|
||||
{/* tool call */}
|
||||
{activeModule?.toolDetail && activeModule?.toolDetail.length > 0 && (
|
||||
<Row
|
||||
label={t('core.chat.response.Tool call response detail')}
|
||||
label={t('common:core.chat.response.Tool call response detail')}
|
||||
rawDom={<ResponseBox response={activeModule.toolDetail} showDetail={showDetail} />}
|
||||
/>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ const QuoteItem = ({
|
|||
color={'myGray.500'}
|
||||
fontSize={'xs'}
|
||||
>
|
||||
<MyTooltip label={t('core.dataset.Quote Length')}>
|
||||
<MyTooltip label={t('common:core.dataset.Quote Length')}>
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon name="common/text/t" w={'14px'} mr={1} color={'myGray.500'} />
|
||||
{quoteItem.q.length + (quoteItem.a?.length || 0)}
|
||||
|
|
@ -225,7 +225,7 @@ const QuoteItem = ({
|
|||
/>
|
||||
<Box flex={1} />
|
||||
{quoteItem.id && (
|
||||
<MyTooltip label={t('core.dataset.data.Edit')}>
|
||||
<MyTooltip label={t('common:core.dataset.data.Edit')}>
|
||||
<Box
|
||||
className="hover-data"
|
||||
visibility={'hidden'}
|
||||
|
|
@ -261,7 +261,7 @@ const QuoteItem = ({
|
|||
color={'primary.500'}
|
||||
href={`/dataset/detail?datasetId=${quoteItem.datasetId}¤tTab=dataCard&collectionId=${quoteItem.collectionId}`}
|
||||
>
|
||||
{t('core.dataset.Go Dataset')}
|
||||
{t('common:core.dataset.Go Dataset')}
|
||||
<MyIcon name={'common/rightArrowLight'} w={'10px'} />
|
||||
</Link>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ const RawSourceBox = ({
|
|||
className={props.className ?? 'textEllipsis'}
|
||||
wordBreak={'break-all'}
|
||||
>
|
||||
{sourceName || t('common.UnKnow Source')}
|
||||
{sourceName || t('common:common.UnKnow Source')}
|
||||
</Box>
|
||||
</Box>
|
||||
</MyTooltip>
|
||||
|
|
|
|||
|
|
@ -49,13 +49,13 @@ const SearchParamsTip = ({
|
|||
<Table fontSize={'xs'} overflow={'overlay'}>
|
||||
<Thead>
|
||||
<Tr bg={'transparent !important'}>
|
||||
<Th fontSize={'mini'}>{t('core.dataset.search.search mode')}</Th>
|
||||
<Th fontSize={'mini'}>{t('core.dataset.search.Max Tokens')}</Th>
|
||||
<Th fontSize={'mini'}>{t('core.dataset.search.Min Similarity')}</Th>
|
||||
{hasReRankModel && <Th fontSize={'mini'}>{t('core.dataset.search.ReRank')}</Th>}
|
||||
<Th fontSize={'mini'}>{t('core.module.template.Query extension')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:core.dataset.search.search mode')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:core.dataset.search.Max Tokens')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:core.dataset.search.Min Similarity')}</Th>
|
||||
{hasReRankModel && <Th fontSize={'mini'}>{t('common:core.dataset.search.ReRank')}</Th>}
|
||||
<Th fontSize={'mini'}>{t('common:core.module.template.Query extension')}</Th>
|
||||
{hasEmptyResponseMode && (
|
||||
<Th fontSize={'mini'}>{t('core.dataset.search.Empty result response')}</Th>
|
||||
<Th fontSize={'mini'}>{t('common:core.dataset.search.Empty result response')}</Th>
|
||||
)}
|
||||
</Tr>
|
||||
</Thead>
|
||||
|
|
@ -75,7 +75,7 @@ const SearchParamsTip = ({
|
|||
{limit}
|
||||
</Td>
|
||||
<Td pt={0} pb={2}>
|
||||
{hasSimilarityMode ? similarity : t('core.dataset.search.Nonsupport')}
|
||||
{hasSimilarityMode ? similarity : t('common:core.dataset.search.Nonsupport')}
|
||||
</Td>
|
||||
{hasReRankModel && (
|
||||
<Td pt={0} pb={2}>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ const DatasetSelectContainer = ({
|
|||
parentId: path.parentId,
|
||||
parentName: path.parentName
|
||||
}))}
|
||||
FirstPathDom={t('core.chat.Select dataset')}
|
||||
FirstPathDom={t('common:core.chat.Select dataset')}
|
||||
onClick={(e) => {
|
||||
setParentId(e);
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
|||
<Box flex={1}>
|
||||
<Flex alignItems={'flex-end'}>
|
||||
<Box color={'myGray.900'} fontSize={'lg'}>
|
||||
{t('support.openapi.Api manager')}
|
||||
{t('common:support.openapi.Api manager')}
|
||||
</Box>
|
||||
{feConfigs?.docUrl && (
|
||||
<Link
|
||||
|
|
@ -106,7 +106,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
|||
color={'primary.500'}
|
||||
fontSize={'sm'}
|
||||
>
|
||||
{t('common.Read document')}
|
||||
{t('common:common.Read document')}
|
||||
</Link>
|
||||
)}
|
||||
</Flex>
|
||||
|
|
@ -122,10 +122,10 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
|||
borderRadius={'md'}
|
||||
cursor={'pointer'}
|
||||
userSelect={'none'}
|
||||
onClick={() => copyData(baseUrl, t('support.openapi.Copy success'))}
|
||||
onClick={() => copyData(baseUrl, t('common:support.openapi.Copy success'))}
|
||||
>
|
||||
<Box border={theme.borders.md} px={2} borderRadius={'md'} fontSize={'xs'}>
|
||||
{t('support.openapi.Api baseurl')}
|
||||
{t('common:support.openapi.Api baseurl')}
|
||||
</Box>
|
||||
<Box ml={2} fontSize={'sm'}>
|
||||
{baseUrl}
|
||||
|
|
@ -143,7 +143,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
|||
})
|
||||
}
|
||||
>
|
||||
{t('New Create')}
|
||||
{t('common:New Create')}
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
|
|
@ -151,17 +151,17 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
|||
<Table>
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th>{t('Name')}</Th>
|
||||
<Th>{t('common:Name')}</Th>
|
||||
<Th>Api Key</Th>
|
||||
<Th>{t('support.outlink.Usage points')}</Th>
|
||||
<Th>{t('common:support.outlink.Usage points')}</Th>
|
||||
{feConfigs?.isPlus && (
|
||||
<>
|
||||
<Th>{t('common.Expired Time')}</Th>
|
||||
<Th>{t('common:common.Expired Time')}</Th>
|
||||
</>
|
||||
)}
|
||||
|
||||
<Th>{t('common.Create Time')}</Th>
|
||||
<Th>{t('common.Last use time')}</Th>
|
||||
<Th>{t('common:common.Create Time')}</Th>
|
||||
<Th>{t('common:common.Last use time')}</Th>
|
||||
<Th />
|
||||
</Tr>
|
||||
</Thead>
|
||||
|
|
@ -174,7 +174,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
|||
{Math.round(usagePoints)}/
|
||||
{feConfigs?.isPlus && limit?.maxUsagePoints && limit?.maxUsagePoints > -1
|
||||
? `${limit?.maxUsagePoints}`
|
||||
: t('common.Unlimited')}
|
||||
: t('common:common.Unlimited')}
|
||||
</Td>
|
||||
{feConfigs?.isPlus && (
|
||||
<>
|
||||
|
|
@ -189,7 +189,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
|||
<Td whiteSpace={'pre-wrap'}>
|
||||
{lastUsedTime
|
||||
? dayjs(lastUsedTime).format('YYYY/MM/DD\nHH:mm:ss')
|
||||
: t('common.Un used')}
|
||||
: t('common:common.Un used')}
|
||||
</Td>
|
||||
<Td>
|
||||
<MyMenu
|
||||
|
|
@ -207,7 +207,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
|||
{
|
||||
children: [
|
||||
{
|
||||
label: t('common.Edit'),
|
||||
label: t('common:common.Edit'),
|
||||
icon: 'edit',
|
||||
onClick: () =>
|
||||
setEditData({
|
||||
|
|
@ -218,7 +218,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
|||
})
|
||||
},
|
||||
{
|
||||
label: t('common.Delete'),
|
||||
label: t('common:common.Delete'),
|
||||
icon: 'delete',
|
||||
type: 'danger',
|
||||
onClick: () => openConfirm(() => onclickRemove(_id))()
|
||||
|
|
@ -256,9 +256,9 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
|||
iconSrc="/imgs/modal/key.svg"
|
||||
title={
|
||||
<Box>
|
||||
<Box fontWeight={'bold'}>{t('support.openapi.New api key')}</Box>
|
||||
<Box fontWeight={'bold'}>{t('common:support.openapi.New api key')}</Box>
|
||||
<Box fontSize={'xs'} color={'myGray.600'}>
|
||||
{t('support.openapi.New api key tip')}
|
||||
{t('common:support.openapi.New api key tip')}
|
||||
</Box>
|
||||
</Box>
|
||||
}
|
||||
|
|
@ -281,7 +281,7 @@ const ApiKeyTable = ({ tips, appId }: { tips: string; appId?: string }) => {
|
|||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button variant="whiteBase" onClick={() => setApiKey('')}>
|
||||
{t('common.OK')}
|
||||
{t('common:common.OK')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
@ -338,12 +338,12 @@ function EditKeyModal({
|
|||
>
|
||||
<ModalBody>
|
||||
<Flex alignItems={'center'}>
|
||||
<FormLabel flex={'0 0 90px'}>{t('Name')}</FormLabel>
|
||||
<FormLabel flex={'0 0 90px'}>{t('common:Name')}</FormLabel>
|
||||
<Input
|
||||
placeholder={publishT('key alias') || 'key alias'}
|
||||
maxLength={20}
|
||||
{...register('name', {
|
||||
required: t('common.Name is empty') || 'Name is empty'
|
||||
required: t('common:common.Name is empty') || 'Name is empty'
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
|
|
@ -351,8 +351,11 @@ function EditKeyModal({
|
|||
<>
|
||||
<Flex alignItems={'center'} mt={4}>
|
||||
<FormLabel display={'flex'} flex={'0 0 90px'} alignItems={'center'}>
|
||||
{t('support.outlink.Max usage points')}
|
||||
<QuestionTip ml={1} label={t('support.outlink.Max usage points tip')}></QuestionTip>
|
||||
{t('common:support.outlink.Max usage points')}
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('common:support.outlink.Max usage points tip')}
|
||||
></QuestionTip>
|
||||
</FormLabel>
|
||||
<Input
|
||||
{...register('limit.maxUsagePoints', {
|
||||
|
|
@ -364,7 +367,7 @@ function EditKeyModal({
|
|||
/>
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} mt={4}>
|
||||
<FormLabel flex={'0 0 90px'}>{t('common.Expired Time')}</FormLabel>
|
||||
<FormLabel flex={'0 0 90px'}>{t('common:common.Expired Time')}</FormLabel>
|
||||
<Input
|
||||
type="datetime-local"
|
||||
defaultValue={
|
||||
|
|
@ -383,14 +386,14 @@ function EditKeyModal({
|
|||
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
isLoading={creating || updating}
|
||||
onClick={submitShareChat((data) => (isEdit ? onclickUpdate(data) : onclickCreate(data)))}
|
||||
>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ const LafAccountModal = ({
|
|||
const token = await postLafPat2Token(pat);
|
||||
setValue('token', token);
|
||||
},
|
||||
errorToast: t('plugin.Invalid Env')
|
||||
errorToast: t('common:plugin.Invalid Env')
|
||||
});
|
||||
|
||||
const { data: appListData = [] } = useQuery(
|
||||
|
|
@ -91,18 +91,18 @@ const LafAccountModal = ({
|
|||
initUserInfo();
|
||||
onClose();
|
||||
},
|
||||
successToast: t('common.Update Success'),
|
||||
errorToast: t('common.Update Failed')
|
||||
successToast: t('common:common.Update Success'),
|
||||
errorToast: t('common:common.Update Failed')
|
||||
});
|
||||
|
||||
return (
|
||||
<MyModal isOpen iconSrc="/imgs/workflow/laf.png" title={t('user.Laf Account Setting')}>
|
||||
<MyModal isOpen iconSrc="/imgs/workflow/laf.png" title={t('common:user.Laf Account Setting')}>
|
||||
<ModalBody>
|
||||
<Box fontSize={'sm'} color={'myGray.500'}>
|
||||
<Box>{t('support.user.Laf account intro')}</Box>
|
||||
<Box>{t('common:support.user.Laf account intro')}</Box>
|
||||
<Box textDecoration={'underline'}>
|
||||
<Link href={getDocPath('/docs/workflow/modules/laf/')} isExternal>
|
||||
{t('support.user.Laf account course')}
|
||||
{t('common:support.user.Laf account course')}
|
||||
</Link>
|
||||
</Box>
|
||||
<Box>
|
||||
|
|
@ -121,7 +121,7 @@ const LafAccountModal = ({
|
|||
flex={'1 0 0'}
|
||||
size={'sm'}
|
||||
{...register('pat')}
|
||||
placeholder={t('plugin.Enter PAT')}
|
||||
placeholder={t('common:plugin.Enter PAT')}
|
||||
/>
|
||||
<Button
|
||||
ml={2}
|
||||
|
|
@ -151,7 +151,7 @@ const LafAccountModal = ({
|
|||
</Flex>
|
||||
{!!lafToken && (
|
||||
<Flex alignItems={'center'} mt={5}>
|
||||
<Box flex={'0 0 70px'}>{t('plugin.Currentapp')}</Box>
|
||||
<Box flex={'0 0 70px'}>{t('common:plugin.Currentapp')}</Box>
|
||||
<MySelect
|
||||
minW={'200px'}
|
||||
list={
|
||||
|
|
@ -162,7 +162,7 @@ const LafAccountModal = ({
|
|||
value: app.appid
|
||||
})) || []
|
||||
}
|
||||
placeholder={t('plugin.App')}
|
||||
placeholder={t('common:plugin.App')}
|
||||
value={watch('appid')}
|
||||
onchange={(e) => {
|
||||
setValue('appid', e);
|
||||
|
|
@ -180,11 +180,11 @@ const LafAccountModal = ({
|
|||
onClose();
|
||||
}}
|
||||
>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
{appid && (
|
||||
<Button ml={3} isLoading={isUpdating} onClick={handleSubmit((data) => onSubmit(data))}>
|
||||
{t('common.Update')}
|
||||
{t('common:common.Update')}
|
||||
</Button>
|
||||
)}
|
||||
</ModalFooter>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ const ConfigPerModal = ({
|
|||
isOpen
|
||||
iconSrc="/imgs/modal/key.svg"
|
||||
onClose={onClose}
|
||||
title={t('permission.Permission config')}
|
||||
title={t('common:permission.Permission config')}
|
||||
>
|
||||
<ModalBody>
|
||||
<HStack>
|
||||
|
|
@ -61,7 +61,7 @@ const ConfigPerModal = ({
|
|||
</Box>
|
||||
)}
|
||||
<Box mt={5}>
|
||||
<Box fontSize={'sm'}>{t('permission.Default permission')}</Box>
|
||||
<Box fontSize={'sm'}>{t('common:permission.Default permission')}</Box>
|
||||
<DefaultPermissionList
|
||||
mt="1"
|
||||
per={defaultPer.value}
|
||||
|
|
@ -87,7 +87,7 @@ const ConfigPerModal = ({
|
|||
justifyContent="space-between"
|
||||
w="full"
|
||||
>
|
||||
<Box fontSize={'sm'}>{t('permission.Collaborator')}</Box>
|
||||
<Box fontSize={'sm'}>{t('common:permission.Collaborator')}</Box>
|
||||
<Flex flexDirection="row" gap="2">
|
||||
<Button
|
||||
size="sm"
|
||||
|
|
@ -95,7 +95,7 @@ const ConfigPerModal = ({
|
|||
leftIcon={<MyIcon w="4" name="common/settingLight" />}
|
||||
onClick={onOpenManageModal}
|
||||
>
|
||||
{t('permission.Manage')}
|
||||
{t('common:permission.Manage')}
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
|
|
@ -103,7 +103,7 @@ const ConfigPerModal = ({
|
|||
leftIcon={<MyIcon w="4" name="support/permission/collaborator" />}
|
||||
onClick={onOpenAddMember}
|
||||
>
|
||||
{t('common.Add')}
|
||||
{t('common:common.Add')}
|
||||
</Button>
|
||||
</Flex>
|
||||
</Flex>
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ function AddMemberModal({ onClose }: AddModalPropsType) {
|
|||
permission: selectedPermission
|
||||
});
|
||||
},
|
||||
successToast: t('common.Add Success'),
|
||||
successToast: t('common:common.Add Success'),
|
||||
errorToast: 'Error',
|
||||
onSuccess() {
|
||||
onClose();
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ const MemberListCard = ({ tagStyle, ...props }: MemberListCardProps) => {
|
|||
<MyBox isLoading={isFetchingCollaborator} userSelect={'none'} {...props}>
|
||||
{collaboratorList?.length === 0 ? (
|
||||
<Box p={3} color="myGray.600" fontSize={'xs'} textAlign={'center'}>
|
||||
{t('permission.Not collaborator')}
|
||||
{t('common:permission.Not collaborator')}
|
||||
</Box>
|
||||
) : (
|
||||
<Flex gap="2" flexWrap={'wrap'}>
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ function PermissionSelect({
|
|||
}}
|
||||
>
|
||||
<MyIcon name="delete" w="20px" color="red.600" />
|
||||
<Box color="red.600">{t('common.Remove')}</Box>
|
||||
<Box color="red.600">{t('common:common.Remove')}</Box>
|
||||
</HStack>
|
||||
</>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ const PermissionTag = ({
|
|||
const Per = new Permission({ per: permission.value });
|
||||
|
||||
const commonLabel = (() => {
|
||||
if (permission.isOwner) return t('permission.Owner');
|
||||
if (permission.isOwner) return t('common:permission.Owner');
|
||||
if (permission.hasManagePer) return PermissionList['manage'].name;
|
||||
if (permission.hasWritePer) return PermissionList['write'].name;
|
||||
if (permission.hasReadPer) return PermissionList['read'].name;
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@ const PermissionRadio = ({
|
|||
list={[
|
||||
{
|
||||
icon: 'support/permission/privateLight',
|
||||
title: t('permission.Private'),
|
||||
desc: t('permission.Private Tip'),
|
||||
title: t('common:permission.Private'),
|
||||
desc: t('common:permission.Private Tip'),
|
||||
value: PermissionTypeEnum.private
|
||||
},
|
||||
{
|
||||
icon: 'support/permission/publicLight',
|
||||
title: t('permission.Public'),
|
||||
desc: t('permission.Public Tip'),
|
||||
title: t('common:permission.Public'),
|
||||
desc: t('common:permission.Public Tip'),
|
||||
value: PermissionTypeEnum.public
|
||||
}
|
||||
]}
|
||||
|
|
|
|||
|
|
@ -30,12 +30,16 @@ const SystemMsgModal = ({}: {}) => {
|
|||
}, [data, onClose, setSysMsgReadId]);
|
||||
|
||||
return (
|
||||
<MyModal isOpen={isOpen} iconSrc={LOGO_ICON} title={t('support.user.inform.System message')}>
|
||||
<MyModal
|
||||
isOpen={isOpen}
|
||||
iconSrc={LOGO_ICON}
|
||||
title={t('common:support.user.inform.System message')}
|
||||
>
|
||||
<ModalBody overflow={'auto'}>
|
||||
<Markdown source={data?.content} />
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button onClick={onclickRead}>{t('support.inform.Read')}</Button>
|
||||
<Button onClick={onclickRead}>{t('common:support.inform.Read')}</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ function TeamCard() {
|
|||
const { feConfigs } = useSystemStore();
|
||||
|
||||
const { ConfirmModal: ConfirmLeaveTeamModal, openConfirm: openLeaveConfirm } = useConfirm({
|
||||
content: t('user.team.member.Confirm Leave')
|
||||
content: t('common:user.team.member.Confirm Leave')
|
||||
});
|
||||
const { mutate: onLeaveTeam, isLoading: isLoadingLeaveTeam } = useRequest({
|
||||
mutationFn: async (teamId?: string) => {
|
||||
|
|
@ -49,7 +49,7 @@ function TeamCard() {
|
|||
onSuccess() {
|
||||
refetchTeams();
|
||||
},
|
||||
errorToast: t('user.team.Leave Team Failed')
|
||||
errorToast: t('common:user.team.Leave Team Failed')
|
||||
});
|
||||
|
||||
const {
|
||||
|
|
@ -65,7 +65,7 @@ function TeamCard() {
|
|||
icon: 'support/team/memberLight',
|
||||
label: (
|
||||
<Flex alignItems={'center'}>
|
||||
<Box ml={1}>{t('user.team.Member')}</Box>
|
||||
<Box ml={1}>{t('common:user.team.Member')}</Box>
|
||||
<Box ml={2} bg={'myGray.100'} borderRadius={'20px'} px={3} fontSize={'xs'}>
|
||||
{members.length}
|
||||
</Box>
|
||||
|
|
@ -75,7 +75,7 @@ function TeamCard() {
|
|||
},
|
||||
{
|
||||
icon: 'support/team/key',
|
||||
label: t('common.Role'),
|
||||
label: t('common:common.Role'),
|
||||
value: TabListEnum.permission
|
||||
}
|
||||
],
|
||||
|
|
@ -155,7 +155,7 @@ function TeamCard() {
|
|||
}
|
||||
}}
|
||||
>
|
||||
{t('user.team.Invite Member')}
|
||||
{t('common:user.team.Invite Member')}
|
||||
</Button>
|
||||
)}
|
||||
{userInfo?.team.permission.hasManagePer && feConfigs?.show_team_chat && (
|
||||
|
|
@ -169,7 +169,7 @@ function TeamCard() {
|
|||
onOpenTeamTagsAsync();
|
||||
}}
|
||||
>
|
||||
{t('user.team.Team Tags Async')}
|
||||
{t('common:user.team.Team Tags Async')}
|
||||
</Button>
|
||||
)}
|
||||
{!userInfo?.team.permission.isOwner && (
|
||||
|
|
@ -184,7 +184,7 @@ function TeamCard() {
|
|||
openLeaveConfirm(() => onLeaveTeam(userInfo?.team?.teamId))();
|
||||
}}
|
||||
>
|
||||
{t('user.team.Leave Team')}
|
||||
{t('common:user.team.Leave Team')}
|
||||
</Button>
|
||||
)}
|
||||
</Flex>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ function TeamList() {
|
|||
borderBottom={'1.5px solid rgba(0, 0, 0, 0.05)'}
|
||||
>
|
||||
<Box flex={['0 0 auto', 1]} fontSize={['sm', 'md']}>
|
||||
{t('common.Team')}
|
||||
{t('common:common.Team')}
|
||||
</Box>
|
||||
{/* if there is no team */}
|
||||
{myTeams.length < 1 && (
|
||||
|
|
@ -90,7 +90,7 @@ function TeamList() {
|
|||
variant={'whitePrimary'}
|
||||
onClick={() => onSwitchTeam(team.teamId)}
|
||||
>
|
||||
{t('user.team.Check Team')}
|
||||
{t('common:user.team.Check Team')}
|
||||
</Button>
|
||||
)}
|
||||
</Flex>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ function EditModal({
|
|||
setValue('avatar', src);
|
||||
} catch (err: any) {
|
||||
toast({
|
||||
title: getErrText(err, t('common.Select File Failed')),
|
||||
title: getErrText(err, t('common:common.Select File Failed')),
|
||||
status: 'warning'
|
||||
});
|
||||
}
|
||||
|
|
@ -75,8 +75,8 @@ function EditModal({
|
|||
onSuccess();
|
||||
onClose();
|
||||
},
|
||||
successToast: t('common.Create Success'),
|
||||
errorToast: t('common.Create Failed')
|
||||
successToast: t('common:common.Create Success'),
|
||||
errorToast: t('common:common.Create Failed')
|
||||
});
|
||||
const { mutate: onclickUpdate, isLoading: updating } = useRequest({
|
||||
mutationFn: async (data: EditTeamFormDataType) => {
|
||||
|
|
@ -90,8 +90,8 @@ function EditModal({
|
|||
onSuccess();
|
||||
onClose();
|
||||
},
|
||||
successToast: t('common.Update Success'),
|
||||
errorToast: t('common.Update Failed')
|
||||
successToast: t('common:common.Update Success'),
|
||||
errorToast: t('common:common.Update Failed')
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -99,14 +99,14 @@ function EditModal({
|
|||
isOpen
|
||||
onClose={onClose}
|
||||
iconSrc="/imgs/modal/team.svg"
|
||||
title={defaultData.id ? t('user.team.Update Team') : t('user.team.Create Team')}
|
||||
title={defaultData.id ? t('common:user.team.Update Team') : t('common:user.team.Create Team')}
|
||||
>
|
||||
<ModalBody>
|
||||
<Box color={'myGray.800'} fontWeight={'bold'}>
|
||||
{t('user.team.Set Name')}
|
||||
{t('common:user.team.Set Name')}
|
||||
</Box>
|
||||
<Flex mt={3} alignItems={'center'}>
|
||||
<MyTooltip label={t('common.Set Avatar')}>
|
||||
<MyTooltip label={t('common:common.Set Avatar')}>
|
||||
<Avatar
|
||||
flexShrink={0}
|
||||
src={avatar}
|
||||
|
|
@ -123,9 +123,9 @@ function EditModal({
|
|||
autoFocus
|
||||
bg={'myWhite.600'}
|
||||
maxLength={20}
|
||||
placeholder={t('user.team.Team Name')}
|
||||
placeholder={t('common:user.team.Team Name')}
|
||||
{...register('name', {
|
||||
required: t('common.Please Input Name')
|
||||
required: t('common:common.Please Input Name')
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
|
|
@ -136,10 +136,10 @@ function EditModal({
|
|||
<>
|
||||
<Box flex={1} />
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button isLoading={updating} onClick={handleSubmit((data) => onclickUpdate(data))}>
|
||||
{t('common.Confirm Update')}
|
||||
{t('common:common.Confirm Update')}
|
||||
</Button>
|
||||
</>
|
||||
) : (
|
||||
|
|
@ -148,7 +148,7 @@ function EditModal({
|
|||
isLoading={creating}
|
||||
onClick={handleSubmit((data) => onclickCreate(data))}
|
||||
>
|
||||
{t('common.Confirm Create')}
|
||||
{t('common:common.Confirm Create')}
|
||||
</Button>
|
||||
)}
|
||||
</ModalFooter>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ const InviteModal = ({
|
|||
const { t } = useTranslation();
|
||||
const { userT } = useI18n();
|
||||
const { ConfirmModal, openConfirm } = useConfirm({
|
||||
title: t('user.team.Invite Member Result Tip'),
|
||||
title: t('common:user.team.Invite Member Result Tip'),
|
||||
showCancel: false
|
||||
});
|
||||
const { userInfo } = useUserStore();
|
||||
|
|
@ -82,7 +82,7 @@ const InviteModal = ({
|
|||
</Box>
|
||||
)();
|
||||
},
|
||||
errorToast: t('user.team.Invite Member Failed Tip')
|
||||
errorToast: t('common:user.team.Invite Member Failed Tip')
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -91,9 +91,9 @@ const InviteModal = ({
|
|||
iconSrc="/imgs/modal/team.svg"
|
||||
title={
|
||||
<Box>
|
||||
<Box>{t('user.team.Invite Member')}</Box>
|
||||
<Box>{t('common:user.team.Invite Member')}</Box>
|
||||
<Box color={'myGray.500'} fontSize={'xs'} fontWeight={'normal'}>
|
||||
{t('user.team.Invite Member Tips')}
|
||||
{t('common:user.team.Invite Member Tips')}
|
||||
</Box>
|
||||
</Box>
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@ const InviteModal = ({
|
|||
>
|
||||
<ModalCloseButton onClick={onClose} />
|
||||
<ModalBody>
|
||||
<Box mb={2}>{t('user.Account')}</Box>
|
||||
<Box mb={2}>{t('common:user.Account')}</Box>
|
||||
<TagTextarea defaultValues={inviteUsernames} onUpdate={setInviteUsernames} />
|
||||
<Box mt={4}>
|
||||
<MySelect list={inviteTypes} value={selectedInviteType} onchange={setSelectInviteType} />
|
||||
|
|
@ -116,7 +116,7 @@ const InviteModal = ({
|
|||
isLoading={isLoading}
|
||||
onClick={onInvite}
|
||||
>
|
||||
{t('user.team.Confirm Invite')}
|
||||
{t('common:user.team.Confirm Invite')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
<ConfirmModal />
|
||||
|
|
|
|||
|
|
@ -44,10 +44,10 @@ function MemberTable() {
|
|||
<Table overflow={'unset'}>
|
||||
<Thead bg={'myWhite.400'}>
|
||||
<Tr>
|
||||
<Th borderRadius={'none !important'}>{t('common.Username')}</Th>
|
||||
<Th>{t('common.Permission')}</Th>
|
||||
<Th>{t('common.Status')}</Th>
|
||||
<Th borderRadius={'none !important'}>{t('common.Action')}</Th>
|
||||
<Th borderRadius={'none !important'}>{t('common:common.Username')}</Th>
|
||||
<Th>{t('common:common.Permission')}</Th>
|
||||
<Th>{t('common:common.Status')}</Th>
|
||||
<Th borderRadius={'none !important'}>{t('common:common.Action')}</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody>
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ function AddManagerModal({ onClose, onSuccess }: { onClose: () => void; onSucces
|
|||
</ModalBody>
|
||||
<ModalFooter alignItems="flex-end">
|
||||
<Button h={'30px'} isLoading={isLoading} onClick={submit}>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ function PermissionManage() {
|
|||
>
|
||||
<Flex>
|
||||
<Box fontSize={['sm', 'md']} fontWeight={'bold'} alignItems={'center'}>
|
||||
{t('user.team.role.Admin')}
|
||||
{t('common:user.team.role.Admin')}
|
||||
</Box>
|
||||
<Box
|
||||
fontSize={['xs']}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export const TeamModalContextProvider = ({ children }: { children: ReactNode })
|
|||
await putSwitchTeam(teamId);
|
||||
return initUserInfo();
|
||||
},
|
||||
errorToast: t('user.team.Switch Team Failed')
|
||||
errorToast: t('common:user.team.Switch Team Failed')
|
||||
});
|
||||
|
||||
const isLoading = isLoadingTeams || isSwitchingTeam || loadingMembers || isUpdatingPer;
|
||||
|
|
|
|||
|
|
@ -38,12 +38,12 @@ const TeamMenu = () => {
|
|||
} else {
|
||||
toast({
|
||||
status: 'warning',
|
||||
title: t('common.system.Commercial version function')
|
||||
title: t('common:common.system.Commercial version function')
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
<MyTooltip label={t('user.team.Select Team')}>
|
||||
<MyTooltip label={t('common:user.team.Select Team')}>
|
||||
<Flex w={'100%'} alignItems={'center'}>
|
||||
{userInfo?.team ? (
|
||||
<>
|
||||
|
|
@ -53,7 +53,7 @@ const TeamMenu = () => {
|
|||
) : (
|
||||
<>
|
||||
<Box w={'8px'} h={'8px'} mr={3} borderRadius={'50%'} bg={'#67c13b'} />
|
||||
{t('user.team.Personal Team')}
|
||||
{t('common:user.team.Personal Team')}
|
||||
</>
|
||||
)}
|
||||
</Flex>
|
||||
|
|
|
|||
|
|
@ -63,14 +63,14 @@ const TeamTagsAsync = ({ onClose }: { onClose: () => void }) => {
|
|||
initUserInfo();
|
||||
onClose();
|
||||
},
|
||||
errorToast: t('common.Create Failed')
|
||||
errorToast: t('common:common.Create Failed')
|
||||
});
|
||||
const { mutate: onclickTagAsync, isLoading: isSyncing } = useRequest({
|
||||
mutationFn: (data: FormType) => loadTeamTagsByDomain(data.teamDomain),
|
||||
onSuccess(res) {
|
||||
replaceTeamTags(res);
|
||||
},
|
||||
successToast: t('support.user.team.Team Tags Async Success')
|
||||
successToast: t('common:support.user.team.Team Tags Async Success')
|
||||
});
|
||||
|
||||
useQuery(['getTeamsTags'], getTeamsTags, {
|
||||
|
|
@ -103,7 +103,7 @@ const TeamTagsAsync = ({ onClose }: { onClose: () => void }) => {
|
|||
<ModalBody style={{ padding: '10rpx' }}>
|
||||
<Flex mt={3} alignItems={'center'}>
|
||||
<Box mb={2} fontWeight="semibold">
|
||||
{t('同步链接')}
|
||||
{t('common:同步链接')}
|
||||
</Box>
|
||||
<Input
|
||||
flex={1}
|
||||
|
|
@ -118,7 +118,7 @@ const TeamTagsAsync = ({ onClose }: { onClose: () => void }) => {
|
|||
</Flex>
|
||||
<Flex mt={3} alignItems={'center'}>
|
||||
<Box mb={2} fontWeight="semibold">
|
||||
{t('分享链接')}
|
||||
{t('common:分享链接')}
|
||||
</Box>
|
||||
{/* code */}
|
||||
<Box ml={4} borderRadius={'md'} overflow={'hidden'}>
|
||||
|
|
@ -143,7 +143,7 @@ const TeamTagsAsync = ({ onClose }: { onClose: () => void }) => {
|
|||
</Flex>
|
||||
<Flex mt={3} alignItems={'center'}>
|
||||
<Box mb={2} fontWeight="semibold">
|
||||
{t('标签列表')}
|
||||
{t('common:标签列表')}
|
||||
</Box>
|
||||
<HStack
|
||||
ml={4}
|
||||
|
|
@ -187,10 +187,10 @@ const TeamTagsAsync = ({ onClose }: { onClose: () => void }) => {
|
|||
</ModalBody>
|
||||
<ModalFooter mb={2}>
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button isLoading={isUpdating} onClick={handleSubmit((data) => onclickUpdate(data))}>
|
||||
{t('user.team.Tags Async')}
|
||||
{t('common:user.team.Tags Async')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const UpdateInviteModal = () => {
|
|||
onSuccess() {
|
||||
toast({
|
||||
status: 'success',
|
||||
title: t('user.team.invite.Accepted')
|
||||
title: t('common:user.team.invite.Accepted')
|
||||
});
|
||||
refetch();
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ const UpdateInviteModal = () => {
|
|||
onSuccess() {
|
||||
toast({
|
||||
status: 'success',
|
||||
title: t('user.team.invite.Reject')
|
||||
title: t('common:user.team.invite.Reject')
|
||||
});
|
||||
refetch();
|
||||
}
|
||||
|
|
@ -57,7 +57,7 @@ const UpdateInviteModal = () => {
|
|||
iconSrc="/imgs/modal/team.svg"
|
||||
title={
|
||||
<Box>
|
||||
<Box>{t('user.team.Processing invitations')}</Box>
|
||||
<Box>{t('common:user.team.Processing invitations')}</Box>
|
||||
<Box fontWeight={'normal'} fontSize={'sm'} color={'myGray.500'}>
|
||||
{t('user.team.Processing invitations Tips', { amount: inviteList?.length })}
|
||||
</Box>
|
||||
|
|
@ -94,11 +94,11 @@ const UpdateInviteModal = () => {
|
|||
status: TeamMemberStatusEnum.active
|
||||
}),
|
||||
undefined,
|
||||
t('user.team.invite.Accept Confirm')
|
||||
t('common:user.team.invite.Accept Confirm')
|
||||
)();
|
||||
}}
|
||||
>
|
||||
{t('user.team.invite.accept')}
|
||||
{t('common:user.team.invite.accept')}
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
|
|
@ -114,17 +114,17 @@ const UpdateInviteModal = () => {
|
|||
status: TeamMemberStatusEnum.reject
|
||||
}),
|
||||
undefined,
|
||||
t('user.team.invite.Reject Confirm')
|
||||
t('common:user.team.invite.Reject Confirm')
|
||||
)();
|
||||
}}
|
||||
>
|
||||
{t('user.team.invite.reject')}
|
||||
{t('common:user.team.invite.reject')}
|
||||
</Button>
|
||||
</Flex>
|
||||
))}
|
||||
</ModalBody>
|
||||
<ModalFooter justifyContent={'center'}>
|
||||
<Box>{t('user.team.invite.Deal Width Footer Tip')}</Box>
|
||||
<Box>{t('common:user.team.invite.Deal Width Footer Tip')}</Box>
|
||||
</ModalFooter>
|
||||
|
||||
<ConfirmModal />
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ const NotSufficientModal = () => {
|
|||
const onClose = () => setIsNotSufficientModal(false);
|
||||
|
||||
return (
|
||||
<MyModal isOpen iconSrc="common/confirm/deleteTip" title={t('common.Warning')}>
|
||||
<ModalBody>{t('support.wallet.Not sufficient')}</ModalBody>
|
||||
<MyModal isOpen iconSrc="common/confirm/deleteTip" title={t('common:common.Warning')}>
|
||||
<ModalBody>{t('common:support.wallet.Not sufficient')}</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={2} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
|
|
@ -25,7 +25,7 @@ const NotSufficientModal = () => {
|
|||
onClose();
|
||||
}}
|
||||
>
|
||||
{t('support.wallet.To read plan')}
|
||||
{t('common:support.wallet.To read plan')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ const QRCodePayModal = ({
|
|||
);
|
||||
|
||||
return (
|
||||
<MyModal isOpen title={t('user.Pay')} iconSrc="/imgs/modal/pay.svg">
|
||||
<MyModal isOpen title={t('common:user.Pay')} iconSrc="/imgs/modal/pay.svg">
|
||||
<ModalBody textAlign={'center'}>
|
||||
<Box mb={3}>请微信扫码支付: {readPrice}元,请勿关闭页面</Box>
|
||||
<Box id={'payQRCode'} display={'inline-block'} h={'128px'}></Box>
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ const StandardPlanContentList = ({
|
|||
</Box>
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('support.wallet.subscription.AI points click to read tip')}
|
||||
label={t('common:support.wallet.subscription.AI points click to read tip')}
|
||||
onClick={() => {
|
||||
router.push(AI_POINT_USAGE_CARD_ROUTE);
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const BillTable = () => {
|
|||
const billTypeList = useMemo(
|
||||
() =>
|
||||
[
|
||||
{ label: t('common.All'), value: '' },
|
||||
{ label: t('common:common.All'), value: '' },
|
||||
...Object.entries(billTypeMap).map(([key, value]) => ({
|
||||
label: t(value.label),
|
||||
value: key
|
||||
|
|
@ -120,9 +120,9 @@ const BillTable = () => {
|
|||
w={'130px'}
|
||||
></MySelect>
|
||||
</Th>
|
||||
<Th>{t('user.Time')}</Th>
|
||||
<Th>{t('support.wallet.Amount')}</Th>
|
||||
<Th>{t('support.wallet.bill.Status')}</Th>
|
||||
<Th>{t('common:user.Time')}</Th>
|
||||
<Th>{t('common:support.wallet.Amount')}</Th>
|
||||
<Th>{t('common:support.wallet.bill.Status')}</Th>
|
||||
<Th></Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
|
|
@ -139,11 +139,11 @@ const BillTable = () => {
|
|||
<Td>
|
||||
{item.status === 'NOTPAY' && (
|
||||
<Button mr={4} onClick={() => handleRefreshPayOrder(item._id)} size={'sm'}>
|
||||
{t('common.Update')}
|
||||
{t('common:common.Update')}
|
||||
</Button>
|
||||
)}
|
||||
<Button variant={'whiteBase'} size={'sm'} onClick={() => setBillDetail(item)}>
|
||||
{t('common.Detail')}
|
||||
{t('common:common.Detail')}
|
||||
</Button>
|
||||
</Td>
|
||||
</Tr>
|
||||
|
|
@ -164,7 +164,7 @@ const BillTable = () => {
|
|||
>
|
||||
<MyIcon name="empty" w={'48px'} h={'48px'} color={'transparent'} />
|
||||
<Box mt={2} color={'myGray.500'}>
|
||||
{t('support.wallet.noBill')}
|
||||
{t('common:support.wallet.noBill')}
|
||||
</Box>
|
||||
</Flex>
|
||||
)}
|
||||
|
|
@ -187,40 +187,40 @@ function BillDetailModal({ bill, onClose }: { bill: BillSchemaType; onClose: ()
|
|||
isOpen={true}
|
||||
onClose={onClose}
|
||||
iconSrc="/imgs/modal/bill.svg"
|
||||
title={t('support.wallet.usage.Usage Detail')}
|
||||
title={t('common:support.wallet.usage.Usage Detail')}
|
||||
maxW={['90vw', '700px']}
|
||||
>
|
||||
<ModalBody>
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 120px'}>{t('support.wallet.bill.Number')}:</FormLabel>
|
||||
<FormLabel flex={'0 0 120px'}>{t('common:support.wallet.bill.Number')}:</FormLabel>
|
||||
<Box>{bill.orderId}</Box>
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 120px'}>{t('support.wallet.usage.Time')}:</FormLabel>
|
||||
<FormLabel flex={'0 0 120px'}>{t('common:support.wallet.usage.Time')}:</FormLabel>
|
||||
<Box>{dayjs(bill.createTime).format('YYYY/MM/DD HH:mm:ss')}</Box>
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 120px'}>{t('support.wallet.bill.Status')}:</FormLabel>
|
||||
<FormLabel flex={'0 0 120px'}>{t('common:support.wallet.bill.Status')}:</FormLabel>
|
||||
<Box>{t(billStatusMap[bill.status]?.label)}</Box>
|
||||
</Flex>
|
||||
{!!bill.metadata?.payWay && (
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 120px'}>{t('support.wallet.bill.payWay.Way')}:</FormLabel>
|
||||
<FormLabel flex={'0 0 120px'}>{t('common:support.wallet.bill.payWay.Way')}:</FormLabel>
|
||||
<Box>{t(billPayWayMap[bill.metadata.payWay]?.label)}</Box>
|
||||
</Flex>
|
||||
)}
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 120px'}>{t('support.wallet.Amount')}:</FormLabel>
|
||||
<FormLabel flex={'0 0 120px'}>{t('common:support.wallet.Amount')}:</FormLabel>
|
||||
<Box>{formatStorePrice2Read(bill.price)}元</Box>
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 120px'}>{t('support.wallet.bill.Type')}:</FormLabel>
|
||||
<FormLabel flex={'0 0 120px'}>{t('common:support.wallet.bill.Type')}:</FormLabel>
|
||||
<Box>{t(billTypeMap[bill.type]?.label)}</Box>
|
||||
</Flex>
|
||||
{!!bill.metadata?.subMode && (
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 120px'}>
|
||||
{t('support.wallet.subscription.mode.Period')}:
|
||||
{t('common:support.wallet.subscription.mode.Period')}:
|
||||
</FormLabel>
|
||||
<Box>{t(subModeMap[bill.metadata.subMode]?.label)}</Box>
|
||||
</Flex>
|
||||
|
|
@ -228,7 +228,7 @@ function BillDetailModal({ bill, onClose }: { bill: BillSchemaType; onClose: ()
|
|||
{!!bill.metadata?.standSubLevel && (
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 120px'}>
|
||||
{t('support.wallet.subscription.Stand plan level')}:
|
||||
{t('common:support.wallet.subscription.Stand plan level')}:
|
||||
</FormLabel>
|
||||
<Box>{t(standardSubLevelMap[bill.metadata.standSubLevel]?.label)}</Box>
|
||||
</Flex>
|
||||
|
|
@ -236,7 +236,7 @@ function BillDetailModal({ bill, onClose }: { bill: BillSchemaType; onClose: ()
|
|||
{bill.metadata?.month !== undefined && (
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 120px'}>
|
||||
{t('support.wallet.subscription.Month amount')}:
|
||||
{t('common:support.wallet.subscription.Month amount')}:
|
||||
</FormLabel>
|
||||
<Box>{bill.metadata?.month}</Box>
|
||||
</Flex>
|
||||
|
|
@ -244,7 +244,7 @@ function BillDetailModal({ bill, onClose }: { bill: BillSchemaType; onClose: ()
|
|||
{bill.metadata?.datasetSize !== undefined && (
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 120px'}>
|
||||
{t('support.wallet.subscription.Extra dataset size')}:
|
||||
{t('common:support.wallet.subscription.Extra dataset size')}:
|
||||
</FormLabel>
|
||||
<Box>{bill.metadata?.datasetSize}</Box>
|
||||
</Flex>
|
||||
|
|
@ -252,7 +252,7 @@ function BillDetailModal({ bill, onClose }: { bill: BillSchemaType; onClose: ()
|
|||
{bill.metadata?.extraPoints !== undefined && (
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 120px'}>
|
||||
{t('support.wallet.subscription.Extra ai points')}:
|
||||
{t('common:support.wallet.subscription.Extra ai points')}:
|
||||
</FormLabel>
|
||||
<Box>{bill.metadata.extraPoints}</Box>
|
||||
</Flex>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const Individuation = () => {
|
|||
});
|
||||
reset(data);
|
||||
toast({
|
||||
title: t('dataset.data.Update Success Tip'),
|
||||
title: t('common:dataset.data.Update Success Tip'),
|
||||
status: 'success'
|
||||
});
|
||||
},
|
||||
|
|
@ -40,12 +40,12 @@ const Individuation = () => {
|
|||
<Box py={[3, '28px']} px={['5vw', '64px']}>
|
||||
<Flex alignItems={'center'} fontSize={'lg'} h={'30px'}>
|
||||
<MyIcon mr={2} name={'support/user/individuation'} w={'20px'} />
|
||||
{t('support.account.Individuation')}
|
||||
{t('common:support.account.Individuation')}
|
||||
</Flex>
|
||||
|
||||
<Card mt={6} px={[3, 10]} py={[3, 7]} fontSize={'sm'}>
|
||||
<Flex alignItems={'center'} w={['85%', '350px']}>
|
||||
<Box flex={'0 0 80px'}>{t('user.Language')}: </Box>
|
||||
<Box flex={'0 0 80px'}>{t('common:user.Language')}: </Box>
|
||||
<Box flex={'1 0 0'}>
|
||||
<MySelect
|
||||
value={i18n.language}
|
||||
|
|
@ -68,7 +68,7 @@ const Individuation = () => {
|
|||
</Box>
|
||||
</Flex>
|
||||
<Flex mt={6} alignItems={'center'} w={['85%', '350px']}>
|
||||
<Box flex={'0 0 80px'}>{t('user.Timezone')}: </Box>
|
||||
<Box flex={'0 0 80px'}>{t('common:user.Timezone')}: </Box>
|
||||
<TimezoneSelect
|
||||
value={userInfo?.timezone}
|
||||
onChange={(e) => {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ const MyInfo = () => {
|
|||
});
|
||||
reset(data);
|
||||
toast({
|
||||
title: t('dataset.data.Update Success Tip'),
|
||||
title: t('common:dataset.data.Update Success Tip'),
|
||||
status: 'success'
|
||||
});
|
||||
},
|
||||
|
|
@ -152,7 +152,7 @@ const MyInfo = () => {
|
|||
});
|
||||
} catch (err: any) {
|
||||
toast({
|
||||
title: typeof err === 'string' ? err : t('common.error.Select avatar failed'),
|
||||
title: typeof err === 'string' ? err : t('common:common.error.Select avatar failed'),
|
||||
status: 'warning'
|
||||
});
|
||||
}
|
||||
|
|
@ -172,16 +172,16 @@ const MyInfo = () => {
|
|||
{isPc && (
|
||||
<Flex alignItems={'center'} fontSize={'md'} h={'30px'}>
|
||||
<MyIcon mr={2} name={'support/user/userLight'} w={'1.25rem'} />
|
||||
{t('support.user.User self info')}
|
||||
{t('common:support.user.User self info')}
|
||||
</Flex>
|
||||
)}
|
||||
|
||||
<Box mt={[0, 6]} fontSize={'sm'}>
|
||||
{isPc ? (
|
||||
<Flex alignItems={'center'} cursor={'pointer'}>
|
||||
<Box {...labelStyles}>{t('support.user.Avatar')}: </Box>
|
||||
<Box {...labelStyles}>{t('common:support.user.Avatar')}: </Box>
|
||||
|
||||
<MyTooltip label={t('common.avatar.Select Avatar')}>
|
||||
<MyTooltip label={t('common:common.avatar.Select Avatar')}>
|
||||
<Box
|
||||
w={['44px', '56px']}
|
||||
h={['44px', '56px']}
|
||||
|
|
@ -204,7 +204,7 @@ const MyInfo = () => {
|
|||
cursor={'pointer'}
|
||||
onClick={onOpenSelectFile}
|
||||
>
|
||||
<MyTooltip label={t('common.avatar.Select Avatar')}>
|
||||
<MyTooltip label={t('common:common.avatar.Select Avatar')}>
|
||||
<Box
|
||||
w={['44px', '54px']}
|
||||
h={['44px', '54px']}
|
||||
|
|
@ -221,17 +221,17 @@ const MyInfo = () => {
|
|||
|
||||
<Flex alignItems={'center'} fontSize={'sm'} color={'myGray.600'}>
|
||||
<MyIcon mr={1} name={'edit'} w={'14px'} />
|
||||
{t('user.Replace')}
|
||||
{t('common:user.Replace')}
|
||||
</Flex>
|
||||
</Flex>
|
||||
)}
|
||||
{feConfigs.isPlus && (
|
||||
<Flex mt={[0, 4]} alignItems={'center'}>
|
||||
<Box {...labelStyles}>{t('user.Member Name')}: </Box>
|
||||
<Box {...labelStyles}>{t('common:user.Member Name')}: </Box>
|
||||
<Input
|
||||
flex={'1 0 0'}
|
||||
defaultValue={userInfo?.team?.memberName || 'Member'}
|
||||
title={t('user.Edit name')}
|
||||
title={t('common:user.Edit name')}
|
||||
borderColor={'transparent'}
|
||||
transform={'translateX(-11px)'}
|
||||
maxLength={20}
|
||||
|
|
@ -246,20 +246,20 @@ const MyInfo = () => {
|
|||
</Flex>
|
||||
)}
|
||||
<Flex alignItems={'center'} mt={6}>
|
||||
<Box {...labelStyles}>{t('user.Account')}: </Box>
|
||||
<Box {...labelStyles}>{t('common:user.Account')}: </Box>
|
||||
<Box flex={1}>{userInfo?.username}</Box>
|
||||
</Flex>
|
||||
{feConfigs.isPlus && (
|
||||
<Flex mt={6} alignItems={'center'}>
|
||||
<Box {...labelStyles}>{t('user.Password')}: </Box>
|
||||
<Box {...labelStyles}>{t('common:user.Password')}: </Box>
|
||||
<Box flex={1}>*****</Box>
|
||||
<Button size={'sm'} variant={'whitePrimary'} onClick={onOpenUpdatePsw}>
|
||||
{t('user.Change')}
|
||||
{t('common:user.Change')}
|
||||
</Button>
|
||||
</Flex>
|
||||
)}
|
||||
<Flex mt={6} alignItems={'center'}>
|
||||
<Box {...labelStyles}>{t('user.Team')}: </Box>
|
||||
<Box {...labelStyles}>{t('common:user.Team')}: </Box>
|
||||
<Box flex={1}>
|
||||
<TeamMenu />
|
||||
</Box>
|
||||
|
|
@ -267,13 +267,13 @@ const MyInfo = () => {
|
|||
{feConfigs.isPlus && (
|
||||
<Box mt={6} whiteSpace={'nowrap'}>
|
||||
<Flex alignItems={'center'}>
|
||||
<Box {...labelStyles}>{t('user.team.Balance')}: </Box>
|
||||
<Box {...labelStyles}>{t('common:user.team.Balance')}: </Box>
|
||||
<Box flex={1}>
|
||||
<strong>{formatStorePrice2Read(userInfo?.team?.balance).toFixed(3)}</strong> 元
|
||||
</Box>
|
||||
{feConfigs?.show_pay && userInfo?.team?.permission.hasWritePer && (
|
||||
<Button variant={'whitePrimary'} size={'sm'} ml={5} onClick={onOpenPayModal}>
|
||||
{t('user.Pay')}
|
||||
{t('common:user.Pay')}
|
||||
</Button>
|
||||
)}
|
||||
</Flex>
|
||||
|
|
@ -332,7 +332,7 @@ const PlanUsage = () => {
|
|||
return {
|
||||
colorScheme: 'green',
|
||||
value: 0,
|
||||
maxSize: t('common.Unlimited'),
|
||||
maxSize: t('common:common.Unlimited'),
|
||||
usedSize: 0
|
||||
};
|
||||
}
|
||||
|
|
@ -347,7 +347,7 @@ const PlanUsage = () => {
|
|||
return {
|
||||
colorScheme,
|
||||
value: rate * 100,
|
||||
maxSize: teamPlanStatus.datasetMaxSize || t('common.Unlimited'),
|
||||
maxSize: teamPlanStatus.datasetMaxSize || t('common:common.Unlimited'),
|
||||
usedSize: teamPlanStatus.usedDatasetSize
|
||||
};
|
||||
}, [teamPlanStatus, t]);
|
||||
|
|
@ -356,7 +356,7 @@ const PlanUsage = () => {
|
|||
return {
|
||||
colorScheme: 'green',
|
||||
value: 0,
|
||||
maxSize: t('common.Unlimited'),
|
||||
maxSize: t('common:common.Unlimited'),
|
||||
usedSize: 0
|
||||
};
|
||||
}
|
||||
|
|
@ -372,7 +372,7 @@ const PlanUsage = () => {
|
|||
return {
|
||||
colorScheme,
|
||||
value: rate * 100,
|
||||
max: teamPlanStatus.totalPoints ? teamPlanStatus.totalPoints : t('common.Unlimited'),
|
||||
max: teamPlanStatus.totalPoints ? teamPlanStatus.totalPoints : t('common:common.Unlimited'),
|
||||
used: teamPlanStatus.usedPoints ? Math.round(teamPlanStatus.usedPoints) : 0
|
||||
};
|
||||
}, [teamPlanStatus, t]);
|
||||
|
|
@ -382,13 +382,13 @@ const PlanUsage = () => {
|
|||
<Flex fontSize={'lg'} h={'30px'}>
|
||||
<Flex alignItems={'center'}>
|
||||
<MyIcon mr={2} name={'support/account/plans'} w={'20px'} />
|
||||
{t('support.wallet.subscription.Team plan and usage')}
|
||||
{t('common:support.wallet.subscription.Team plan and usage')}
|
||||
</Flex>
|
||||
<Button ml={4} size={'sm'} onClick={() => router.push(AI_POINT_USAGE_CARD_ROUTE)}>
|
||||
{t('support.user.Price')}
|
||||
{t('common:support.user.Price')}
|
||||
</Button>
|
||||
<Button ml={4} variant={'whitePrimary'} size={'sm'} onClick={onOpenStandardModal}>
|
||||
{t('support.wallet.Standard Plan Detail')}
|
||||
{t('common:support.wallet.Standard Plan Detail')}
|
||||
</Button>
|
||||
</Flex>
|
||||
<Box
|
||||
|
|
@ -401,7 +401,7 @@ const PlanUsage = () => {
|
|||
<Flex px={[5, 7]} py={[3, 6]}>
|
||||
<Box flex={'1 0 0'}>
|
||||
<Box color={'myGray.600'} fontSize="sm">
|
||||
{t('support.wallet.subscription.Current plan')}
|
||||
{t('common:support.wallet.subscription.Current plan')}
|
||||
</Box>
|
||||
<Box fontWeight={'bold'} fontSize="lg">
|
||||
{t(planName)}
|
||||
|
|
@ -410,7 +410,7 @@ const PlanUsage = () => {
|
|||
{isFreeTeam ? (
|
||||
<>
|
||||
<Flex mt="2" color={'#485264'} fontSize="sm">
|
||||
<Box>{t('support.wallet.Plan reset time')}:</Box>
|
||||
<Box>{t('common:support.wallet.Plan reset time')}:</Box>
|
||||
<Box ml={2}>{formatTime2YMD(standardPlan?.expiredTime)}</Box>
|
||||
</Flex>
|
||||
<Box mt="2" color={'#485264'} fontSize="sm">
|
||||
|
|
@ -419,13 +419,13 @@ const PlanUsage = () => {
|
|||
</>
|
||||
) : (
|
||||
<Flex mt="2" color={'#485264'} fontSize="xs">
|
||||
<Box>{t('support.wallet.Plan expired time')}:</Box>
|
||||
<Box>{t('common:support.wallet.Plan expired time')}:</Box>
|
||||
<Box ml={2}>{formatTime2YMD(standardPlan?.expiredTime)}</Box>
|
||||
</Flex>
|
||||
)}
|
||||
</Box>
|
||||
<Button onClick={() => router.push('/price')} w={'8rem'} size="sm">
|
||||
{t('support.wallet.subscription.Upgrade plan')}
|
||||
{t('common:support.wallet.subscription.Upgrade plan')}
|
||||
</Button>
|
||||
</Flex>
|
||||
<Box py={3} borderTopWidth={'1px'} borderTopColor={'borderColor.base'}>
|
||||
|
|
@ -471,7 +471,7 @@ const PlanUsage = () => {
|
|||
<Flex alignItems={'center'}>
|
||||
<Flex alignItems={'center'}>
|
||||
<Box fontWeight={'bold'} color={'myGray.900'}>
|
||||
{t('support.user.team.Dataset usage')}
|
||||
{t('common:support.user.team.Dataset usage')}
|
||||
</Box>
|
||||
<Box color={'myGray.600'} ml={2}>
|
||||
{datasetUsageMap.usedSize}/{datasetUsageMap.maxSize}
|
||||
|
|
@ -495,11 +495,11 @@ const PlanUsage = () => {
|
|||
<Flex alignItems={'center'}>
|
||||
<Flex alignItems={'center'}>
|
||||
<Box fontWeight={'bold'} color={'myGray.900'}>
|
||||
{t('support.wallet.subscription.AI points usage')}
|
||||
{t('common:support.wallet.subscription.AI points usage')}
|
||||
</Box>
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('support.wallet.subscription.AI points usage tip')}
|
||||
label={t('common:support.wallet.subscription.AI points usage tip')}
|
||||
></QuestionTip>
|
||||
<Box color={'myGray.600'} ml={2}>
|
||||
{aiPointsUsageMap.used}/{aiPointsUsageMap.max}
|
||||
|
|
@ -573,7 +573,7 @@ const Other = () => {
|
|||
>
|
||||
<MyIcon name={'common/courseLight'} w={'18px'} color={'myGray.600'} />
|
||||
<Box ml={2} flex={1}>
|
||||
{t('system.Help Document')}
|
||||
{t('common:system.Help Document')}
|
||||
</Box>
|
||||
</Link>
|
||||
)}
|
||||
|
|
@ -595,7 +595,7 @@ const Other = () => {
|
|||
>
|
||||
<MyIcon name={'core/app/aiLight'} w={'18px'} />
|
||||
<Box ml={2} flex={1}>
|
||||
{t('common.system.Help Chatbot')}
|
||||
{t('common:common.system.Help Chatbot')}
|
||||
</Box>
|
||||
</Link>
|
||||
)}
|
||||
|
|
@ -662,7 +662,7 @@ const Other = () => {
|
|||
h={'48px'}
|
||||
fontSize={'sm'}
|
||||
>
|
||||
{t('system.Concat us')}
|
||||
{t('common:system.Concat us')}
|
||||
</Button>
|
||||
)}
|
||||
</Grid>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ const InformTable = () => {
|
|||
}
|
||||
}}
|
||||
>
|
||||
{t('support.inform.Read')}
|
||||
{t('common:support.inform.Read')}
|
||||
</Button>
|
||||
)}
|
||||
</Flex>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const OpenAIAccountModal = ({
|
|||
onSuccess(res) {
|
||||
onClose();
|
||||
},
|
||||
errorToast: t('user.Set OpenAI Account Failed')
|
||||
errorToast: t('common:user.Set OpenAI Account Failed')
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -33,7 +33,7 @@ const OpenAIAccountModal = ({
|
|||
isOpen
|
||||
onClose={onClose}
|
||||
iconSrc="common/openai"
|
||||
title={t('user.OpenAI Account Setting')}
|
||||
title={t('common:user.OpenAI Account Setting')}
|
||||
>
|
||||
<ModalBody>
|
||||
<Box fontSize={'sm'} color={'myGray.500'}>
|
||||
|
|
|
|||
|
|
@ -58,7 +58,12 @@ const PayModal = ({
|
|||
}, [subPlans?.standard]);
|
||||
|
||||
return (
|
||||
<MyModal isOpen={true} onClose={onClose} title={t('user.Pay')} iconSrc="/imgs/modal/pay.svg">
|
||||
<MyModal
|
||||
isOpen={true}
|
||||
onClose={onClose}
|
||||
title={t('common:user.Pay')}
|
||||
iconSrc="/imgs/modal/pay.svg"
|
||||
>
|
||||
<ModalBody px={0} display={'flex'} flexDirection={'column'}>
|
||||
<Box px={6} fontSize={'sm'} mb={2} py={2} maxW={'400px'}>
|
||||
该余额仅用于自动续费标准套餐。如需购买额外套餐,可
|
||||
|
|
@ -93,7 +98,7 @@ const PayModal = ({
|
|||
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button
|
||||
ml={3}
|
||||
|
|
|
|||
|
|
@ -69,24 +69,24 @@ const Promotion = () => {
|
|||
<Flex flexDirection={'column'} py={[0, 5]} px={5} h={'100%'} position={'relative'}>
|
||||
<Grid gridTemplateColumns={['1fr 1fr', 'repeat(2,1fr)', 'repeat(4,1fr)']} gridGap={5}>
|
||||
<Box {...statisticsStyles}>
|
||||
<Box>{t('user.Amount of inviter')}</Box>
|
||||
<Box>{t('common:user.Amount of inviter')}</Box>
|
||||
<Box {...titleStyles}>{invitedAmount}</Box>
|
||||
</Box>
|
||||
<Box {...statisticsStyles}>
|
||||
<Box>{t('user.Amount of earnings')}</Box>
|
||||
<Box>{t('common:user.Amount of earnings')}</Box>
|
||||
<Box {...titleStyles}>{earningsAmount}</Box>
|
||||
</Box>
|
||||
<Box {...statisticsStyles}>
|
||||
<Flex alignItems={'center'} justifyContent={'center'}>
|
||||
<Box>{t('user.Promotion Rate')}</Box>
|
||||
<QuestionTip ml={1} label={t('user.Promotion rate tip')}></QuestionTip>
|
||||
<Box>{t('common:user.Promotion Rate')}</Box>
|
||||
<QuestionTip ml={1} label={t('common:user.Promotion rate tip')}></QuestionTip>
|
||||
</Flex>
|
||||
<Box {...titleStyles}>{userInfo?.promotionRate || 15}%</Box>
|
||||
</Box>
|
||||
<Box {...statisticsStyles}>
|
||||
<Flex alignItems={'center'} justifyContent={'center'}>
|
||||
<Box>{t('user.Invite Url')}</Box>
|
||||
<QuestionTip ml={1} label={t('user.Invite url tip')}></QuestionTip>
|
||||
<Box>{t('common:user.Invite Url')}</Box>
|
||||
<QuestionTip ml={1} label={t('common:user.Invite url tip')}></QuestionTip>
|
||||
</Flex>
|
||||
<Button
|
||||
mt={4}
|
||||
|
|
@ -96,7 +96,7 @@ const Promotion = () => {
|
|||
copyData(`${location.origin}/?hiId=${userInfo?._id}`);
|
||||
}}
|
||||
>
|
||||
{t('user.Copy invite url')}
|
||||
{t('common:user.Copy invite url')}
|
||||
</Button>
|
||||
</Box>
|
||||
</Grid>
|
||||
|
|
|
|||
|
|
@ -25,15 +25,15 @@ const UpdatePswModal = ({ onClose }: { onClose: () => void }) => {
|
|||
const { mutate: onSubmit, isLoading } = useRequest({
|
||||
mutationFn: (data: FormType) => {
|
||||
if (data.newPsw !== data.confirmPsw) {
|
||||
return Promise.reject(t('common.Password inconsistency'));
|
||||
return Promise.reject(t('common:common.Password inconsistency'));
|
||||
}
|
||||
return updatePasswordByOld(data);
|
||||
},
|
||||
onSuccess() {
|
||||
onClose();
|
||||
},
|
||||
successToast: t('user.Update password successful'),
|
||||
errorToast: t('user.Update password failed')
|
||||
successToast: t('common:user.Update password successful'),
|
||||
errorToast: t('common:user.Update password failed')
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -41,7 +41,7 @@ const UpdatePswModal = ({ onClose }: { onClose: () => void }) => {
|
|||
isOpen
|
||||
onClose={onClose}
|
||||
iconSrc="/imgs/modal/password.svg"
|
||||
title={t('user.Update Password')}
|
||||
title={t('common:user.Update Password')}
|
||||
>
|
||||
<ModalBody>
|
||||
<Flex alignItems={'center'}>
|
||||
|
|
|
|||
|
|
@ -63,44 +63,44 @@ const UsageDetail = ({ usage, onClose }: { usage: UsageItemType; onClose: () =>
|
|||
isOpen={true}
|
||||
onClose={onClose}
|
||||
iconSrc="/imgs/modal/bill.svg"
|
||||
title={t('support.wallet.usage.Usage Detail')}
|
||||
title={t('common:support.wallet.usage.Usage Detail')}
|
||||
maxW={['90vw', '700px']}
|
||||
>
|
||||
<ModalBody>
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 80px'}>{t('support.wallet.bill.Number')}:</FormLabel>
|
||||
<FormLabel flex={'0 0 80px'}>{t('common:support.wallet.bill.Number')}:</FormLabel>
|
||||
<Box>{usage.id}</Box>
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 80px'}>{t('support.wallet.usage.Time')}:</FormLabel>
|
||||
<FormLabel flex={'0 0 80px'}>{t('common:support.wallet.usage.Time')}:</FormLabel>
|
||||
<Box>{dayjs(usage.time).format('YYYY/MM/DD HH:mm:ss')}</Box>
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 80px'}>{t('support.wallet.usage.App name')}:</FormLabel>
|
||||
<FormLabel flex={'0 0 80px'}>{t('common:support.wallet.usage.App name')}:</FormLabel>
|
||||
<Box>{t(usage.appName) || '-'}</Box>
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 80px'}>{t('support.wallet.usage.Source')}:</FormLabel>
|
||||
<FormLabel flex={'0 0 80px'}>{t('common:support.wallet.usage.Source')}:</FormLabel>
|
||||
<Box>{t(UsageSourceMap[usage.source]?.label)}</Box>
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} pb={4}>
|
||||
<FormLabel flex={'0 0 80px'}>{t('support.wallet.usage.Total points')}:</FormLabel>
|
||||
<FormLabel flex={'0 0 80px'}>{t('common:support.wallet.usage.Total points')}:</FormLabel>
|
||||
<Box fontWeight={'bold'}>{formatNumber(usage.totalPoints)}</Box>
|
||||
</Flex>
|
||||
<Box pb={4}>
|
||||
<FormLabel flex={'0 0 80px'} mb={1}>
|
||||
{t('support.wallet.usage.Bill Module')}
|
||||
{t('common:support.wallet.usage.Bill Module')}
|
||||
</FormLabel>
|
||||
<TableContainer fontSize={'sm'}>
|
||||
<Table>
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th>{t('support.wallet.usage.Module name')}</Th>
|
||||
{hasModel && <Th>{t('support.wallet.usage.Ai model')}</Th>}
|
||||
{hasToken && <Th>{t('support.wallet.usage.Token Length')}</Th>}
|
||||
{hasCharsLen && <Th>{t('support.wallet.usage.Text Length')}</Th>}
|
||||
{hasDuration && <Th>{t('support.wallet.usage.Duration')}</Th>}
|
||||
<Th>{t('support.wallet.usage.Total points')}</Th>
|
||||
<Th>{t('common:support.wallet.usage.Module name')}</Th>
|
||||
{hasModel && <Th>{t('common:support.wallet.usage.Ai model')}</Th>}
|
||||
{hasToken && <Th>{t('common:support.wallet.usage.Token Length')}</Th>}
|
||||
{hasCharsLen && <Th>{t('common:support.wallet.usage.Text Length')}</Th>}
|
||||
{hasDuration && <Th>{t('common:support.wallet.usage.Duration')}</Th>}
|
||||
<Th>{t('common:support.wallet.usage.Total points')}</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ const UsageTable = () => {
|
|||
const sourceList = useMemo(
|
||||
() =>
|
||||
[
|
||||
{ label: t('common.All'), value: '' },
|
||||
{ label: t('common:common.All'), value: '' },
|
||||
...Object.entries(UsageSourceMap).map(([key, value]) => ({
|
||||
label: t(value.label),
|
||||
value: key
|
||||
|
|
@ -113,7 +113,7 @@ const UsageTable = () => {
|
|||
{tmbList.length > 1 && userInfo?.team?.permission.hasWritePer && (
|
||||
<Flex alignItems={'center'}>
|
||||
<Box mr={2} flexShrink={0}>
|
||||
{t('support.user.team.member')}
|
||||
{t('common:support.user.team.member')}
|
||||
</Box>
|
||||
<MySelect
|
||||
size={'sm'}
|
||||
|
|
@ -146,8 +146,8 @@ const UsageTable = () => {
|
|||
<Table>
|
||||
<Thead>
|
||||
<Tr>
|
||||
{/* <Th>{t('user.team.Member Name')}</Th> */}
|
||||
<Th>{t('user.Time')}</Th>
|
||||
{/* <Th>{t('common:user.team.Member Name')}</Th> */}
|
||||
<Th>{t('common:user.Time')}</Th>
|
||||
<Th>
|
||||
<MySelect<UsageSourceEnum | ''>
|
||||
list={sourceList}
|
||||
|
|
@ -159,8 +159,8 @@ const UsageTable = () => {
|
|||
w={'130px'}
|
||||
></MySelect>
|
||||
</Th>
|
||||
<Th>{t('user.Application Name')}</Th>
|
||||
<Th>{t('support.wallet.usage.Total points')}</Th>
|
||||
<Th>{t('common:user.Application Name')}</Th>
|
||||
<Th>{t('common:support.wallet.usage.Total points')}</Th>
|
||||
<Th></Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const StandDetailModal = ({ onClose }: { onClose: () => void }) => {
|
|||
isOpen
|
||||
maxW={['90vw', '1200px']}
|
||||
iconSrc="modal/teamPlans"
|
||||
title={t('support.wallet.Standard Plan Detail')}
|
||||
title={t('common:support.wallet.Standard Plan Detail')}
|
||||
>
|
||||
<ModalCloseButton onClick={onClose} />
|
||||
<ModalBody>
|
||||
|
|
@ -40,11 +40,11 @@ const StandDetailModal = ({ onClose }: { onClose: () => void }) => {
|
|||
<Table>
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th>{t('support.standard.type')}</Th>
|
||||
<Th>{t('support.standard.storage')}</Th>
|
||||
<Th>{t('support.standard.AI Bonus Points')}</Th>
|
||||
<Th>{t('support.standard.Start Time')}</Th>
|
||||
<Th>{t('support.standard.Expired Time')}</Th>
|
||||
<Th>{t('common:support.standard.type')}</Th>
|
||||
<Th>{t('common:support.standard.storage')}</Th>
|
||||
<Th>{t('common:support.standard.AI Bonus Points')}</Th>
|
||||
<Th>{t('common:support.standard.Start Time')}</Th>
|
||||
<Th>{t('common:support.standard.Expired Time')}</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody fontSize={'sm'}>
|
||||
|
|
|
|||
|
|
@ -41,14 +41,14 @@ const Account = ({ currentTab }: { currentTab: TabEnum }) => {
|
|||
const tabList = [
|
||||
{
|
||||
icon: 'support/user/userLight',
|
||||
label: t('user.Personal Information'),
|
||||
label: t('common:user.Personal Information'),
|
||||
value: TabEnum.info
|
||||
},
|
||||
...(feConfigs?.isPlus
|
||||
? [
|
||||
{
|
||||
icon: 'support/usage/usageRecordLight',
|
||||
label: t('user.Usage Record'),
|
||||
label: t('common:user.Usage Record'),
|
||||
value: TabEnum.usage
|
||||
}
|
||||
]
|
||||
|
|
@ -57,7 +57,7 @@ const Account = ({ currentTab }: { currentTab: TabEnum }) => {
|
|||
? [
|
||||
{
|
||||
icon: 'support/bill/payRecordLight',
|
||||
label: t('support.wallet.Bills'),
|
||||
label: t('common:support.wallet.Bills'),
|
||||
value: TabEnum.bill
|
||||
}
|
||||
]
|
||||
|
|
@ -67,7 +67,7 @@ const Account = ({ currentTab }: { currentTab: TabEnum }) => {
|
|||
? [
|
||||
{
|
||||
icon: 'support/account/promotionLight',
|
||||
label: t('user.Promotion Record'),
|
||||
label: t('common:user.Promotion Record'),
|
||||
value: TabEnum.promotion
|
||||
}
|
||||
]
|
||||
|
|
@ -76,21 +76,21 @@ const Account = ({ currentTab }: { currentTab: TabEnum }) => {
|
|||
? [
|
||||
{
|
||||
icon: 'support/outlink/apikeyLight',
|
||||
label: t('user.apikey.key'),
|
||||
label: t('common:user.apikey.key'),
|
||||
value: TabEnum.apikey
|
||||
}
|
||||
]
|
||||
: []),
|
||||
{
|
||||
icon: 'support/user/individuation',
|
||||
label: t('support.account.Individuation'),
|
||||
label: t('common:support.account.Individuation'),
|
||||
value: TabEnum.individuation
|
||||
},
|
||||
...(feConfigs.isPlus
|
||||
? [
|
||||
{
|
||||
icon: 'support/user/informLight',
|
||||
label: t('user.Notice'),
|
||||
label: t('common:user.Notice'),
|
||||
value: TabEnum.inform
|
||||
}
|
||||
]
|
||||
|
|
@ -98,7 +98,7 @@ const Account = ({ currentTab }: { currentTab: TabEnum }) => {
|
|||
|
||||
{
|
||||
icon: 'support/account/loginoutLight',
|
||||
label: t('user.Sign Out'),
|
||||
label: t('common:user.Sign Out'),
|
||||
value: TabEnum.loginout
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -75,19 +75,19 @@ const InfoModal = ({ onClose }: { onClose: () => void }) => {
|
|||
{
|
||||
onSuccess() {
|
||||
toast({
|
||||
title: t('common.Update Success'),
|
||||
title: t('common:common.Update Success'),
|
||||
status: 'success'
|
||||
});
|
||||
reloadApp();
|
||||
},
|
||||
errorToast: t('common.Update Failed')
|
||||
errorToast: t('common:common.Update Failed')
|
||||
}
|
||||
);
|
||||
|
||||
const saveSubmitError = useCallback(() => {
|
||||
// deep search message
|
||||
const deepSearch = (obj: any): string => {
|
||||
if (!obj) return t('common.Submit failed');
|
||||
if (!obj) return t('common:common.Submit failed');
|
||||
if (!!obj.message) {
|
||||
return obj.message;
|
||||
}
|
||||
|
|
@ -120,7 +120,7 @@ const InfoModal = ({ onClose }: { onClose: () => void }) => {
|
|||
setValue('avatar', src);
|
||||
} catch (err: any) {
|
||||
toast({
|
||||
title: getErrText(err, t('common.error.Select avatar failed')),
|
||||
title: getErrText(err, t('common:common.error.Select avatar failed')),
|
||||
status: 'warning'
|
||||
});
|
||||
}
|
||||
|
|
@ -158,10 +158,10 @@ const InfoModal = ({ onClose }: { onClose: () => void }) => {
|
|||
isOpen={true}
|
||||
onClose={onClose}
|
||||
iconSrc="/imgs/workflow/ai.svg"
|
||||
title={t('core.app.setting')}
|
||||
title={t('common:core.app.setting')}
|
||||
>
|
||||
<ModalBody>
|
||||
<Box fontSize={'sm'}>{t('core.app.Name and avatar')}</Box>
|
||||
<Box fontSize={'sm'}>{t('common:core.app.Name and avatar')}</Box>
|
||||
<Flex mt={2} alignItems={'center'}>
|
||||
<Avatar
|
||||
src={avatar}
|
||||
|
|
@ -170,13 +170,13 @@ const InfoModal = ({ onClose }: { onClose: () => void }) => {
|
|||
cursor={'pointer'}
|
||||
borderRadius={'md'}
|
||||
mr={4}
|
||||
title={t('common.Set Avatar')}
|
||||
title={t('common:common.Set Avatar')}
|
||||
onClick={() => onOpenSelectFile()}
|
||||
/>
|
||||
<FormControl>
|
||||
<Input
|
||||
bg={'myWhite.600'}
|
||||
placeholder={t('core.app.Set a name for your app')}
|
||||
placeholder={t('common:core.app.Set a name for your app')}
|
||||
{...register('name', {
|
||||
required: true
|
||||
})}
|
||||
|
|
@ -184,12 +184,12 @@ const InfoModal = ({ onClose }: { onClose: () => void }) => {
|
|||
</FormControl>
|
||||
</Flex>
|
||||
<Box mt={4} mb={1} fontSize={'sm'}>
|
||||
{t('core.app.App intro')}
|
||||
{t('common:core.app.App intro')}
|
||||
</Box>
|
||||
<Textarea
|
||||
rows={4}
|
||||
maxLength={500}
|
||||
placeholder={t('core.app.Make a brief introduction of your app')}
|
||||
placeholder={t('common:core.app.Make a brief introduction of your app')}
|
||||
bg={'myWhite.600'}
|
||||
{...register('intro')}
|
||||
/>
|
||||
|
|
@ -203,7 +203,7 @@ const InfoModal = ({ onClose }: { onClose: () => void }) => {
|
|||
</Box>
|
||||
)}
|
||||
<Box mt="4">
|
||||
<Box fontSize={'sm'}>{t('permission.Default permission')}</Box>
|
||||
<Box fontSize={'sm'}>{t('common:permission.Default permission')}</Box>
|
||||
<DefaultPermissionList
|
||||
mt="2"
|
||||
per={appDetail.defaultPermission}
|
||||
|
|
@ -244,7 +244,7 @@ const InfoModal = ({ onClose }: { onClose: () => void }) => {
|
|||
leftIcon={<MyIcon w="4" name="common/settingLight" />}
|
||||
onClick={onOpenManageModal}
|
||||
>
|
||||
{t('permission.Manage')}
|
||||
{t('common:permission.Manage')}
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
|
|
@ -252,7 +252,7 @@ const InfoModal = ({ onClose }: { onClose: () => void }) => {
|
|||
leftIcon={<MyIcon w="4" name="support/permission/collaborator" />}
|
||||
onClick={onOpenAddMember}
|
||||
>
|
||||
{t('common.Add')}
|
||||
{t('common:common.Add')}
|
||||
</Button>
|
||||
</Flex>
|
||||
</Flex>
|
||||
|
|
@ -268,10 +268,10 @@ const InfoModal = ({ onClose }: { onClose: () => void }) => {
|
|||
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button isLoading={btnLoading} onClick={saveUpdateModel}>
|
||||
{t('common.Save')}
|
||||
{t('common:common.Save')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
|
||||
|
|
|
|||
|
|
@ -97,10 +97,10 @@ const DetailLogsModal = ({
|
|||
>
|
||||
<LightRowTabs<PluginRunBoxTabEnum>
|
||||
list={[
|
||||
{ label: t('common.Input'), value: PluginRunBoxTabEnum.input },
|
||||
{ label: t('common:common.Input'), value: PluginRunBoxTabEnum.input },
|
||||
...(chatRecords.length > 0
|
||||
? [
|
||||
{ label: t('common.Output'), value: PluginRunBoxTabEnum.output },
|
||||
{ label: t('common:common.Output'), value: PluginRunBoxTabEnum.output },
|
||||
{ label: '完整结果', value: PluginRunBoxTabEnum.detail }
|
||||
]
|
||||
: [])
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ const Logs = () => {
|
|||
cursor={'pointer'}
|
||||
onClick={onOpenMarkDesc}
|
||||
>
|
||||
{t('core.chat.Read Mark Description')}
|
||||
{t('common:core.chat.Read Mark Description')}
|
||||
</Box>
|
||||
</Box>
|
||||
</>
|
||||
|
|
@ -108,11 +108,11 @@ const Logs = () => {
|
|||
<Table variant={'simple'} fontSize={'sm'}>
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th>{t('core.app.logs.Source And Time')}</Th>
|
||||
<Th>{t('common:core.app.logs.Source And Time')}</Th>
|
||||
<Th>{appT('Logs Title')}</Th>
|
||||
<Th>{appT('Logs Message Total')}</Th>
|
||||
<Th>{appT('Feedback Count')}</Th>
|
||||
<Th>{t('core.app.feedback.Custom feedback')}</Th>
|
||||
<Th>{t('common:core.app.feedback.Custom feedback')}</Th>
|
||||
<Th>{appT('Mark Count')}</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
|
|
@ -210,9 +210,9 @@ const Logs = () => {
|
|||
<MyModal
|
||||
isOpen={isOpenMarkDesc}
|
||||
onClose={onCloseMarkDesc}
|
||||
title={t('core.chat.Mark Description Title')}
|
||||
title={t('common:core.chat.Mark Description Title')}
|
||||
>
|
||||
<ModalBody whiteSpace={'pre-wrap'}>{t('core.chat.Mark Description')}</ModalBody>
|
||||
<ModalBody whiteSpace={'pre-wrap'}>{t('common:core.chat.Mark Description')}</ModalBody>
|
||||
</MyModal>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ const Header = () => {
|
|||
// effect
|
||||
useBeforeunload({
|
||||
callback: onSaveWorkflow,
|
||||
tip: t('core.common.tip.leave page')
|
||||
tip: t('common:core.common.tip.leave page')
|
||||
});
|
||||
useInterval(() => {
|
||||
if (!appDetail._id) return;
|
||||
|
|
@ -145,20 +145,20 @@ const Header = () => {
|
|||
}
|
||||
}}
|
||||
>
|
||||
{t('core.workflow.Debug')}
|
||||
{t('common:core.workflow.Debug')}
|
||||
</Button>
|
||||
|
||||
{!historiesDefaultData && (
|
||||
<PopoverConfirm
|
||||
showCancel
|
||||
content={t('core.app.Publish Confirm')}
|
||||
content={t('common:core.app.Publish Confirm')}
|
||||
Trigger={
|
||||
<Button
|
||||
ml={[2, 4]}
|
||||
size={'sm'}
|
||||
leftIcon={<MyIcon name={'common/publishFill'} w={['14px', '16px']} />}
|
||||
>
|
||||
{t('core.app.Publish')}
|
||||
{t('common:core.app.Publish')}
|
||||
</Button>
|
||||
}
|
||||
onConfirm={() => onclickPublish()}
|
||||
|
|
|
|||
|
|
@ -45,14 +45,14 @@ const FeiShuEditModal = ({
|
|||
type: PublishChannelEnum.feishu
|
||||
});
|
||||
},
|
||||
errorToast: t('common.Create Failed'),
|
||||
errorToast: t('common:common.Create Failed'),
|
||||
onSuccess: onCreate
|
||||
});
|
||||
const { mutate: onclickUpdate, isLoading: updating } = useRequest({
|
||||
mutationFn: (e: OutLinkEditType<FeishuType>) => {
|
||||
return updateShareChat(e);
|
||||
},
|
||||
errorToast: t('common.Update Failed'),
|
||||
errorToast: t('common:common.Update Failed'),
|
||||
onSuccess: onEdit
|
||||
});
|
||||
|
||||
|
|
@ -64,12 +64,12 @@ const FeiShuEditModal = ({
|
|||
>
|
||||
<ModalBody>
|
||||
<Flex alignItems={'center'}>
|
||||
<Box flex={'0 0 90px'}>{t('Name')}</Box>
|
||||
<Box flex={'0 0 90px'}>{t('common:Name')}</Box>
|
||||
<Input
|
||||
placeholder={publishT('Feishu name') || 'Link Name'} // TODO: i18n
|
||||
maxLength={20}
|
||||
{...register('name', {
|
||||
required: t('common.Name is empty') || 'Name is empty'
|
||||
required: t('common:common.Name is empty') || 'Name is empty'
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
|
|
@ -90,8 +90,11 @@ const FeiShuEditModal = ({
|
|||
</Flex>
|
||||
<Flex alignItems={'center'} mt={4}>
|
||||
<Flex flex={'0 0 90px'} alignItems={'center'}>
|
||||
{t('support.outlink.Max usage points')}
|
||||
<QuestionTip ml={1} label={t('support.outlink.Max usage points tip')}></QuestionTip>
|
||||
{t('common:support.outlink.Max usage points')}
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('common:support.outlink.Max usage points tip')}
|
||||
></QuestionTip>
|
||||
</Flex>
|
||||
<Input
|
||||
{...register('limit.maxUsagePoints', {
|
||||
|
|
@ -104,7 +107,7 @@ const FeiShuEditModal = ({
|
|||
</Flex>
|
||||
<Flex alignItems={'center'} mt={4}>
|
||||
<Flex flex={'0 0 90px'} alignItems={'center'}>
|
||||
{t('common.Expired Time')}
|
||||
{t('common:common.Expired Time')}
|
||||
</Flex>
|
||||
<Input
|
||||
type="datetime-local"
|
||||
|
|
@ -145,9 +148,9 @@ const FeiShuEditModal = ({
|
|||
/>
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} mt={4}>
|
||||
<Box flex={'0 0 90px'}>{t('core.module.http.AppId')}</Box>
|
||||
<Box flex={'0 0 90px'}>{t('common:core.module.http.AppId')}</Box>
|
||||
<Input
|
||||
placeholder={t('core.module.http.appId') || 'Link Name'}
|
||||
placeholder={t('common:core.module.http.appId') || 'Link Name'}
|
||||
// maxLength={20}
|
||||
{...register('app.appId', {
|
||||
required: true
|
||||
|
|
@ -155,12 +158,12 @@ const FeiShuEditModal = ({
|
|||
/>
|
||||
</Flex>
|
||||
<Flex alignItems={'center'} mt={4}>
|
||||
<Box flex={'0 0 90px'}>{t('core.module.http.AppSecret')}</Box>
|
||||
<Box flex={'0 0 90px'}>{t('common:core.module.http.AppSecret')}</Box>
|
||||
<Input
|
||||
placeholder={'App Secret'}
|
||||
// maxLength={20}
|
||||
{...register('app.appSecret', {
|
||||
required: t('common.Name is empty') || 'Name is empty'
|
||||
required: t('common:common.Name is empty') || 'Name is empty'
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
|
|
@ -170,7 +173,7 @@ const FeiShuEditModal = ({
|
|||
placeholder="Encrypt Key"
|
||||
// maxLength={20}
|
||||
{...register('app.encryptKey', {
|
||||
required: t('common.Name is empty') || 'Name is empty'
|
||||
required: t('common:common.Name is empty') || 'Name is empty'
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
|
|
@ -180,7 +183,7 @@ const FeiShuEditModal = ({
|
|||
placeholder="Verification Token"
|
||||
// maxLength={20}
|
||||
{...register('app.verificationToken', {
|
||||
required: t('common.Name is empty') || 'Name is empty'
|
||||
required: t('common:common.Name is empty') || 'Name is empty'
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
|
|
@ -193,13 +196,13 @@ const FeiShuEditModal = ({
|
|||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button
|
||||
isLoading={creating || updating}
|
||||
onClick={submitShareChat((data) => (isEdit ? onclickUpdate(data) : onclickCreate(data)))}
|
||||
>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ const FeiShu = ({ appId }: { appId: string }) => {
|
|||
<Box position={'relative'} pt={3} px={5} minH={'50vh'}>
|
||||
<Flex justifyContent={'space-between'}>
|
||||
<Box fontWeight={'bold'} fontSize={['md', 'lg']}>
|
||||
{t('core.app.publish.Fei shu bot publish')}
|
||||
{t('common:core.app.publish.Fei shu bot publish')}
|
||||
</Box>
|
||||
<Button
|
||||
variant={'whitePrimary'}
|
||||
|
|
@ -58,27 +58,27 @@ const FeiShu = ({ appId }: { appId: string }) => {
|
|||
{...(shareChatList.length >= 10
|
||||
? {
|
||||
isDisabled: true,
|
||||
title: t('core.app.share.Amount limit tip')
|
||||
title: t('common:core.app.share.Amount limit tip')
|
||||
}
|
||||
: {})}
|
||||
onClick={() => setEditFeiShuLinkData(defaultFeishuOutLinkForm)}
|
||||
>
|
||||
{t('core.app.share.Create link')}
|
||||
{t('common:core.app.share.Create link')}
|
||||
</Button>
|
||||
</Flex>
|
||||
<TableContainer mt={3}>
|
||||
<Table variant={'simple'} w={'100%'} overflowX={'auto'} fontSize={'sm'}>
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th>{t('common.Name')}</Th>
|
||||
<Th>{t('support.outlink.Usage points')}</Th>
|
||||
<Th>{t('common:common.Name')}</Th>
|
||||
<Th>{t('common:support.outlink.Usage points')}</Th>
|
||||
{feConfigs?.isPlus && (
|
||||
<>
|
||||
<Th>{t('core.app.share.Ip limit title')}</Th>
|
||||
<Th>{t('common.Expired Time')}</Th>
|
||||
<Th>{t('common:core.app.share.Ip limit title')}</Th>
|
||||
<Th>{t('common:common.Expired Time')}</Th>
|
||||
</>
|
||||
)}
|
||||
<Th>{t('common.Last use time')}</Th>
|
||||
<Th>{t('common:common.Last use time')}</Th>
|
||||
<Th></Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
|
|
@ -92,7 +92,7 @@ const FeiShu = ({ appId }: { appId: string }) => {
|
|||
? `${
|
||||
item.limit?.maxUsagePoints && item.limit.maxUsagePoints > -1
|
||||
? ` / ${item.limit.maxUsagePoints}`
|
||||
: ` / ${t('common.Unlimited')}`
|
||||
: ` / ${t('common:common.Unlimited')}`
|
||||
}`
|
||||
: ''}
|
||||
</Td>
|
||||
|
|
@ -107,7 +107,9 @@ const FeiShu = ({ appId }: { appId: string }) => {
|
|||
</>
|
||||
)}
|
||||
<Td>
|
||||
{item.lastTime ? t(formatTimeToChatTime(item.lastTime)) : t('common.Un used')}
|
||||
{item.lastTime
|
||||
? t(formatTimeToChatTime(item.lastTime))
|
||||
: t('common:common.Un used')}
|
||||
</Td>
|
||||
<Td display={'flex'} alignItems={'center'}>
|
||||
<MyMenu
|
||||
|
|
@ -125,7 +127,7 @@ const FeiShu = ({ appId }: { appId: string }) => {
|
|||
{
|
||||
children: [
|
||||
{
|
||||
label: t('common.Edit'),
|
||||
label: t('common:common.Edit'),
|
||||
icon: 'edit',
|
||||
onClick: () =>
|
||||
setEditFeiShuLinkData({
|
||||
|
|
@ -139,7 +141,7 @@ const FeiShu = ({ appId }: { appId: string }) => {
|
|||
})
|
||||
},
|
||||
{
|
||||
label: t('common.Delete'),
|
||||
label: t('common:common.Delete'),
|
||||
icon: 'delete',
|
||||
onClick: async () => {
|
||||
setIsLoading(true);
|
||||
|
|
@ -174,7 +176,7 @@ const FeiShu = ({ appId }: { appId: string }) => {
|
|||
onEdit={() => {
|
||||
toast({
|
||||
status: 'success',
|
||||
title: t('common.Update Successful')
|
||||
title: t('common:common.Update Successful')
|
||||
});
|
||||
refetchShareChatList();
|
||||
setEditFeiShuLinkData(undefined);
|
||||
|
|
@ -183,7 +185,7 @@ const FeiShu = ({ appId }: { appId: string }) => {
|
|||
/>
|
||||
)}
|
||||
{shareChatList.length === 0 && !isFetching && (
|
||||
<EmptyTip text={t('core.app.share.Not share link')}></EmptyTip>
|
||||
<EmptyTip text={t('common:core.app.share.Not share link')}></EmptyTip>
|
||||
)}
|
||||
<Loading loading={isFetching} fixed={false} />
|
||||
</Box>
|
||||
|
|
|
|||
|
|
@ -79,11 +79,11 @@ const SelectUsingWayModal = ({ share, onClose }: { share: OutLinkSchema; onClose
|
|||
|
||||
const wayMap = {
|
||||
[UsingWayEnum.link]: {
|
||||
blockTitle: t('core.app.outLink.Link block title'),
|
||||
blockTitle: t('common:core.app.outLink.Link block title'),
|
||||
code: linkUrl
|
||||
},
|
||||
[UsingWayEnum.iframe]: {
|
||||
blockTitle: t('core.app.outLink.Iframe block title'),
|
||||
blockTitle: t('common:core.app.outLink.Iframe block title'),
|
||||
code: `<iframe
|
||||
src="${linkUrl}"
|
||||
style="width: 100%; height: 100%;"
|
||||
|
|
@ -92,7 +92,7 @@ const SelectUsingWayModal = ({ share, onClose }: { share: OutLinkSchema; onClose
|
|||
/>`
|
||||
},
|
||||
[UsingWayEnum.script]: {
|
||||
blockTitle: t('core.app.outLink.Script block title'),
|
||||
blockTitle: t('common:core.app.outLink.Script block title'),
|
||||
code: `<script
|
||||
src="${baseUrl}/js/iframe.js"
|
||||
id="chatbot-iframe"
|
||||
|
|
@ -121,7 +121,7 @@ console.log("Chat box loaded")
|
|||
<MyModal
|
||||
isOpen
|
||||
iconSrc="/imgs/modal/usingWay.svg"
|
||||
title={t('core.app.outLink.Select Using Way')}
|
||||
title={t('common:core.app.outLink.Select Using Way')}
|
||||
onClose={onClose}
|
||||
maxW={['90vw', '700px']}
|
||||
>
|
||||
|
|
@ -146,21 +146,21 @@ console.log("Chat box loaded")
|
|||
fontSize={'sm'}
|
||||
>
|
||||
<Flex {...gridItemStyle}>
|
||||
<Box flex={1}>{t('core.app.outLink.Show History')}</Box>
|
||||
<Box flex={1}>{t('common:core.app.outLink.Show History')}</Box>
|
||||
<Switch {...register('showHistory')} />
|
||||
</Flex>
|
||||
{getValues('usingWay') === UsingWayEnum.script && (
|
||||
<>
|
||||
<Flex {...gridItemStyle}>
|
||||
<Box flex={1}>{t('core.app.outLink.Can Drag')}</Box>
|
||||
<Box flex={1}>{t('common:core.app.outLink.Can Drag')}</Box>
|
||||
<Switch {...register('scriptIconCanDrag')} />
|
||||
</Flex>
|
||||
<Flex {...gridItemStyle}>
|
||||
<Box flex={1}>{t('core.app.outLink.Default open')}</Box>
|
||||
<Box flex={1}>{t('common:core.app.outLink.Default open')}</Box>
|
||||
<Switch {...register('scriptDefaultOpen')} />
|
||||
</Flex>
|
||||
<Flex {...gridItemStyle}>
|
||||
<Box flex={1}>{t('core.app.outLink.Script Open Icon')}</Box>
|
||||
<Box flex={1}>{t('common:core.app.outLink.Script Open Icon')}</Box>
|
||||
<Image
|
||||
src={getValues('scriptOpenIcon')}
|
||||
alt={''}
|
||||
|
|
@ -171,7 +171,7 @@ console.log("Chat box loaded")
|
|||
/>
|
||||
</Flex>
|
||||
<Flex {...gridItemStyle}>
|
||||
<Box flex={1}>{t('core.app.outLink.Script Close Icon')}</Box>
|
||||
<Box flex={1}>{t('common:core.app.outLink.Script Close Icon')}</Box>
|
||||
<Image
|
||||
src={getValues('scriptCloseIcon')}
|
||||
alt={''}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ const Share = ({ appId }: { appId: string; type: PublishChannelEnum }) => {
|
|||
const [selectedLinkData, setSelectedLinkData] = useState<OutLinkSchema>();
|
||||
const { toast } = useToast();
|
||||
const { ConfirmModal, openConfirm } = useConfirm({
|
||||
content: t('support.outlink.Delete link tip'),
|
||||
content: t('common:support.outlink.Delete link tip'),
|
||||
type: 'delete'
|
||||
});
|
||||
|
||||
|
|
@ -77,9 +77,9 @@ const Share = ({ appId }: { appId: string; type: PublishChannelEnum }) => {
|
|||
<Flex justifyContent={'space-between'}>
|
||||
<HStack>
|
||||
<Box color={'myGray.900'} fontSize={'lg'}>
|
||||
{t('core.app.Share link')}
|
||||
{t('common:core.app.Share link')}
|
||||
</Box>
|
||||
<QuestionTip label={t('core.app.Share link desc detail')} />
|
||||
<QuestionTip label={t('common:core.app.Share link desc detail')} />
|
||||
</HStack>
|
||||
<Button
|
||||
variant={'whitePrimary'}
|
||||
|
|
@ -88,33 +88,33 @@ const Share = ({ appId }: { appId: string; type: PublishChannelEnum }) => {
|
|||
{...(shareChatList.length >= 10
|
||||
? {
|
||||
isDisabled: true,
|
||||
title: t('core.app.share.Amount limit tip')
|
||||
title: t('common:core.app.share.Amount limit tip')
|
||||
}
|
||||
: {})}
|
||||
onClick={() => setEditLinkData(defaultOutLinkForm)}
|
||||
>
|
||||
{t('core.app.share.Create link')}
|
||||
{t('common:core.app.share.Create link')}
|
||||
</Button>
|
||||
</Flex>
|
||||
<TableContainer mt={3}>
|
||||
<Table variant={'simple'} w={'100%'} overflowX={'auto'} fontSize={'sm'}>
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th>{t('common.Name')}</Th>
|
||||
<Th>{t('common:common.Name')}</Th>
|
||||
{feConfigs?.isPlus && (
|
||||
<>
|
||||
<Th>{t('common.Expired Time')}</Th>
|
||||
<Th>{t('common:common.Expired Time')}</Th>
|
||||
</>
|
||||
)}
|
||||
<Th>{t('support.outlink.Usage points')}</Th>
|
||||
<Th>{t('core.app.share.Is response quote')}</Th>
|
||||
<Th>{t('common:support.outlink.Usage points')}</Th>
|
||||
<Th>{t('common:core.app.share.Is response quote')}</Th>
|
||||
{feConfigs?.isPlus && (
|
||||
<>
|
||||
<Th>{t('core.app.share.Ip limit title')}</Th>
|
||||
<Th>{t('core.app.share.Role check')}</Th>
|
||||
<Th>{t('common:core.app.share.Ip limit title')}</Th>
|
||||
<Th>{t('common:core.app.share.Role check')}</Th>
|
||||
</>
|
||||
)}
|
||||
<Th>{t('common.Last use time')}</Th>
|
||||
<Th>{t('common:common.Last use time')}</Th>
|
||||
<Th></Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
|
|
@ -137,7 +137,7 @@ const Share = ({ appId }: { appId: string; type: PublishChannelEnum }) => {
|
|||
? `${
|
||||
item.limit?.maxUsagePoints && item.limit.maxUsagePoints > -1
|
||||
? ` / ${item.limit.maxUsagePoints}`
|
||||
: ` / ${t('common.Unlimited')}`
|
||||
: ` / ${t('common:common.Unlimited')}`
|
||||
}`
|
||||
: ''}
|
||||
</Td>
|
||||
|
|
@ -149,7 +149,9 @@ const Share = ({ appId }: { appId: string; type: PublishChannelEnum }) => {
|
|||
<Th>{item?.limit?.hookUrl ? '✔' : '✖'}</Th>
|
||||
</>
|
||||
)}
|
||||
<Td>{item.lastTime ? formatTimeToChatTime(item.lastTime) : t('common.Un used')}</Td>
|
||||
<Td>
|
||||
{item.lastTime ? formatTimeToChatTime(item.lastTime) : t('common:common.Un used')}
|
||||
</Td>
|
||||
<Td display={'flex'} alignItems={'center'}>
|
||||
<Button
|
||||
onClick={() => setSelectedLinkData(item as OutLinkSchema)}
|
||||
|
|
@ -157,7 +159,7 @@ const Share = ({ appId }: { appId: string; type: PublishChannelEnum }) => {
|
|||
mr={3}
|
||||
variant={'whitePrimary'}
|
||||
>
|
||||
{t('core.app.outLink.Select Mode')}
|
||||
{t('common:core.app.outLink.Select Mode')}
|
||||
</Button>
|
||||
<MyMenu
|
||||
Button={
|
||||
|
|
@ -173,7 +175,7 @@ const Share = ({ appId }: { appId: string; type: PublishChannelEnum }) => {
|
|||
{
|
||||
children: [
|
||||
{
|
||||
label: t('common.Edit'),
|
||||
label: t('common:common.Edit'),
|
||||
icon: 'edit',
|
||||
onClick: () =>
|
||||
setEditLinkData({
|
||||
|
|
@ -184,7 +186,7 @@ const Share = ({ appId }: { appId: string; type: PublishChannelEnum }) => {
|
|||
})
|
||||
},
|
||||
{
|
||||
label: t('common.Delete'),
|
||||
label: t('common:common.Delete'),
|
||||
icon: 'delete',
|
||||
type: 'danger',
|
||||
onClick: () =>
|
||||
|
|
@ -211,7 +213,7 @@ const Share = ({ appId }: { appId: string; type: PublishChannelEnum }) => {
|
|||
</TableContainer>
|
||||
|
||||
{shareChatList.length === 0 && !isFetching && (
|
||||
<EmptyTip text={t('core.app.share.Not share link')} />
|
||||
<EmptyTip text={t('common:core.app.share.Not share link')} />
|
||||
)}
|
||||
{!!editLinkData && (
|
||||
<EditLinkModal
|
||||
|
|
@ -220,14 +222,14 @@ const Share = ({ appId }: { appId: string; type: PublishChannelEnum }) => {
|
|||
defaultData={editLinkData}
|
||||
onCreate={(id) => {
|
||||
const url = `${location.origin}/chat/share?shareId=${id}`;
|
||||
copyData(url, t('core.app.share.Create link tip'));
|
||||
copyData(url, t('common:core.app.share.Create link tip'));
|
||||
refetchShareChatList();
|
||||
setEditLinkData(undefined);
|
||||
}}
|
||||
onEdit={() => {
|
||||
toast({
|
||||
status: 'success',
|
||||
title: t('common.Update Successful')
|
||||
title: t('common:common.Update Successful')
|
||||
});
|
||||
refetchShareChatList();
|
||||
setEditLinkData(undefined);
|
||||
|
|
@ -282,14 +284,14 @@ function EditLinkModal({
|
|||
appId,
|
||||
type
|
||||
}),
|
||||
errorToast: t('common.Create Failed'),
|
||||
errorToast: t('common:common.Create Failed'),
|
||||
onSuccess: onCreate
|
||||
});
|
||||
const { mutate: onclickUpdate, isLoading: updating } = useRequest({
|
||||
mutationFn: (e: OutLinkEditType) => {
|
||||
return putShareChat(e);
|
||||
},
|
||||
errorToast: t('common.Update Failed'),
|
||||
errorToast: t('common:common.Update Failed'),
|
||||
onSuccess: onEdit
|
||||
});
|
||||
|
||||
|
|
@ -301,12 +303,12 @@ function EditLinkModal({
|
|||
>
|
||||
<ModalBody>
|
||||
<Flex alignItems={'center'}>
|
||||
<FormLabel flex={'0 0 90px'}>{t('Name')}</FormLabel>
|
||||
<FormLabel flex={'0 0 90px'}>{t('common:Name')}</FormLabel>
|
||||
<Input
|
||||
placeholder={publishT('Link Name')}
|
||||
maxLength={20}
|
||||
{...register('name', {
|
||||
required: t('common.Name is empty') || 'Name is empty'
|
||||
required: t('common:common.Name is empty') || 'Name is empty'
|
||||
})}
|
||||
/>
|
||||
</Flex>
|
||||
|
|
@ -314,7 +316,7 @@ function EditLinkModal({
|
|||
<>
|
||||
<Flex alignItems={'center'} mt={4}>
|
||||
<FormLabel flex={'0 0 90px'} alignItems={'center'}>
|
||||
{t('common.Expired Time')}
|
||||
{t('common:common.Expired Time')}
|
||||
</FormLabel>
|
||||
<Input
|
||||
type="datetime-local"
|
||||
|
|
@ -345,8 +347,11 @@ function EditLinkModal({
|
|||
</Flex>
|
||||
<Flex alignItems={'center'} mt={4}>
|
||||
<Flex flex={'0 0 90px'} alignItems={'center'}>
|
||||
<FormLabel>{t('support.outlink.Max usage points')}</FormLabel>
|
||||
<QuestionTip ml={1} label={t('support.outlink.Max usage points tip')}></QuestionTip>
|
||||
<FormLabel>{t('common:support.outlink.Max usage points')}</FormLabel>
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('common:support.outlink.Max usage points tip')}
|
||||
></QuestionTip>
|
||||
</Flex>
|
||||
<Input
|
||||
{...register('limit.maxUsagePoints', {
|
||||
|
|
@ -382,7 +387,7 @@ function EditLinkModal({
|
|||
|
||||
<Flex alignItems={'center'} mt={4}>
|
||||
<Flex flex={'0 0 90px'} alignItems={'center'}>
|
||||
<FormLabel>{t('support.outlink.share.Response Quote')}</FormLabel>
|
||||
<FormLabel>{t('common:support.outlink.share.Response Quote')}</FormLabel>
|
||||
<QuestionTip
|
||||
ml={1}
|
||||
label={t('support.outlink.share.Response Quote tips' || '')}
|
||||
|
|
@ -394,13 +399,13 @@ function EditLinkModal({
|
|||
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} mr={3} onClick={onClose}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button
|
||||
isLoading={creating || updating}
|
||||
onClick={submitShareChat((data) => (isEdit ? onclickUpdate(data) : onclickCreate(data)))}
|
||||
>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -24,20 +24,20 @@ const OutLink = () => {
|
|||
const publishList = useRef([
|
||||
{
|
||||
icon: '/imgs/modal/shareFill.svg',
|
||||
title: t('core.app.Share link'),
|
||||
desc: t('core.app.Share link desc'),
|
||||
title: t('common:core.app.Share link'),
|
||||
desc: t('common:core.app.Share link desc'),
|
||||
value: PublishChannelEnum.share
|
||||
},
|
||||
{
|
||||
icon: 'support/outlink/apikeyFill',
|
||||
title: t('core.app.Api request'),
|
||||
desc: t('core.app.Api request desc'),
|
||||
title: t('common:core.app.Api request'),
|
||||
desc: t('common:core.app.Api request desc'),
|
||||
value: PublishChannelEnum.apikey
|
||||
}
|
||||
// {
|
||||
// icon: 'core/app/publish/lark',
|
||||
// title: t('core.app.publish.Fei shu bot'),
|
||||
// desc: t('core.app.publish.Fei Shu Bot Desc'),
|
||||
// title: t('common:core.app.publish.Fei shu bot'),
|
||||
// desc: t('common:core.app.publish.Fei Shu Bot Desc'),
|
||||
// value: PublishChannelEnum.feishu
|
||||
// }
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ const PublishHistoriesSlider = ({
|
|||
})
|
||||
}
|
||||
iconSrc="core/workflow/versionHistories"
|
||||
title={t('core.workflow.publish.histories')}
|
||||
title={t('common:core.workflow.publish.histories')}
|
||||
maxW={'300px'}
|
||||
px={0}
|
||||
showMask={false}
|
||||
|
|
@ -178,11 +178,11 @@ const PublishHistoriesSlider = ({
|
|||
{item._id === selectedHistoryId && (
|
||||
<PopoverConfirm
|
||||
showCancel
|
||||
content={t('core.workflow.publish.OnRevert version confirm')}
|
||||
content={t('common:core.workflow.publish.OnRevert version confirm')}
|
||||
onConfirm={() => onRevert(item)}
|
||||
Trigger={
|
||||
<Box>
|
||||
<MyTooltip label={t('core.workflow.publish.OnRevert version')}>
|
||||
<MyTooltip label={t('common:core.workflow.publish.OnRevert version')}>
|
||||
<MyIcon
|
||||
name={'core/workflow/revertVersion'}
|
||||
w={'20px'}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ const AppCard = () => {
|
|||
}));
|
||||
}
|
||||
},
|
||||
successToast: t('common.Success')
|
||||
successToast: t('common:common.Success')
|
||||
}
|
||||
);
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ const AppCard = () => {
|
|||
fontSize={'xs'}
|
||||
minH={'46px'}
|
||||
>
|
||||
{appDetail.intro || t('core.app.tip.Add a intro to app')}
|
||||
{appDetail.intro || t('common:core.app.tip.Add a intro to app')}
|
||||
</Box>
|
||||
<HStack alignItems={'flex-end'}>
|
||||
<Button
|
||||
|
|
@ -95,7 +95,7 @@ const AppCard = () => {
|
|||
leftIcon={<MyIcon name={'core/chat/chatLight'} w={'16px'} />}
|
||||
onClick={() => router.push(`/chat?appId=${appId}`)}
|
||||
>
|
||||
{t('core.Chat')}
|
||||
{t('common:core.Chat')}
|
||||
</Button>
|
||||
{appDetail.permission.hasManagePer && (
|
||||
<Button
|
||||
|
|
@ -104,7 +104,7 @@ const AppCard = () => {
|
|||
leftIcon={<MyIcon name={'common/settingLight'} w={'16px'} />}
|
||||
onClick={onOpenInfoEdit}
|
||||
>
|
||||
{t('common.Setting')}
|
||||
{t('common:common.Setting')}
|
||||
</Button>
|
||||
)}
|
||||
{appDetail.permission.isOwner && (
|
||||
|
|
@ -129,7 +129,7 @@ const AppCard = () => {
|
|||
? [
|
||||
{
|
||||
icon: 'core/chat/fileSelect',
|
||||
label: t('common.Team Tags Set'),
|
||||
label: t('common:common.Team Tags Set'),
|
||||
onClick: () => setTeamTagsSet(appDetail)
|
||||
}
|
||||
]
|
||||
|
|
@ -141,7 +141,7 @@ const AppCard = () => {
|
|||
{
|
||||
icon: 'delete',
|
||||
type: 'danger',
|
||||
label: t('common.Delete'),
|
||||
label: t('common:common.Delete'),
|
||||
onClick: onDelApp
|
||||
}
|
||||
]
|
||||
|
|
@ -173,10 +173,10 @@ const AppCard = () => {
|
|||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button variant={'whiteBase'} onClick={() => setTransitionCreateNew(undefined)} mr={3}>
|
||||
{t('common.Close')}
|
||||
{t('common:common.Close')}
|
||||
</Button>
|
||||
<Button variant={'dangerFill'} isLoading={transiting} onClick={() => onTransition()}>
|
||||
{t('common.Confirm')}
|
||||
{t('common:common.Confirm')}
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</MyModal>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ const ChatTest = ({ appForm }: { appForm: AppSimpleEditFormType }) => {
|
|||
<Box fontSize={['md', 'lg']} fontWeight={'bold'} flex={1} color={'myGray.900'}>
|
||||
{appT('Chat Debug')}
|
||||
</Box>
|
||||
<MyTooltip label={t('core.chat.Restart')}>
|
||||
<MyTooltip label={t('common:core.chat.Restart')}>
|
||||
<IconButton
|
||||
className="chat"
|
||||
size={'smSquare'}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue