@@ -9,6 +9,9 @@ import { cn } from '@/lib/utils';
99import { getCdnUrl } from '@/lib/cdn' ;
1010import { LogOut , LayoutDashboard , UserCircle , FolderOpen , SlidersHorizontal , ChevronRight , Github , Sun , Moon , Menu , X } from 'lucide-react' ;
1111import { useTheme } from '@/hooks/use-theme' ;
12+ import { toast } from 'sonner' ;
13+
14+ const isStaticDemo = ! ! process . env . NEXT_PUBLIC_BASE_PATH ;
1215import {
1316 DropdownMenu ,
1417 DropdownMenuContent ,
@@ -288,17 +291,31 @@ export function PublicHeader() {
288291 ) }
289292
290293 { /* Login — desktop only */ }
291- < Link
292- href = "/auth/login"
293- className = { cn (
294- "hidden md:inline-flex text-sm font-medium px-3.5 py-1.5 rounded-lg transition-all duration-200" ,
295- isTransparent
296- ? "bg-white/15 text-white border border-white/30 backdrop-blur-sm hover:bg-white/25 hover:border-white/50 shadow-[0_0_15px_rgba(255,255,255,0.15)]"
297- : "bg-blue-600 hover:bg-blue-700 text-white shadow-sm hover:shadow-md"
298- ) }
299- >
300- 登录
301- </ Link >
294+ { isStaticDemo ? (
295+ < button
296+ onClick = { ( ) => toast . info ( '功能开发中,敬请期待!' ) }
297+ className = { cn (
298+ "hidden md:inline-flex text-sm font-medium px-3.5 py-1.5 rounded-lg transition-all duration-200 cursor-pointer" ,
299+ isTransparent
300+ ? "bg-white/15 text-white border border-white/30 backdrop-blur-sm hover:bg-white/25 hover:border-white/50 shadow-[0_0_15px_rgba(255,255,255,0.15)]"
301+ : "bg-blue-600 hover:bg-blue-700 text-white shadow-sm hover:shadow-md"
302+ ) }
303+ >
304+ 登录
305+ </ button >
306+ ) : (
307+ < Link
308+ href = "/auth/login"
309+ className = { cn (
310+ "hidden md:inline-flex text-sm font-medium px-3.5 py-1.5 rounded-lg transition-all duration-200" ,
311+ isTransparent
312+ ? "bg-white/15 text-white border border-white/30 backdrop-blur-sm hover:bg-white/25 hover:border-white/50 shadow-[0_0_15px_rgba(255,255,255,0.15)]"
313+ : "bg-blue-600 hover:bg-blue-700 text-white shadow-sm hover:shadow-md"
314+ ) }
315+ >
316+ 登录
317+ </ Link >
318+ ) }
302319 </ >
303320 ) }
304321
@@ -383,13 +400,22 @@ export function PublicHeader() {
383400 </ div >
384401 ) : (
385402 < div className = "pt-2 border-t border-gray-200 dark:border-white/[0.08] mt-2" >
386- < Link
387- href = "/auth/login"
388- onClick = { ( ) => toggleMobileMenu ( false ) }
389- className = "block px-3 py-3 rounded-lg text-[15px] font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-500/10 transition-colors"
390- >
391- 登录
392- </ Link >
403+ { isStaticDemo ? (
404+ < button
405+ onClick = { ( ) => { toast . info ( '功能开发中,敬请期待!' ) ; toggleMobileMenu ( false ) ; } }
406+ className = "block w-full text-left px-3 py-3 rounded-lg text-[15px] font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-500/10 transition-colors cursor-pointer"
407+ >
408+ 登录
409+ </ button >
410+ ) : (
411+ < Link
412+ href = "/auth/login"
413+ onClick = { ( ) => toggleMobileMenu ( false ) }
414+ className = "block px-3 py-3 rounded-lg text-[15px] font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-500/10 transition-colors"
415+ >
416+ 登录
417+ </ Link >
418+ ) }
393419 </ div >
394420 ) }
395421 </ nav >
0 commit comments