mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-25 01:43:27 +08:00
Feat: add open-in-new-tab button to search share embed dialog (#17159)
This commit is contained in:
@@ -55,7 +55,7 @@ export default {
|
||||
submit: 'إرسال',
|
||||
clear: 'مسح',
|
||||
embedIntoSite: 'تضمين في صفحة الويب',
|
||||
openInNewTab: 'الدردشة في علامة تبويب جديدة',
|
||||
openInNewTab: 'فتح في علامة تبويب جديدة',
|
||||
previousPage: 'سابق',
|
||||
nextPage: 'التالي',
|
||||
add: 'يضيف',
|
||||
|
||||
@@ -49,7 +49,7 @@ export default {
|
||||
submit: 'Absenden',
|
||||
clear: 'Leeren',
|
||||
embedIntoSite: 'In Webseite einbetten',
|
||||
openInNewTab: 'Chat in neuem Tab',
|
||||
openInNewTab: 'In neuem Tab öffnen',
|
||||
previousPage: 'Zurück',
|
||||
nextPage: 'Weiter',
|
||||
add: 'Hinzufügen',
|
||||
|
||||
@@ -61,7 +61,7 @@ export default {
|
||||
submit: 'Submit',
|
||||
clear: 'Clear',
|
||||
embedIntoSite: 'Embed into webpage',
|
||||
openInNewTab: 'Chat in new tab',
|
||||
openInNewTab: 'Open in new tab',
|
||||
previousPage: 'Previous',
|
||||
nextPage: 'Next',
|
||||
previous: 'Previous',
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
submit: 'Soumettre',
|
||||
clear: 'Effacer',
|
||||
embedIntoSite: 'Intégrer dans la page web',
|
||||
openInNewTab: 'Chat dans un nouvel onglet',
|
||||
openInNewTab: 'Ouvrir dans un nouvel onglet',
|
||||
previousPage: 'Précédent',
|
||||
nextPage: 'Suivant',
|
||||
previous: 'Précédent',
|
||||
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
submit: 'Invia',
|
||||
clear: 'Cancella',
|
||||
embedIntoSite: 'Incorpora nella pagina web',
|
||||
openInNewTab: 'Chat in una nuova scheda',
|
||||
openInNewTab: 'Apri in una nuova scheda',
|
||||
previousPage: 'Precedente',
|
||||
nextPage: 'Successivo',
|
||||
previous: 'Precedente',
|
||||
|
||||
@@ -62,7 +62,7 @@ export default {
|
||||
viewLess: '表示を減らす',
|
||||
clear: 'クリア',
|
||||
embedIntoSite: 'Webページに埋め込む',
|
||||
openInNewTab: '新しいタブでチャット',
|
||||
openInNewTab: '新しいタブで開く',
|
||||
previousPage: '前へ',
|
||||
nextPage: '次へ',
|
||||
previous: '前へ',
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
submit: '적용',
|
||||
clear: '초기화',
|
||||
embedIntoSite: '웹페이지에 임베드',
|
||||
openInNewTab: '새 탭에서 채팅',
|
||||
openInNewTab: '새 탭에서 열기',
|
||||
previousPage: '이전',
|
||||
nextPage: '다음',
|
||||
previous: '이전',
|
||||
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
pleaseInput: 'Por favor, insira',
|
||||
submit: 'Enviar',
|
||||
embedIntoSite: 'Incorporar no site',
|
||||
openInNewTab: 'Chat em nova aba',
|
||||
openInNewTab: 'Abrir em nova aba',
|
||||
previousPage: 'Anterior',
|
||||
nextPage: 'Próxima',
|
||||
owner: 'Proprietário',
|
||||
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
submit: 'Отправить',
|
||||
clear: 'Очистить',
|
||||
embedIntoSite: 'Встроить на веб-страницу',
|
||||
openInNewTab: 'Чат в новой вкладке',
|
||||
openInNewTab: 'Открыть в новой вкладке',
|
||||
previousPage: 'Назад',
|
||||
nextPage: 'Вперед',
|
||||
add: 'Добавить',
|
||||
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
submit: 'Gönder',
|
||||
clear: 'Temizle',
|
||||
embedIntoSite: 'Web sayfasına göm',
|
||||
openInNewTab: 'Yeni sekmede sohbet et',
|
||||
openInNewTab: 'Yeni sekmede aç',
|
||||
previousPage: 'Önceki',
|
||||
nextPage: 'Sonraki',
|
||||
previous: 'Önceki',
|
||||
|
||||
@@ -40,7 +40,7 @@ export default {
|
||||
spanish: 'Tiếng Tây Ban Nha',
|
||||
japanese: 'Tiếng Nhật',
|
||||
embedIntoSite: 'Nhúng vào trang web',
|
||||
openInNewTab: 'Chat trong tab mới',
|
||||
openInNewTab: 'Mở trong tab mới',
|
||||
nextPage: 'Tới',
|
||||
previousPage: 'Lùi',
|
||||
owner: 'Chủ sở hữu',
|
||||
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
pleaseInput: '請輸入',
|
||||
submit: '提交',
|
||||
embedIntoSite: '嵌入網站',
|
||||
openInNewTab: '在新標籤頁中聊天',
|
||||
openInNewTab: '在新標籤頁中開啟',
|
||||
previousPage: '上一頁',
|
||||
nextPage: '下一頁',
|
||||
add: '添加',
|
||||
|
||||
@@ -50,7 +50,7 @@ export default {
|
||||
submit: '提交',
|
||||
clear: '清空',
|
||||
embedIntoSite: '嵌入网站',
|
||||
openInNewTab: '在新标签页中聊天',
|
||||
openInNewTab: '在新标签页中打开',
|
||||
previousPage: '上一页',
|
||||
nextPage: '下一页',
|
||||
previous: '上一步',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import HighLightMarkdown from '@/components/highlight-markdown';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import message from '@/components/ui/message';
|
||||
import { Modal } from '@/components/ui/modal/modal';
|
||||
import { RAGFlowSelect } from '@/components/ui/select';
|
||||
@@ -9,6 +10,7 @@ import {
|
||||
} from '@/constants/common';
|
||||
import { useTranslate } from '@/hooks/common-hooks';
|
||||
import { useFetchTenantInfo } from '@/hooks/use-user-setting-request';
|
||||
import { ExternalLink } from 'lucide-react';
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
|
||||
type IEmbedAppModalProps = {
|
||||
@@ -48,6 +50,10 @@ const EmbedAppModal = (props: IEmbedAppModalProps) => {
|
||||
return src;
|
||||
}, [beta, from, token, hideAvatar, locale, url, tenantId]);
|
||||
|
||||
const handleOpenInNewTab = useCallback(() => {
|
||||
window.open(generateIframeSrc(), '_blank');
|
||||
}, [generateIframeSrc]);
|
||||
|
||||
// ... existing code ...
|
||||
const text = useMemo(() => {
|
||||
const iframeSrc = generateIframeSrc();
|
||||
@@ -108,6 +114,18 @@ const EmbedAppModal = (props: IEmbedAppModalProps) => {
|
||||
{/* </div> */}
|
||||
</div>
|
||||
|
||||
{/* Open In New Tab */}
|
||||
<div className="mb-6">
|
||||
<Button
|
||||
onClick={handleOpenInNewTab}
|
||||
className="w-full"
|
||||
variant="secondary"
|
||||
>
|
||||
<ExternalLink className="mr-2 h-4 w-4" />
|
||||
{t('openInNewTab', { keyPrefix: 'common' })}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{/* ID Field */}
|
||||
<div className="mb-4">
|
||||
<label className="block text-sm font-medium mb-2">{t('id')}</label>
|
||||
|
||||
Reference in New Issue
Block a user