From f5512bdd29db9dafe8a9d5d5c61787e2d8a5d555 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 30 Mar 2026 11:30:34 +0800 Subject: [PATCH] perf: Advanced Assistant supports third-party front-end and back-end decoupled integration --- frontend/src/i18n/en.json | 2 +- frontend/src/i18n/ko-KR.json | 4 ++-- frontend/src/i18n/zh-CN.json | 12 ++++++------ frontend/src/views/system/embedded/iframe.vue | 3 ++- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 13cb9b8c..0e5cdafb 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -669,7 +669,7 @@ "interface_url": "Interface URL", "format_is_incorrect": "format is incorrect{msg}", "domain_format_incorrect": ", start with http:// or https://, no trailing slash (/), multiple domains separated by semicolons", - "interface_url_incorrect": ",enter a relative path starting with /", + "interface_url_incorrect": ", enter a relative path starting with /, or an absolute path starting with http:// or https://", "aes_enable": "Enable AES encryption", "aes_enable_tips": "The fields (host, user, password, dataBase, schema) are all encrypted using the AES-CBC-PKCS5Padding encryption method", "bit": "bit", diff --git a/frontend/src/i18n/ko-KR.json b/frontend/src/i18n/ko-KR.json index aa1b38bd..474aa51c 100644 --- a/frontend/src/i18n/ko-KR.json +++ b/frontend/src/i18n/ko-KR.json @@ -668,7 +668,7 @@ "interface_url": "인터페이스 URL", "format_is_incorrect": "형식이 올바르지 않습니다{msg}", "domain_format_incorrect": ", http:// 또는 https://로 시작해야 하며, 슬래시(/)로 끝날 수 없습니다. 여러 도메인은 세미콜론으로 구분합니다", - "interface_url_incorrect": ", 상대 경로를 입력해주세요. /로 시작합니다", + "interface_url_incorrect": ", 상대 경로는 /로 시작하거나, 절대 경로는 http:// 또는 https://로 시작하는 경로를 입력해 주세요.", "aes_enable": "AES 암호화 활성화", "aes_enable_tips": "암호화 필드 (host, user, password, dataBase, schema)는 모두 AES-CBC-PKCS5Padding 암호화 방식을 사용합니다", "bit": "비트", @@ -948,4 +948,4 @@ "to_doc": "API 보기", "trigger_limit": "최대 {0}개의 API 키 생성 지원" } -} \ No newline at end of file +} diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index 5c7a7843..f27cdb05 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -668,7 +668,7 @@ "interface_url": "接口 URL", "format_is_incorrect": "格式不对{msg}", "domain_format_incorrect": ",http或https开头,不能以 / 结尾,多个域名以分号(半角)分隔", - "interface_url_incorrect": ",请填写相对路径,以/开头", + "interface_url_incorrect": ",请填写相对路径,以/开头,或者绝对路径以http或https开头", "aes_enable": "开启 AES 加密", "aes_enable_tips": "加密字段 (host, user, password, dataBase, schema) 均采用 AES-CBC-PKCS5Padding 加密方式", "bit": "位", @@ -777,11 +777,11 @@ "log_question": "本次提问", "log_answer": "AI 回答", "log_history": "历史记录", - "find_term_title":"匹配到 {0} 个术语", - "find_sql_sample_title":"匹配到 {0} 个SQL示例", - "find_custom_prompt_title":"匹配到 {0} 个自定义提示词", - "query_count_title":"查询到 {0} 条数据", - "generate_picture_success":"已生成图片" + "find_term_title": "匹配到 {0} 个术语", + "find_sql_sample_title": "匹配到 {0} 个SQL示例", + "find_custom_prompt_title": "匹配到 {0} 个自定义提示词", + "query_count_title": "查询到 {0} 条数据", + "generate_picture_success": "已生成图片" }, "about": { "title": "关于", diff --git a/frontend/src/views/system/embedded/iframe.vue b/frontend/src/views/system/embedded/iframe.vue index 76978f0a..b9df371a 100644 --- a/frontend/src/views/system/embedded/iframe.vue +++ b/frontend/src/views/system/embedded/iframe.vue @@ -325,9 +325,10 @@ const validatePass = (_: any, value: any, callback: any) => { } else { // var Expression = /(https?:\/\/)?([\da-z\.-]+)\.([a-z]{2,6})(:\d{1,5})?([\/\w\.-]*)*\/?(#[\S]+)?/ // eslint-disable-line // var Expression = /^https?:\/\/[^\s/?#]+(:\d+)?/i + const absoluteUrlRegex = /^https?:\/\/[^\s/?#]+(:\d+)?(\/[^\s?#]*)?(\?[^\s#]*)?(#\S*)?$/i var Expression = /^\/([a-zA-Z0-9_-]+\/)*[a-zA-Z0-9_-]+(\?[a-zA-Z0-9_=&-]+)?$/ var objExp = new RegExp(Expression) - if (objExp.test(value)) { + if (objExp.test(value) || absoluteUrlRegex.test(value)) { callback() } else { callback(t('embedded.format_is_incorrect', { msg: t('embedded.interface_url_incorrect') }))