diff --git a/next.config.ts b/next.config.ts index e9ffa30..c1c3650 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,8 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - /* config options here */ + // 关闭左下角的开发指示器(dev overlay 角标) + devIndicators: false, }; export default nextConfig; diff --git a/package.json b/package.json index 46bb42a..3fa0b4e 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,10 @@ "prisma": "^6.19.3", "react": "19.2.4", "react-dom": "19.2.4", + "react-hot-toast": "^2.6.0", "tailwind-merge": "^3.6.0", - "zod": "^4.4.3" + "zod": "^4.4.3", + "zustand": "^5.0.13" }, "devDependencies": { "@tailwindcss/postcss": "^4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2ae6dc6..35ee602 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,12 +41,18 @@ importers: react-dom: specifier: 19.2.4 version: 19.2.4(react@19.2.4) + react-hot-toast: + specifier: ^2.6.0 + version: 2.6.0(react-dom@19.2.4(react@19.2.4))(react@19.2.4) tailwind-merge: specifier: ^3.6.0 version: 3.6.0 zod: specifier: ^4.4.3 version: 4.4.3 + zustand: + specifier: ^5.0.13 + version: 5.0.13(@types/react@19.2.14)(react@19.2.4) devDependencies: '@tailwindcss/postcss': specifier: ^4 @@ -1565,6 +1571,11 @@ packages: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} + goober@2.1.18: + resolution: {integrity: sha512-2vFqsaDVIT9Gz7N6kAL++pLpp41l3PfDuusHcjnGLfR6+huZkl6ziX+zgVC3ZxpqWhzH6pyDdGrCeDhMIvwaxw==} + peerDependencies: + csstype: ^3.0.10 + gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} @@ -2173,6 +2184,13 @@ packages: peerDependencies: react: ^19.2.4 + react-hot-toast@2.6.0: + resolution: {integrity: sha512-bH+2EBMZ4sdyou/DPrfgIouFpcRLCJ+HoCA32UoAYHn6T3Ur5yfcDCeSr5mwldl6pFOsiocmrXMuoCJ1vV8bWg==} + engines: {node: '>=10'} + peerDependencies: + react: '>=16' + react-dom: '>=16' + react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -2509,6 +2527,24 @@ packages: zod@4.4.3: resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} + zustand@5.0.13: + resolution: {integrity: sha512-efI2tVaVQPqtOh114loML/Z80Y4NP3yc+Ff0fYiZJPauNeWZeIp/bRFD7I9bfmCOYBh/PHxlglQ9+wvlwnPikQ==} + engines: {node: '>=12.20.0'} + peerDependencies: + '@types/react': '>=18.0.0' + immer: '>=9.0.6' + react: '>=18.0.0' + use-sync-external-store: '>=1.2.0' + peerDependenciesMeta: + '@types/react': + optional: true + immer: + optional: true + react: + optional: true + use-sync-external-store: + optional: true + snapshots: '@alloc/quick-lru@5.2.0': {} @@ -4043,6 +4079,10 @@ snapshots: define-properties: 1.2.1 gopd: 1.2.0 + goober@2.1.18(csstype@3.2.3): + dependencies: + csstype: 3.2.3 + gopd@1.2.0: {} graceful-fs@4.2.11: {} @@ -4607,6 +4647,13 @@ snapshots: react: 19.2.4 scheduler: 0.27.0 + react-hot-toast@2.6.0(react-dom@19.2.4(react@19.2.4))(react@19.2.4): + dependencies: + csstype: 3.2.3 + goober: 2.1.18(csstype@3.2.3) + react: 19.2.4 + react-dom: 19.2.4(react@19.2.4) + react-is@16.13.1: {} react@19.2.4: {} @@ -5071,3 +5118,8 @@ snapshots: zod: 4.4.3 zod@4.4.3: {} + + zustand@5.0.13(@types/react@19.2.14)(react@19.2.4): + optionalDependencies: + '@types/react': 19.2.14 + react: 19.2.4 diff --git a/src/app/globals.css b/src/app/globals.css index df9660b..450f167 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -148,10 +148,14 @@ body::after { z-index: 0; } -/* 页面内容须高于装饰层 */ -body > * { - position: relative; - z-index: 1; +/* 页面内容须高于装饰层 + * ⚠ 必须放入 @layer base,否则会覆盖 Tailwind .fixed 等工具类, + * 导致 createPortal 的弹窗失去 position:fixed 被排到页面底部。 */ +@layer base { + body > * { + position: relative; + z-index: 1; + } } /* ── 选中文字 ── */ diff --git a/src/app/layout.tsx b/src/app/layout.tsx index d5ca1d7..87cc106 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,6 +2,7 @@ import type { Metadata } from "next"; import { Megrim, Audiowide, Cinzel, Inter } from "next/font/google"; import Navigation from "@/components/Navigation"; import Footer from "@/components/Footer"; +import Providers from "@/components/Providers"; import "./globals.css"; const megrim = Megrim({ @@ -54,9 +55,11 @@ export default function RootLayout({ className={`${megrim.variable} ${audiowide.variable} ${cinzel.variable} ${inter.variable} h-full antialiased`} >
-