diff --git a/frontend/src/components/UploadToast.tsx b/frontend/src/components/UploadToast.tsx index 67704743..dbd23f64 100644 --- a/frontend/src/components/UploadToast.tsx +++ b/frontend/src/components/UploadToast.tsx @@ -2,11 +2,7 @@ import { useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { useTranslation } from 'react-i18next'; -import { - selectUploadTasks, - dismissUploadTask, - clearCompletedTasks, -} from '../upload/uploadSlice'; +import { selectUploadTasks, dismissUploadTask } from '../upload/uploadSlice'; import ChevronDown from '../assets/chevron-down.svg'; import CheckCircleFilled from '../assets/check-circle-filled.svg'; import WarnIcon from '../assets/warn.svg'; @@ -37,7 +33,7 @@ export default function UploadToast() { case 'uploading': return t('modals.uploadDoc.progress.upload'); case 'training': - return t('modals.uploadDoc.progress.training'); + return t('modals.uploadDoc.progress.upload'); case 'completed': return t('modals.uploadDoc.progress.completed'); case 'failed': @@ -100,7 +96,7 @@ export default function UploadToast() { src={ChevronDown} alt="" className={`h-4 w-4 transform transition-transform duration-200 dark:invert ${ - isCollapsed ? '' : 'rotate-180' + isCollapsed ? 'rotate-180' : '' }`} /> @@ -228,17 +224,6 @@ export default function UploadToast() { ); })} - - {uploadTasks.some( - (task) => task.status === 'completed' || task.status === 'failed', - ) && ( - - )} ); } diff --git a/frontend/src/locale/en.json b/frontend/src/locale/en.json index 0d765edf..25a8fb9e 100644 --- a/frontend/src/locale/en.json +++ b/frontend/src/locale/en.json @@ -260,8 +260,8 @@ }, "progress": { "upload": "Upload is in progress", - "training": "Training is in progress", - "completed": "Training completed", + "training": "Upload is in progress", + "completed": "Upload completed", "wait": "This may take several minutes", "preparing": "Preparing upload", "tokenLimit": "Over the token limit, please consider uploading smaller document", diff --git a/frontend/src/locale/es.json b/frontend/src/locale/es.json index 1dd2b9b0..cedc3232 100644 --- a/frontend/src/locale/es.json +++ b/frontend/src/locale/es.json @@ -223,8 +223,8 @@ }, "progress": { "upload": "Subida en progreso", - "training": "Entrenamiento en progreso", - "completed": "Entrenamiento completado", + "training": "Subida en progreso", + "completed": "Subida completada", "wait": "Esto puede tardar varios minutos", "preparing": "Preparando subida", "tokenLimit": "Excede el límite de tokens, considere cargar un documento más pequeño", diff --git a/frontend/src/locale/jp.json b/frontend/src/locale/jp.json index 84843de2..1072b17c 100644 --- a/frontend/src/locale/jp.json +++ b/frontend/src/locale/jp.json @@ -223,8 +223,8 @@ }, "progress": { "upload": "アップロード中", - "training": "トレーニング中", - "completed": "トレーニング完了", + "training": "アップロード中", + "completed": "アップロード完了", "wait": "数分かかる場合があります", "preparing": "アップロードを準備中", "tokenLimit": "トークン制限を超えています。より小さいドキュメントをアップロードしてください", diff --git a/frontend/src/locale/ru.json b/frontend/src/locale/ru.json index 588b74f2..0ca63ec5 100644 --- a/frontend/src/locale/ru.json +++ b/frontend/src/locale/ru.json @@ -223,8 +223,8 @@ }, "progress": { "upload": "Идет загрузка", - "training": "Идет обучение", - "completed": "Обучение завершено", + "training": "Идет загрузка", + "completed": "Загрузка завершена", "wait": "Это может занять несколько минут", "preparing": "Подготовка загрузки", "tokenLimit": "Превышен лимит токенов, рассмотрите возможность загрузки документа меньшего размера", diff --git a/frontend/src/locale/zh-TW.json b/frontend/src/locale/zh-TW.json index e2cabe79..60a0c91d 100644 --- a/frontend/src/locale/zh-TW.json +++ b/frontend/src/locale/zh-TW.json @@ -223,8 +223,8 @@ }, "progress": { "upload": "正在上傳", - "training": "正在訓練", - "completed": "訓練完成", + "training": "正在上傳", + "completed": "上傳完成", "wait": "這可能需要幾分鐘", "preparing": "準備上傳", "tokenLimit": "超出令牌限制,請考慮上傳較小的文檔", diff --git a/frontend/src/locale/zh.json b/frontend/src/locale/zh.json index a736fad7..c3f4ec59 100644 --- a/frontend/src/locale/zh.json +++ b/frontend/src/locale/zh.json @@ -223,8 +223,8 @@ }, "progress": { "upload": "正在上传", - "training": "正在训练", - "completed": "训练完成", + "training": "正在上传", + "completed": "上传完成", "wait": "这可能需要几分钟", "preparing": "准备上传", "tokenLimit": "超出令牌限制,请考虑上传较小的文档", diff --git a/frontend/src/upload/uploadSlice.ts b/frontend/src/upload/uploadSlice.ts index eb9ef13c..4fd8e1d2 100644 --- a/frontend/src/upload/uploadSlice.ts +++ b/frontend/src/upload/uploadSlice.ts @@ -114,14 +114,6 @@ export const uploadSlice = createSlice({ removeUploadTask: (state, action: PayloadAction) => { state.tasks = state.tasks.filter((task) => task.id !== action.payload); }, - clearCompletedTasks: (state) => { - state.tasks = state.tasks.filter( - (task) => - task.status === 'uploading' || - task.status === 'training' || - task.status === 'preparing', - ); - }, }, }); @@ -134,7 +126,6 @@ export const { updateUploadTask, dismissUploadTask, removeUploadTask, - clearCompletedTasks, } = uploadSlice.actions; export const selectAttachments = (state: RootState) => state.upload.attachments;