fix(过程详情): 恢复练习模式查看答案快捷键
This commit is contained in:
@@ -7,7 +7,6 @@ interface ProficientInputAreaProps {
|
||||
isComposing: boolean
|
||||
inputLocked: boolean
|
||||
hasError: boolean
|
||||
statusText?: string | null
|
||||
onChange: (value: string) => void
|
||||
onCompositionStart: () => void
|
||||
onCompositionEnd: (value: string) => void
|
||||
@@ -18,7 +17,6 @@ export function ProficientInputArea({
|
||||
isComposing,
|
||||
inputLocked,
|
||||
hasError,
|
||||
statusText,
|
||||
onChange,
|
||||
onCompositionStart,
|
||||
onCompositionEnd,
|
||||
@@ -40,7 +38,7 @@ export function ProficientInputArea({
|
||||
onCompositionStart={onCompositionStart}
|
||||
onCompositionEnd={(e) => onCompositionEnd(e.currentTarget.value)}
|
||||
disabled={inputLocked}
|
||||
placeholder="输入当前分组中的一个完整条目,停顿 800ms 自动核对"
|
||||
placeholder="输入当前分组中的一个完整条目"
|
||||
className={clsx(
|
||||
'w-full rounded-xl border px-4 py-3 text-base md:text-lg',
|
||||
'bg-white dark:bg-gray-800/80 text-gray-900 dark:text-gray-100',
|
||||
@@ -56,33 +54,18 @@ export function ProficientInputArea({
|
||||
spellCheck="false"
|
||||
/>
|
||||
|
||||
<div className="min-h-6 text-sm">
|
||||
<AnimatePresence mode="wait">
|
||||
{inputLocked ? (
|
||||
<motion.div
|
||||
key="locked"
|
||||
initial={{ opacity: 0, y: -6 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
exit={{ opacity: 0, y: -6 }}
|
||||
className="text-gray-500 dark:text-gray-400"
|
||||
>
|
||||
答案显示中,输入已锁定
|
||||
</motion.div>
|
||||
) : statusText ? (
|
||||
<motion.div
|
||||
key={statusText}
|
||||
initial={{ opacity: 0, y: -6 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
exit={{ opacity: 0, y: -6 }}
|
||||
className={clsx(
|
||||
hasError ? 'text-red-500 dark:text-red-400' : 'text-gray-500 dark:text-gray-400'
|
||||
)}
|
||||
>
|
||||
{statusText}
|
||||
</motion.div>
|
||||
) : null}
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
<AnimatePresence>
|
||||
{inputLocked && (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: -6 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
exit={{ opacity: 0, y: -6 }}
|
||||
className="text-sm text-gray-500 dark:text-gray-400"
|
||||
>
|
||||
答案显示中,输入已锁定
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user