diff --git a/README.md b/README.md index 67ccc1d..624452f 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,14 @@ - **样式**: Tailwind CSS - **工具库**: jsQR, date-fns +## 环境变量 + +可以在部署时设置以下环境变量来配置页脚信息: + +- `NEXT_PUBLIC_SHOW_FOOTER`: 是否显示页脚 (默认: true, 设置为 "false" 隐藏) +- `NEXT_PUBLIC_FILING_ICP`: ICP 备案号 (例如: 滇ICP备xxxxxxxx号) +- `NEXT_PUBLIC_FILING_SECURITY`: 公安联网备案号 (例如: 滇公网安备xxxxxxxxxxxxxx号) + ## 声明 本项目由阿里云ESA提供加速、计算和保护 diff --git a/app/globals.css b/app/globals.css index dc2aea1..ab1567c 100644 --- a/app/globals.css +++ b/app/globals.css @@ -19,7 +19,7 @@ --accent: oklch(0.97 0 0); --accent-foreground: oklch(0.205 0 0); --destructive: oklch(0.577 0.245 27.325); - --destructive-foreground: oklch(0.577 0.245 27.325); + --destructive-foreground: oklch(0.985 0 0); --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); diff --git a/app/page.tsx b/app/page.tsx index 862a151..cfe1293 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -27,6 +27,7 @@ import { Monitor, Languages, Check, + Github, } from "lucide-react" import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" @@ -162,6 +163,7 @@ export default function TwoFactorAuth() { const [isSettingsOpen, setIsSettingsOpen] = useState(false) const [editingToken, setEditingToken] = useState(null) const [showAdvanced, setShowAdvanced] = useState(false) + const [mounted, setMounted] = useState(false) const videoRef = useRef(null) const canvasRef = useRef(null) const fileInputRef = useRef(null) @@ -195,6 +197,7 @@ export default function TwoFactorAuth() { if (savedSettings) { setSettings(JSON.parse(savedSettings)) } + setMounted(true) }, []) // Save tokens to localStorage @@ -655,15 +658,33 @@ export default function TwoFactorAuth() {
+ + @@ -1028,39 +1049,50 @@ export default function TwoFactorAuth() { {/* Footer */} - + + )}
@@ -1136,9 +1168,8 @@ function TokenCard({ token, code, timeLeft, showCode, onCopy, onEdit, onDelete, {visible ? formattedCode : "••• •••"} diff --git a/components/ui/toast.tsx b/components/ui/toast.tsx index 40eedf5..6ab3311 100644 --- a/components/ui/toast.tsx +++ b/components/ui/toast.tsx @@ -77,7 +77,7 @@ const ToastClose = React.forwardRef< =12.20'} + typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + engines: {node: '>=14.17'} hasBin: true undici-types@6.11.1: @@ -3173,7 +3173,7 @@ snapshots: tw-animate-css@1.3.3: {} - typescript@5.0.2: {} + typescript@5.9.3: {} undici-types@6.11.1: {} diff --git a/tsconfig.json b/tsconfig.json index 4b2dc7b..48d6d82 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,10 @@ { "compilerOptions": { - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, "target": "ES6", "skipLibCheck": true, @@ -11,7 +15,7 @@ "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "preserve", + "jsx": "react-jsx", "incremental": true, "plugins": [ { @@ -19,9 +23,19 @@ } ], "paths": { - "@/*": ["./*"] + "@/*": [ + "./*" + ] } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts", + ".next/dev/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] }