diff --git a/webui/src/components/DeleteConfirm.tsx b/webui/src/components/DeleteConfirm.tsx index 3342bbd31..fdad9e3ac 100644 --- a/webui/src/components/DeleteConfirm.tsx +++ b/webui/src/components/DeleteConfirm.tsx @@ -8,6 +8,7 @@ import { AlertDialogHeader, AlertDialogTitle, } from "@/components/ui/alert-dialog"; +import { Trash2 } from "lucide-react"; import { useTranslation } from "react-i18next"; interface DeleteConfirmProps { @@ -26,22 +27,32 @@ export function DeleteConfirm({ const { t } = useTranslation(); return ( (!o ? onCancel() : undefined)}> - - - + + +
+
+ +
+
+ {t("deleteConfirm.title", { title })} - + {t("deleteConfirm.description")}
- - + + {t("deleteConfirm.cancel")} {t("deleteConfirm.confirm")} diff --git a/webui/src/components/Sidebar.tsx b/webui/src/components/Sidebar.tsx index 52c8de47c..ff8338181 100644 --- a/webui/src/components/Sidebar.tsx +++ b/webui/src/components/Sidebar.tsx @@ -1,6 +1,6 @@ import { useMemo, useState } from "react"; import { - PanelLeftClose, + Menu, Search, SquarePen, } from "lucide-react"; @@ -65,7 +65,7 @@ export function Sidebar(props: SidebarProps) { onClick={props.onCollapse} className="h-7 w-7 rounded-lg text-muted-foreground/85 hover:bg-sidebar-accent/75 hover:text-sidebar-foreground" > - + diff --git a/webui/src/components/thread/ThreadHeader.tsx b/webui/src/components/thread/ThreadHeader.tsx index 9c23d4bc2..1fb8688a5 100644 --- a/webui/src/components/thread/ThreadHeader.tsx +++ b/webui/src/components/thread/ThreadHeader.tsx @@ -1,4 +1,4 @@ -import { Menu, Moon, PanelLeftOpen, Settings, Sun } from "lucide-react"; +import { Menu, Moon, Settings, Sun } from "lucide-react"; import { useTranslation } from "react-i18next"; import { Button } from "@/components/ui/button"; @@ -80,7 +80,7 @@ export function ThreadHeader({ hideSidebarToggleOnDesktop && "lg:pointer-events-none lg:opacity-0", )} > - +
{title} diff --git a/webui/src/components/ui/alert-dialog.tsx b/webui/src/components/ui/alert-dialog.tsx index 4796a6043..d6cd7088c 100644 --- a/webui/src/components/ui/alert-dialog.tsx +++ b/webui/src/components/ui/alert-dialog.tsx @@ -15,7 +15,7 @@ const AlertDialogOverlay = React.forwardRef< (({ className, ...props }, ref) => ( - +
+ +
)); AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName; diff --git a/webui/src/i18n/locales/en/common.json b/webui/src/i18n/locales/en/common.json index 14444a45e..d51ae150f 100644 --- a/webui/src/i18n/locales/en/common.json +++ b/webui/src/i18n/locales/en/common.json @@ -70,8 +70,8 @@ } }, "deleteConfirm": { - "title": "Delete “{{title}}”?", - "description": "The session file will be removed from disk. This cannot be undone.", + "title": "Delete this chat?", + "description": "This action cannot be undone.", "cancel": "Cancel", "confirm": "Delete" }, diff --git a/webui/src/i18n/locales/es/common.json b/webui/src/i18n/locales/es/common.json index 06b341d10..58312e255 100644 --- a/webui/src/i18n/locales/es/common.json +++ b/webui/src/i18n/locales/es/common.json @@ -45,8 +45,8 @@ "newChat": "Nuevo chat" }, "deleteConfirm": { - "title": "¿Eliminar “{{title}}”?", - "description": "El archivo de sesión se eliminará del disco. Esta acción no se puede deshacer.", + "title": "¿Eliminar este chat?", + "description": "Esta acción no se puede deshacer.", "cancel": "Cancelar", "confirm": "Eliminar" }, diff --git a/webui/src/i18n/locales/fr/common.json b/webui/src/i18n/locales/fr/common.json index aaf1f876b..a646fc5f9 100644 --- a/webui/src/i18n/locales/fr/common.json +++ b/webui/src/i18n/locales/fr/common.json @@ -45,8 +45,8 @@ "newChat": "Nouvelle discussion" }, "deleteConfirm": { - "title": "Supprimer « {{title}} » ?", - "description": "Le fichier de session sera supprimé du disque. Cette action est irréversible.", + "title": "Supprimer cette discussion ?", + "description": "Cette action est irréversible.", "cancel": "Annuler", "confirm": "Supprimer" }, diff --git a/webui/src/i18n/locales/id/common.json b/webui/src/i18n/locales/id/common.json index 16afc5237..80f72fa3e 100644 --- a/webui/src/i18n/locales/id/common.json +++ b/webui/src/i18n/locales/id/common.json @@ -45,8 +45,8 @@ "newChat": "Obrolan baru" }, "deleteConfirm": { - "title": "Hapus “{{title}}”?", - "description": "File sesi akan dihapus dari disk. Tindakan ini tidak dapat dibatalkan.", + "title": "Hapus obrolan ini?", + "description": "Tindakan ini tidak dapat dibatalkan.", "cancel": "Batal", "confirm": "Hapus" }, diff --git a/webui/src/i18n/locales/ja/common.json b/webui/src/i18n/locales/ja/common.json index a3c6862f2..dbbd4d994 100644 --- a/webui/src/i18n/locales/ja/common.json +++ b/webui/src/i18n/locales/ja/common.json @@ -45,8 +45,8 @@ "newChat": "新しいチャット" }, "deleteConfirm": { - "title": "「{{title}}」を削除しますか?", - "description": "セッションファイルはディスクから削除されます。この操作は元に戻せません。", + "title": "このチャットを削除しますか?", + "description": "この操作は元に戻せません。", "cancel": "キャンセル", "confirm": "削除" }, diff --git a/webui/src/i18n/locales/ko/common.json b/webui/src/i18n/locales/ko/common.json index 74cf7191f..8a496f41b 100644 --- a/webui/src/i18n/locales/ko/common.json +++ b/webui/src/i18n/locales/ko/common.json @@ -45,8 +45,8 @@ "newChat": "새 채팅" }, "deleteConfirm": { - "title": "“{{title}}”을(를) 삭제할까요?", - "description": "세션 파일이 디스크에서 제거됩니다. 이 작업은 되돌릴 수 없습니다.", + "title": "이 채팅을 삭제할까요?", + "description": "이 작업은 되돌릴 수 없습니다.", "cancel": "취소", "confirm": "삭제" }, diff --git a/webui/src/i18n/locales/vi/common.json b/webui/src/i18n/locales/vi/common.json index 6956f8b28..110d9b9b1 100644 --- a/webui/src/i18n/locales/vi/common.json +++ b/webui/src/i18n/locales/vi/common.json @@ -45,8 +45,8 @@ "newChat": "Cuộc trò chuyện mới" }, "deleteConfirm": { - "title": "Xóa “{{title}}”?", - "description": "Tệp phiên sẽ bị xóa khỏi đĩa. Không thể hoàn tác thao tác này.", + "title": "Xóa cuộc trò chuyện này?", + "description": "Không thể hoàn tác thao tác này.", "cancel": "Hủy", "confirm": "Xóa" }, diff --git a/webui/src/i18n/locales/zh-CN/common.json b/webui/src/i18n/locales/zh-CN/common.json index f98733bcb..b4a29741d 100644 --- a/webui/src/i18n/locales/zh-CN/common.json +++ b/webui/src/i18n/locales/zh-CN/common.json @@ -58,8 +58,8 @@ } }, "deleteConfirm": { - "title": "删除“{{title}}”?", - "description": "这个会话文件会从磁盘中删除,且无法撤销。", + "title": "删除这个对话?", + "description": "此操作无法撤销。", "cancel": "取消", "confirm": "删除" }, diff --git a/webui/src/i18n/locales/zh-TW/common.json b/webui/src/i18n/locales/zh-TW/common.json index fa3a12706..0a772f741 100644 --- a/webui/src/i18n/locales/zh-TW/common.json +++ b/webui/src/i18n/locales/zh-TW/common.json @@ -45,8 +45,8 @@ "newChat": "新增對話" }, "deleteConfirm": { - "title": "刪除「{{title}}」?", - "description": "這個會話檔案會從磁碟中移除,而且無法復原。", + "title": "刪除這個對話?", + "description": "此操作無法復原。", "cancel": "取消", "confirm": "刪除" }, diff --git a/webui/src/tests/app-layout.test.tsx b/webui/src/tests/app-layout.test.tsx index 25248230e..3f32970fa 100644 --- a/webui/src/tests/app-layout.test.tsx +++ b/webui/src/tests/app-layout.test.tsx @@ -139,7 +139,7 @@ describe("App layout", () => { fireEvent.click(await screen.findByRole("menuitem", { name: "Delete" })); await waitFor(() => - expect(screen.getByText('Delete “First chat”?')).toBeInTheDocument(), + expect(screen.getByText("Delete this chat?")).toBeInTheDocument(), ); fireEvent.click(screen.getByRole("button", { name: "Delete" })); @@ -151,7 +151,7 @@ describe("App layout", () => { within(sidebar).getByRole("button", { name: /^Second chat$/ }), ).toBeInTheDocument(), ); - expect(screen.queryByText('Delete “First chat”?')).not.toBeInTheDocument(); + expect(screen.queryByText("Delete this chat?")).not.toBeInTheDocument(); expect(document.body.style.pointerEvents).not.toBe("none"); }, 15_000);