| 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) | ||||
| <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 |
| 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', |
| 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', |
| 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', |
| chatColorThemeDesc: 'تم رنگی چتبات را تنظیم کنید', | chatColorThemeDesc: 'تم رنگی چتبات را تنظیم کنید', | ||||
| chatColorThemeInverted: 'معکوس', | chatColorThemeInverted: 'معکوس', | ||||
| invalidHexMessage: 'مقدار هگز نامعتبر', | invalidHexMessage: 'مقدار هگز نامعتبر', | ||||
| invalidPrivacyPolicy: 'لینک سیاست حفظ حریم خصوصی نامعتبر است. لطفاً از یک لینک معتبر که با http یا https شروع میشود استفاده کنید', | |||||
| more: { | more: { | ||||
| entry: 'نمایش تنظیمات بیشتر', | entry: 'نمایش تنظیمات بیشتر', | ||||
| copyright: 'حق نسخهبرداری', | copyright: 'حق نسخهبرداری', |
| 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', |
| chatColorThemeDesc: 'चैटबॉट का रंग थीम निर्धारित करें', | chatColorThemeDesc: 'चैटबॉट का रंग थीम निर्धारित करें', | ||||
| chatColorThemeInverted: 'उल्टा', | chatColorThemeInverted: 'उल्टा', | ||||
| invalidHexMessage: 'अमान्य हेक्स मान', | invalidHexMessage: 'अमान्य हेक्स मान', | ||||
| invalidPrivacyPolicy: 'गोपनीयता नीति लिंक अमान्य है। कृपया http या https से शुरू होने वाला एक वैध लिंक उपयोग करें।', | |||||
| more: { | more: { | ||||
| entry: 'अधिक सेटिंग्स दिखाएं', | entry: 'अधिक सेटिंग्स दिखाएं', | ||||
| copyright: 'कॉपीराइट', | copyright: 'कॉपीराइट', |
| 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', |
| chatColorThemeDesc: 'チャットボットのカラーテーマを設定します', | chatColorThemeDesc: 'チャットボットのカラーテーマを設定します', | ||||
| chatColorThemeInverted: '反転', | chatColorThemeInverted: '反転', | ||||
| invalidHexMessage: '無効な16進数値', | invalidHexMessage: '無効な16進数値', | ||||
| invalidPrivacyPolicy: '無効なプライバシーポリシーのリンクです。http または https で始まる有効なリンクを使用してください', | |||||
| more: { | more: { | ||||
| entry: 'その他の設定を表示', | entry: 'その他の設定を表示', | ||||
| copyright: '著作権', | copyright: '著作権', |
| chatColorThemeDesc: '챗봇의 색상 테마를 설정하세요', | chatColorThemeDesc: '챗봇의 색상 테마를 설정하세요', | ||||
| chatColorThemeInverted: '반전', | chatColorThemeInverted: '반전', | ||||
| invalidHexMessage: '잘못된 16진수 값', | invalidHexMessage: '잘못된 16진수 값', | ||||
| invalidPrivacyPolicy: '유효하지 않은 개인정보처리방침 링크입니다. http 또는 https로 시작하는 유효한 링크를 사용해 주세요', | |||||
| more: { | more: { | ||||
| entry: '추가 설정 보기', | entry: '추가 설정 보기', | ||||
| copyright: '저작권', | copyright: '저작권', |
| 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', |
| 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', |
| 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', |
| chatColorThemeDesc: 'Установите цветовую тему чат-бота', | chatColorThemeDesc: 'Установите цветовую тему чат-бота', | ||||
| chatColorThemeInverted: 'Инвертированные цвета', | chatColorThemeInverted: 'Инвертированные цвета', | ||||
| invalidHexMessage: 'Неверное HEX-значение', | invalidHexMessage: 'Неверное HEX-значение', | ||||
| invalidPrivacyPolicy: 'Недопустимая ссылка на политику конфиденциальности. Пожалуйста, используйте действительную ссылку, начинающуюся с http или https', | |||||
| sso: { | sso: { | ||||
| label: 'SSO аутентификация', | label: 'SSO аутентификация', | ||||
| title: 'WebApp SSO', | title: 'WebApp SSO', |
| 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', |
| chatColorThemeDesc: 'กําหนดธีมสีของแชทบอท', | chatColorThemeDesc: 'กําหนดธีมสีของแชทบอท', | ||||
| chatColorThemeInverted: 'คว่ำ', | chatColorThemeInverted: 'คว่ำ', | ||||
| invalidHexMessage: 'ค่าฐานสิบหกไม่ถูกต้อง', | invalidHexMessage: 'ค่าฐานสิบหกไม่ถูกต้อง', | ||||
| invalidPrivacyPolicy: 'ลิงก์นโยบายความเป็นส่วนตัวไม่ถูกต้อง โปรดใช้ลิงก์ที่ถูกต้องขึ้นต้นด้วย http หรือ https', | |||||
| sso: { | sso: { | ||||
| label: 'การรับรองความถูกต้องของ SSO', | label: 'การรับรองความถูกต้องของ SSO', | ||||
| title: 'เว็บแอป SSO', | title: 'เว็บแอป SSO', |
| 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ı', |
| chatColorThemeDesc: 'Встановіть тему кольору чат-бота', | chatColorThemeDesc: 'Встановіть тему кольору чат-бота', | ||||
| chatColorThemeInverted: 'Інвертовано', | chatColorThemeInverted: 'Інвертовано', | ||||
| invalidHexMessage: 'Недійсне шістнадцяткове значення', | invalidHexMessage: 'Недійсне шістнадцяткове значення', | ||||
| invalidPrivacyPolicy: 'Недійсне посилання на політику конфіденційності. Будь ласка, використовуйте дійсне посилання, яке починається з http або https', | |||||
| more: { | more: { | ||||
| entry: 'Показати додаткові налаштування', | entry: 'Показати додаткові налаштування', | ||||
| copyright: 'Авторське право', | copyright: 'Авторське право', |
| 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', |
| chatColorThemeDesc: '设置聊天机器人的颜色主题', | chatColorThemeDesc: '设置聊天机器人的颜色主题', | ||||
| chatColorThemeInverted: '反转', | chatColorThemeInverted: '反转', | ||||
| invalidHexMessage: '无效的十六进制值', | invalidHexMessage: '无效的十六进制值', | ||||
| invalidPrivacyPolicy: '无效的隐私政策链接,请使用以 http 或 https 开头的有效链接', | |||||
| sso: { | sso: { | ||||
| label: '单点登录认证', | label: '单点登录认证', | ||||
| title: 'WebApp SSO 认证', | title: 'WebApp SSO 认证', |
| chatColorThemeDesc: '設定聊天機器人的顏色主題', | chatColorThemeDesc: '設定聊天機器人的顏色主題', | ||||
| chatColorThemeInverted: '反轉', | chatColorThemeInverted: '反轉', | ||||
| invalidHexMessage: '無效的十六進制值', | invalidHexMessage: '無效的十六進制值', | ||||
| invalidPrivacyPolicy: '無效的隱私政策連結,請使用以 http 或 https 開頭的有效連結', | |||||
| more: { | more: { | ||||
| entry: '展示更多設定', | entry: '展示更多設定', | ||||
| copyright: '版權', | copyright: '版權', |