diff --git a/src/App.tsx b/src/App.tsx
index 452afed56..9772ee227 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -619,8 +619,8 @@ function App() {
) : (
- <>
-
+
+
CC Switch
-
+ className="absolute -top-4 -right-4"
+ />
-
{
- setSettingsDefaultTab("about");
+ setSettingsDefaultTab("general");
setCurrentView("settings");
}}
- />
- >
+ title={t("common.settings")}
+ className="hover:bg-black/5 dark:hover:bg-white/5"
+ >
+
+
+
)}
diff --git a/src/components/UpdateBadge.tsx b/src/components/UpdateBadge.tsx
index 3e9efea25..cb1faac41 100644
--- a/src/components/UpdateBadge.tsx
+++ b/src/components/UpdateBadge.tsx
@@ -1,6 +1,6 @@
-import { X, Download } from "lucide-react";
import { useUpdate } from "@/contexts/UpdateContext";
import { useTranslation } from "react-i18next";
+import { Button } from "@/components/ui/button";
interface UpdateBadgeProps {
className?: string;
@@ -8,56 +8,39 @@ interface UpdateBadgeProps {
}
export function UpdateBadge({ className = "", onClick }: UpdateBadgeProps) {
- const { hasUpdate, updateInfo, isDismissed, dismissUpdate } = useUpdate();
+ const { hasUpdate, updateInfo } = useUpdate();
const { t } = useTranslation();
+ const isActive = hasUpdate && updateInfo;
+ const title = isActive
+ ? t("settings.updateAvailable", {
+ version: updateInfo?.availableVersion ?? "",
+ })
+ : t("settings.checkForUpdates");
- // 如果没有更新或已关闭,不显示
- if (!hasUpdate || isDismissed || !updateInfo) {
+ if (!isActive) {
return null;
}
return (
- {
- if (!onClick) return;
- if (e.key === "Enter" || e.key === " ") {
- e.preventDefault();
- onClick();
- }
- }}
>
-
-
- {t("settings.updateBadge")}
-
-
-
+
+
);
}