Skip to content

Commit f5512bd

Browse files
perf: Advanced Assistant supports third-party front-end and back-end decoupled integration
1 parent b05d90c commit f5512bd

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

frontend/src/i18n/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@
669669
"interface_url": "Interface URL",
670670
"format_is_incorrect": "format is incorrect{msg}",
671671
"domain_format_incorrect": ", start with http:// or https://, no trailing slash (/), multiple domains separated by semicolons",
672-
"interface_url_incorrect": ",enter a relative path starting with /",
672+
"interface_url_incorrect": ", enter a relative path starting with /, or an absolute path starting with http:// or https://",
673673
"aes_enable": "Enable AES encryption",
674674
"aes_enable_tips": "The fields (host, user, password, dataBase, schema) are all encrypted using the AES-CBC-PKCS5Padding encryption method",
675675
"bit": "bit",

frontend/src/i18n/ko-KR.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@
668668
"interface_url": "인터페이스 URL",
669669
"format_is_incorrect": "형식이 올바르지 않습니다{msg}",
670670
"domain_format_incorrect": ", http:// 또는 https://로 시작해야 하며, 슬래시(/)로 끝날 수 없습니다. 여러 도메인은 세미콜론으로 구분합니다",
671-
"interface_url_incorrect": ", 상대 경로를 입력해주세요. /로 시작합니다",
671+
"interface_url_incorrect": ", 상대 경로는 /로 시작하거나, 절대 경로는 http:// 또는 https://로 시작하는 경로를 입력해 주세요.",
672672
"aes_enable": "AES 암호화 활성화",
673673
"aes_enable_tips": "암호화 필드 (host, user, password, dataBase, schema)는 모두 AES-CBC-PKCS5Padding 암호화 방식을 사용합니다",
674674
"bit": "비트",
@@ -948,4 +948,4 @@
948948
"to_doc": "API 보기",
949949
"trigger_limit": "최대 {0}개의 API 키 생성 지원"
950950
}
951-
}
951+
}

frontend/src/i18n/zh-CN.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@
668668
"interface_url": "接口 URL",
669669
"format_is_incorrect": "格式不对{msg}",
670670
"domain_format_incorrect": ",http或https开头,不能以 / 结尾,多个域名以分号(半角)分隔",
671-
"interface_url_incorrect": ",请填写相对路径,以/开头",
671+
"interface_url_incorrect": ",请填写相对路径,以/开头,或者绝对路径以http或https开头",
672672
"aes_enable": "开启 AES 加密",
673673
"aes_enable_tips": "加密字段 (host, user, password, dataBase, schema) 均采用 AES-CBC-PKCS5Padding 加密方式",
674674
"bit": "",
@@ -777,11 +777,11 @@
777777
"log_question": "本次提问",
778778
"log_answer": "AI 回答",
779779
"log_history": "历史记录",
780-
"find_term_title":"匹配到 {0} 个术语",
781-
"find_sql_sample_title":"匹配到 {0} 个SQL示例",
782-
"find_custom_prompt_title":"匹配到 {0} 个自定义提示词",
783-
"query_count_title":"查询到 {0} 条数据",
784-
"generate_picture_success":"已生成图片"
780+
"find_term_title": "匹配到 {0} 个术语",
781+
"find_sql_sample_title": "匹配到 {0} 个SQL示例",
782+
"find_custom_prompt_title": "匹配到 {0} 个自定义提示词",
783+
"query_count_title": "查询到 {0} 条数据",
784+
"generate_picture_success": "已生成图片"
785785
},
786786
"about": {
787787
"title": "关于",

frontend/src/views/system/embedded/iframe.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,10 @@ const validatePass = (_: any, value: any, callback: any) => {
325325
} else {
326326
// var Expression = /(https?:\/\/)?([\da-z\.-]+)\.([a-z]{2,6})(:\d{1,5})?([\/\w\.-]*)*\/?(#[\S]+)?/ // eslint-disable-line
327327
// var Expression = /^https?:\/\/[^\s/?#]+(:\d+)?/i
328+
const absoluteUrlRegex = /^https?:\/\/[^\s/?#]+(:\d+)?(\/[^\s?#]*)?(\?[^\s#]*)?(#\S*)?$/i
328329
var Expression = /^\/([a-zA-Z0-9_-]+\/)*[a-zA-Z0-9_-]+(\?[a-zA-Z0-9_=&-]+)?$/
329330
var objExp = new RegExp(Expression)
330-
if (objExp.test(value)) {
331+
if (objExp.test(value) || absoluteUrlRegex.test(value)) {
331332
callback()
332333
} else {
333334
callback(t('embedded.format_is_incorrect', { msg: t('embedded.interface_url_incorrect') }))

0 commit comments

Comments
 (0)