Merge branch 'langgenius:main' into fix-doc-TOC-style

pull/18314/head
GuanMu 1 year ago committed by GitHub
commit 4d54f088c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -7,7 +7,7 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next
### Run by source code ### Run by source code
Before starting the web frontend service, please make sure the following environment is ready. Before starting the web frontend service, please make sure the following environment is ready.
- [Node.js](https://nodejs.org) >= v18.x - [Node.js](https://nodejs.org) >= v22.11.x
- [pnpm](https://pnpm.io) v10.x - [pnpm](https://pnpm.io) v10.x
First, install the dependencies: First, install the dependencies:

@ -162,11 +162,22 @@ const SettingsModal: FC<ISettingsModalProps> = ({
return check return check
} }
const validatePrivacyPolicy = (privacyPolicy: string | null) => {
if (privacyPolicy === null || privacyPolicy?.length === 0)
return true
return privacyPolicy.startsWith('http://') || privacyPolicy.startsWith('https://')
}
if (inputInfo !== null) { if (inputInfo !== null) {
if (!validateColorHex(inputInfo.chatColorTheme)) { if (!validateColorHex(inputInfo.chatColorTheme)) {
notify({ type: 'error', message: t(`${prefixSettings}.invalidHexMessage`) }) notify({ type: 'error', message: t(`${prefixSettings}.invalidHexMessage`) })
return return
} }
if (!validatePrivacyPolicy(inputInfo.privacyPolicy)) {
notify({ type: 'error', message: t(`${prefixSettings}.invalidPrivacyPolicy`) })
return
}
} }
setSaveLoading(true) setSaveLoading(true)
@ -410,7 +421,7 @@ const SettingsModal: FC<ISettingsModalProps> = ({
<p className={cn('body-xs-regular pb-0.5 text-text-tertiary')}> <p className={cn('body-xs-regular pb-0.5 text-text-tertiary')}>
<Trans <Trans
i18nKey={`${prefixSettings}.more.privacyPolicyTip`} i18nKey={`${prefixSettings}.more.privacyPolicyTip`}
components={{ privacyPolicyLink: <Link href={'https://docs.dify.ai/user-agreement/privacy-policy'} target='_blank' rel='noopener noreferrer' className='text-text-accent' /> }} components={{ privacyPolicyLink: <Link href={'https://dify.ai/privacy'} target='_blank' rel='noopener noreferrer' className='text-text-accent' /> }}
/> />
</p> </p>
<Input <Input

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'Legen Sie das Farbschema des Chatbots fest', chatColorThemeDesc: 'Legen Sie das Farbschema des Chatbots fest',
chatColorThemeInverted: 'Invertiert', chatColorThemeInverted: 'Invertiert',
invalidHexMessage: 'Ungültiger Hex-Wert', invalidHexMessage: 'Ungültiger Hex-Wert',
invalidPrivacyPolicy: 'Ungültiger Link zur Datenschutzrichtlinie. Bitte verwenden Sie einen gültigen Link, der mit http oder https beginnt',
more: { more: {
entry: 'Mehr Einstellungen anzeigen', entry: 'Mehr Einstellungen anzeigen',
copyright: 'Urheberrecht', copyright: 'Urheberrecht',

@ -1,7 +1,7 @@
const translation = { const translation = {
title: 'Abruf-Test', title: 'Abruf-Test',
desc: 'Testen Sie die Treffereffektivität des Wissens anhand des gegebenen Abfragetextes.', desc: 'Testen Sie die Treffereffektivität des Wissens anhand des gegebenen Abfragetextes.',
dateTimeFormat: 'MM/TT/JJJJ hh:mm A', dateTimeFormat: 'MM/DD/YYYY hh:mm A',
recents: 'Kürzlich', recents: 'Kürzlich',
table: { table: {
header: { header: {

@ -57,6 +57,7 @@ const translation = {
chatColorThemeDesc: 'Set the color theme of the chatbot', chatColorThemeDesc: 'Set the color theme of the chatbot',
chatColorThemeInverted: 'Inverted', chatColorThemeInverted: 'Inverted',
invalidHexMessage: 'Invalid hex value', invalidHexMessage: 'Invalid hex value',
invalidPrivacyPolicy: 'Invalid privacy policy link. Please use a valid link that starts with http or https',
sso: { sso: {
label: 'SSO Enforcement', label: 'SSO Enforcement',
title: 'WebApp SSO', title: 'WebApp SSO',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'Establece el tema de color del chatbot', chatColorThemeDesc: 'Establece el tema de color del chatbot',
chatColorThemeInverted: 'Invertido', chatColorThemeInverted: 'Invertido',
invalidHexMessage: 'Valor hexadecimal no válido', invalidHexMessage: 'Valor hexadecimal no válido',
invalidPrivacyPolicy: 'Enlace de política de privacidad no válido. Por favor, utiliza un enlace válido que comience con http o https',
more: { more: {
entry: 'Mostrar más configuraciones', entry: 'Mostrar más configuraciones',
copyright: 'Derechos de autor', copyright: 'Derechos de autor',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'تم رنگی چت‌بات را تنظیم کنید', chatColorThemeDesc: 'تم رنگی چت‌بات را تنظیم کنید',
chatColorThemeInverted: 'معکوس', chatColorThemeInverted: 'معکوس',
invalidHexMessage: 'مقدار هگز نامعتبر', invalidHexMessage: 'مقدار هگز نامعتبر',
invalidPrivacyPolicy: 'لینک سیاست حفظ حریم خصوصی نامعتبر است. لطفاً از یک لینک معتبر که با http یا https شروع میشود استفاده کنید',
more: { more: {
entry: 'نمایش تنظیمات بیشتر', entry: 'نمایش تنظیمات بیشتر',
copyright: 'حق نسخه‌برداری', copyright: 'حق نسخه‌برداری',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'Définir le thème de couleur du chatbot', chatColorThemeDesc: 'Définir le thème de couleur du chatbot',
chatColorThemeInverted: 'Inversé', chatColorThemeInverted: 'Inversé',
invalidHexMessage: 'Valeur hexadécimale invalide', invalidHexMessage: 'Valeur hexadécimale invalide',
invalidPrivacyPolicy: 'Lien de politique de confidentialité invalide. Veuillez utiliser un lien valide commençant par http ou https',
more: { more: {
entry: 'Afficher plus de paramètres', entry: 'Afficher plus de paramètres',
copyright: 'Droits d\'auteur', copyright: 'Droits d\'auteur',

@ -59,6 +59,7 @@ const translation = {
chatColorThemeDesc: 'चैटबॉट का रंग थीम निर्धारित करें', chatColorThemeDesc: 'चैटबॉट का रंग थीम निर्धारित करें',
chatColorThemeInverted: 'उल्टा', chatColorThemeInverted: 'उल्टा',
invalidHexMessage: 'अमान्य हेक्स मान', invalidHexMessage: 'अमान्य हेक्स मान',
invalidPrivacyPolicy: 'गोपनीयता नीति लिंक अमान्य है। कृपया http या https से शुरू होने वाला एक वैध लिंक उपयोग करें।',
more: { more: {
entry: 'अधिक सेटिंग्स दिखाएं', entry: 'अधिक सेटिंग्स दिखाएं',
copyright: 'कॉपीराइट', copyright: 'कॉपीराइट',

@ -59,6 +59,7 @@ const translation = {
chatColorThemeDesc: 'Imposta il tema colore del chatbot', chatColorThemeDesc: 'Imposta il tema colore del chatbot',
chatColorThemeInverted: 'Inverso', chatColorThemeInverted: 'Inverso',
invalidHexMessage: 'Valore esadecimale non valido', invalidHexMessage: 'Valore esadecimale non valido',
invalidPrivacyPolicy: 'Link alla privacy policy non valido. Si prega di utilizzare un link valido che inizi con http o https',
more: { more: {
entry: 'Mostra più impostazioni', entry: 'Mostra più impostazioni',
copyright: 'Copyright', copyright: 'Copyright',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'チャットボットのカラーテーマを設定します', chatColorThemeDesc: 'チャットボットのカラーテーマを設定します',
chatColorThemeInverted: '反転', chatColorThemeInverted: '反転',
invalidHexMessage: '無効な16進数値', invalidHexMessage: '無効な16進数値',
invalidPrivacyPolicy: '無効なプライバシーポリシーのリンクです。http または https で始まる有効なリンクを使用してください',
more: { more: {
entry: 'その他の設定を表示', entry: 'その他の設定を表示',
copyright: '著作権', copyright: '著作権',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: '챗봇의 색상 테마를 설정하세요', chatColorThemeDesc: '챗봇의 색상 테마를 설정하세요',
chatColorThemeInverted: '반전', chatColorThemeInverted: '반전',
invalidHexMessage: '잘못된 16진수 값', invalidHexMessage: '잘못된 16진수 값',
invalidPrivacyPolicy: '유효하지 않은 개인정보처리방침 링크입니다. http 또는 https로 시작하는 유효한 링크를 사용해 주세요',
more: { more: {
entry: '추가 설정 보기', entry: '추가 설정 보기',
copyright: '저작권', copyright: '저작권',

@ -59,6 +59,7 @@ const translation = {
chatColorThemeDesc: 'Ustaw motyw kolorystyczny czatu', chatColorThemeDesc: 'Ustaw motyw kolorystyczny czatu',
chatColorThemeInverted: 'Odwrócony', chatColorThemeInverted: 'Odwrócony',
invalidHexMessage: 'Nieprawidłowa wartość heksadecymalna', invalidHexMessage: 'Nieprawidłowa wartość heksadecymalna',
invalidPrivacyPolicy: 'Nieprawidłowy link do polityki prywatności. Proszę użyć prawidłowego linku zaczynającego się od http lub https',
more: { more: {
entry: 'Pokaż więcej ustawień', entry: 'Pokaż więcej ustawień',
copyright: 'Prawa autorskie', copyright: 'Prawa autorskie',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'Defina o tema de cor do chatbot', chatColorThemeDesc: 'Defina o tema de cor do chatbot',
chatColorThemeInverted: 'Inve', chatColorThemeInverted: 'Inve',
invalidHexMessage: 'Valor hex inválido', invalidHexMessage: 'Valor hex inválido',
invalidPrivacyPolicy: 'Link de política de privacidade inválido. Por favor, use um link válido que comece com http ou https',
more: { more: {
entry: 'Mostrar mais configurações', entry: 'Mostrar mais configurações',
copyright: 'Direitos autorais', copyright: 'Direitos autorais',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'Setați tema de culoare a chatbotului', chatColorThemeDesc: 'Setați tema de culoare a chatbotului',
chatColorThemeInverted: 'Inversat', chatColorThemeInverted: 'Inversat',
invalidHexMessage: 'Valoare hex nevalidă', invalidHexMessage: 'Valoare hex nevalidă',
invalidPrivacyPolicy: 'Link politică de confidențialitate invalid. Vă rugăm să folosiți un link valid care începe cu http sau https',
more: { more: {
entry: 'Afișați mai multe setări', entry: 'Afișați mai multe setări',
copyright: 'Drepturi de autor', copyright: 'Drepturi de autor',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'Установите цветовую тему чат-бота', chatColorThemeDesc: 'Установите цветовую тему чат-бота',
chatColorThemeInverted: 'Инвертированные цвета', chatColorThemeInverted: 'Инвертированные цвета',
invalidHexMessage: 'Неверное HEX-значение', invalidHexMessage: 'Неверное HEX-значение',
invalidPrivacyPolicy: 'Недопустимая ссылка на политику конфиденциальности. Пожалуйста, используйте действительную ссылку, начинающуюся с http или https',
sso: { sso: {
label: 'SSO аутентификация', label: 'SSO аутентификация',
title: 'WebApp SSO', title: 'WebApp SSO',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'Nastavite barvno temo klepetalnega bota', chatColorThemeDesc: 'Nastavite barvno temo klepetalnega bota',
chatColorThemeInverted: 'Inverzna', chatColorThemeInverted: 'Inverzna',
invalidHexMessage: 'Neveljavna vrednost heksa', invalidHexMessage: 'Neveljavna vrednost heksa',
invalidPrivacyPolicy: 'Neveljavna povezava do pravilnika o zasebnosti. Uporabite veljavno povezavo, ki se začne z http ali https',
sso: { sso: {
label: 'SSO avtentikacija', label: 'SSO avtentikacija',
title: 'SSO spletne aplikacije', title: 'SSO spletne aplikacije',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'กําหนดธีมสีของแชทบอท', chatColorThemeDesc: 'กําหนดธีมสีของแชทบอท',
chatColorThemeInverted: 'คว่ำ', chatColorThemeInverted: 'คว่ำ',
invalidHexMessage: 'ค่าฐานสิบหกไม่ถูกต้อง', invalidHexMessage: 'ค่าฐานสิบหกไม่ถูกต้อง',
invalidPrivacyPolicy: 'ลิงก์นโยบายความเป็นส่วนตัวไม่ถูกต้อง โปรดใช้ลิงก์ที่ถูกต้องขึ้นต้นด้วย http หรือ https',
sso: { sso: {
label: 'การรับรองความถูกต้องของ SSO', label: 'การรับรองความถูกต้องของ SSO',
title: 'เว็บแอป SSO', title: 'เว็บแอป SSO',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'Sohbet botunun renk temasını ayarlayın', chatColorThemeDesc: 'Sohbet botunun renk temasını ayarlayın',
chatColorThemeInverted: 'Tersine çevrilmiş', chatColorThemeInverted: 'Tersine çevrilmiş',
invalidHexMessage: 'Geçersiz hex değeri', invalidHexMessage: 'Geçersiz hex değeri',
invalidPrivacyPolicy: 'Geçersiz gizlilik politikası bağlantısı. Lütfen http veya https ile başlayan geçerli bir bağlantı kullanın',
more: { more: {
entry: 'Daha fazla ayarı göster', entry: 'Daha fazla ayarı göster',
copyright: 'Telif Hakkı', copyright: 'Telif Hakkı',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'Встановіть тему кольору чат-бота', chatColorThemeDesc: 'Встановіть тему кольору чат-бота',
chatColorThemeInverted: 'Інвертовано', chatColorThemeInverted: 'Інвертовано',
invalidHexMessage: 'Недійсне шістнадцяткове значення', invalidHexMessage: 'Недійсне шістнадцяткове значення',
invalidPrivacyPolicy: 'Недійсне посилання на політику конфіденційності. Будь ласка, використовуйте дійсне посилання, яке починається з http або https',
more: { more: {
entry: 'Показати додаткові налаштування', entry: 'Показати додаткові налаштування',
copyright: 'Авторське право', copyright: 'Авторське право',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: 'Thiết lập giao diện màu của chatbot', chatColorThemeDesc: 'Thiết lập giao diện màu của chatbot',
chatColorThemeInverted: 'Đảo ngược', chatColorThemeInverted: 'Đảo ngược',
invalidHexMessage: 'Giá trị mã màu không hợp lệ', invalidHexMessage: 'Giá trị mã màu không hợp lệ',
invalidPrivacyPolicy: 'Liên kết chính sách bảo mật không hợp lệ. Vui lòng sử dụng liên kết hợp lệ bắt đầu bằng http hoặc https',
more: { more: {
entry: 'Hiển thị thêm cài đặt', entry: 'Hiển thị thêm cài đặt',
copyright: 'Bản quyền', copyright: 'Bản quyền',

@ -57,6 +57,7 @@ const translation = {
chatColorThemeDesc: '设置聊天机器人的颜色主题', chatColorThemeDesc: '设置聊天机器人的颜色主题',
chatColorThemeInverted: '反转', chatColorThemeInverted: '反转',
invalidHexMessage: '无效的十六进制值', invalidHexMessage: '无效的十六进制值',
invalidPrivacyPolicy: '无效的隐私政策链接,请使用以 http 或 https 开头的有效链接',
sso: { sso: {
label: '单点登录认证', label: '单点登录认证',
title: 'WebApp SSO 认证', title: 'WebApp SSO 认证',

@ -55,6 +55,7 @@ const translation = {
chatColorThemeDesc: '設定聊天機器人的顏色主題', chatColorThemeDesc: '設定聊天機器人的顏色主題',
chatColorThemeInverted: '反轉', chatColorThemeInverted: '反轉',
invalidHexMessage: '無效的十六進制值', invalidHexMessage: '無效的十六進制值',
invalidPrivacyPolicy: '無效的隱私政策連結,請使用以 http 或 https 開頭的有效連結',
more: { more: {
entry: '展示更多設定', entry: '展示更多設定',
copyright: '版權', copyright: '版權',

@ -3,7 +3,7 @@
"version": "1.2.0", "version": "1.2.0",
"private": true, "private": true,
"engines": { "engines": {
"node": ">=18.18.0" "node": ">=v22.11.0"
}, },
"scripts": { "scripts": {
"dev": "cross-env NODE_OPTIONS='--inspect' next dev", "dev": "cross-env NODE_OPTIONS='--inspect' next dev",

Loading…
Cancel
Save