fix(header): 深浅色切换扩散动画改为从屏幕中心扩散
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-05 00:04:37 -06:00
parent b4b96b0da3
commit 30ea5c8191

View File

@@ -22,12 +22,10 @@ const { learnStep } = useLearnProgress()
const isDark = useDark() const isDark = useDark()
function toggleDark(event: MouseEvent) { function toggleDark() {
const { clientX: x, clientY: y } = event const x = window.innerWidth / 2
const radius = Math.hypot( const y = window.innerHeight / 2
Math.max(x, window.innerWidth - x), const radius = Math.hypot(x, y)
Math.max(y, window.innerHeight - y),
)
if (!document.startViewTransition) { if (!document.startViewTransition) {
isDark.value = !isDark.value isDark.value = !isDark.value
return return