初始化 assetx 项目,首次提交

This commit is contained in:
2026-01-26 17:44:27 +08:00
commit f901590dce
492 changed files with 25203 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
"use client";
import { useApp } from "@/contexts/AppContext";
export default function LanguageSwitch() {
const { language, setLanguage } = useApp();
const toggleLanguage = () => {
setLanguage(language === "zh" ? "en" : "zh");
};
return (
<button
onClick={toggleLanguage}
className="bg-bg-surface dark:bg-gray-800 rounded-lg border border-border-normal dark:border-gray-700 px-3 py-2 flex items-center justify-center h-10 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors"
>
<span className="text-sm font-medium text-text-primary dark:text-white">
{language === "zh" ? "中" : "EN"}
</span>
</button>
);
}