1111 * (`ActionCenterPanel` 的条件挂载)⇒ `open` 恒为 `true`,160ms 退场相位不触发。
1212 */
1313import { useCallback , useEffect , useState } from "react" ;
14- import { Button , EmptyState , Modal , Text } from "../ui/primitives" ;
14+ import { Button , EmptyState , Modal , Surface , Text } from "../ui/primitives" ;
1515import { invoke } from "@tauri-apps/api/core" ;
1616
1717/** 响应结构(PracticeItem/QuestionItem 均 serde camelCase——字段须 camel 读取) */
@@ -112,15 +112,15 @@ export function PracticeOverlay({ onClose }: { onClose: () => void }) {
112112 ) : (
113113 < div style = { { display : "flex" , flexDirection : "column" , gap : 6 } } >
114114 { items . map ( ( it ) => (
115- < div key = { it . id } style = { { border : "1px solid #e5e7eb" , borderRadius : 8 , padding : "6px 10px" , display : "flex" , gap : 6 , alignItems : "center" } } >
115+ < Surface key = { it . id } level = "none" radius = "panel" style = { { padding : "6px 10px" , display : "flex" , gap : 6 , alignItems : "center" } } >
116116 < span style = { { fontSize : 12.5 , flex : 1 } } > { it . text } </ span >
117117 < Text tone = "ink-3" style = { { fontSize : 10.5 } } >
118118 { it . frequency === "daily" ? "每日" : "手动" }
119119 { it . mastery != null ? ` · 熟练 ${ it . mastery } /5` : "" }
120120 { it . nextDue != null ? ` · 下次 ${ new Date ( it . nextDue * 1000 ) . toLocaleDateString ( ) } ` : "" }
121121 </ Text >
122122 < Button variant = "primary" size = "md" onClick = { ( ) => void tick ( it ) } > 🎯 打点</ Button >
123- </ div >
123+ </ Surface >
124124 ) ) }
125125 </ div >
126126 ) }
@@ -196,7 +196,7 @@ export function QuestionsOverlay({ onClose }: { onClose: () => void }) {
196196 </ div >
197197 < div style = { { display : "flex" , flexDirection : "column" , gap : 6 } } >
198198 { open . map ( ( q ) => (
199- < div key = { q . id } style = { { border : "1px solid #e5e7eb" , borderRadius : 8 , padding : "6px 10px" } } >
199+ < Surface key = { q . id } level = "none" radius = "panel" style = { { padding : "6px 10px" } } >
200200 < div style = { { display : "flex" , gap : 6 , alignItems : "center" } } >
201201 < span style = { { fontSize : 12.5 , flex : 1 } } > ❓ { q . text } </ span >
202202 < Button variant = "secondary" size = "md" onClick = { ( ) => setAnswerFor ( answerFor === q . id ? null : q . id ) } > 已答</ Button >
@@ -208,7 +208,7 @@ export function QuestionsOverlay({ onClose }: { onClose: () => void }) {
208208 < Button variant = "primary" size = "md" onClick = { ( ) => void answer ( q ) } > 确认</ Button >
209209 </ div >
210210 ) }
211- </ div >
211+ </ Surface >
212212 ) ) }
213213 { open . length === 0 && answered . length === 0 && (
214214 < EmptyState title = "暂无问题——" description = "学习中的疑问随手记下,答沉淀后归档(可转复习卡出口规划中)" />
0 commit comments