@@ -309,10 +309,10 @@ export default function DashboardPage() {
309309 } , [ showRitual , lastSession ] ) ;
310310
311311 const heroStats = [
312- { label : '今日专注' , value : todayPomodoroCount , unit : '次' , accent : 'pomodoro' , icon : Timer } ,
313- { label : '笔记总数' , value : noteTotal , unit : '篇' , accent : 'note' , icon : FileText } ,
314- { label : '待复习' , value : dueFlashcardCount , unit : '张' , accent : 'flashcard' , icon : Layers } ,
315- { label : '费曼进行中' , value : feynmanInProgressCount , unit : '个' , accent : 'feynman' , icon : Lightbulb } ,
312+ { label : '今日专注' , value : todayPomodoroCount , unit : '次' , accent : 'pomodoro' , icon : Timer , path : '/pomodoro' } ,
313+ { label : '笔记总数' , value : noteTotal , unit : '篇' , accent : 'note' , icon : FileText , path : '/notes' } ,
314+ { label : '待复习' , value : dueFlashcardCount , unit : '张' , accent : 'flashcard' , icon : Layers , path : '/flashcards' } ,
315+ { label : '费曼进行中' , value : feynmanInProgressCount , unit : '个' , accent : 'feynman' , icon : Lightbulb , path : '/feynman' } ,
316316 ] ;
317317
318318 /* ── 学习分析 ── */
@@ -332,6 +332,7 @@ export default function DashboardPage() {
332332 type : 'note' ,
333333 title : n . title || '无标题笔记' ,
334334 time : formatRelativeTime ( new Date ( n . updatedAt ) ) ,
335+ targetPath : `/notes/${ n . id } ` ,
335336 } ) ;
336337 } ) ;
337338
@@ -347,6 +348,7 @@ export default function DashboardPage() {
347348 type : 'flashcard' ,
348349 title : card ? card . front . replace ( / < [ ^ > ] * > / g, '' ) . slice ( 0 , 40 ) : '复习闪卡' ,
349350 time : formatRelativeTime ( new Date ( latestReview . reviewedAt ) ) ,
351+ targetPath : '/flashcards' ,
350352 } ) ;
351353 }
352354
@@ -361,6 +363,7 @@ export default function DashboardPage() {
361363 type : 'pomodoro' ,
362364 title : `${ Math . round ( latest . actualDuration / 60 ) } 分钟专注` ,
363365 time : formatRelativeTime ( new Date ( latest . completedAt ) ) ,
366+ targetPath : '/pomodoro' ,
364367 } ) ;
365368 }
366369
@@ -374,6 +377,7 @@ export default function DashboardPage() {
374377 type : 'feynman' ,
375378 title : sortedFeynman [ 0 ] . concept ,
376379 time : formatRelativeTime ( new Date ( sortedFeynman [ 0 ] . updatedAt ) ) ,
380+ targetPath : `/feynman/${ sortedFeynman [ 0 ] . id } ` ,
377381 } ) ;
378382 }
379383
@@ -420,14 +424,21 @@ export default function DashboardPage() {
420424 return (
421425 < motion . div
422426 key = { stat . label }
427+ role = "link"
428+ tabIndex = { 0 }
429+ aria-label = { `进入${ stat . label } 模块` }
430+ onClick = { ( ) => navigate ( stat . path ) }
431+ onKeyDown = { ( e ) => { if ( e . key === 'Enter' || e . key === ' ' ) { e . preventDefault ( ) ; navigate ( stat . path ) ; } } }
423432 className = { cn (
424- 'relative p-5 rounded-kb-xl' ,
433+ 'relative p-5 rounded-kb-xl cursor-pointer ' ,
425434 'border border-border/15 backdrop-blur-sm' ,
426435 'bg-bg-elevated/30 hover:bg-bg-elevated/50' ,
427436 'transition-all duration-beat-x3 group' ,
437+ 'focus-visible:outline-2 focus-visible:outline-brand-500' ,
428438 ) }
429439 variants = { heroStatVariant }
430440 whileHover = { { y : - 2 , scale : 1.02 } }
441+ whileTap = { { scale : 0.97 } }
431442 transition = { SPRING . default }
432443 >
433444 < div className = "flex items-center gap-2 mb-3" >
0 commit comments