add fills
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

This commit is contained in:
2026-04-23 13:48:36 -06:00
parent f00dab9c6d
commit 30f71c5db2
13 changed files with 435 additions and 83 deletions

View File

@@ -30,23 +30,26 @@ function toggleDark(event: MouseEvent) {
isDark.value = !isDark.value
return
}
document.startViewTransition(() => {
isDark.value = !isDark.value
}).ready.then(() => {
document.documentElement.animate(
{
clipPath: [
`circle(0px at ${x}px ${y}px)`,
`circle(${radius}px at ${x}px ${y}px)`,
],
},
{
duration: 400,
easing: "ease-in-out",
pseudoElement: "::view-transition-new(root)",
},
)
}).catch(() => {})
document
.startViewTransition(() => {
isDark.value = !isDark.value
})
.ready.then(() => {
document.documentElement.animate(
{
clipPath: [
`circle(0px at ${x}px ${y}px)`,
`circle(${radius}px at ${x}px ${y}px)`,
],
},
{
duration: 400,
easing: "ease-in-out",
pseudoElement: "::view-transition-new(root)",
},
)
})
.catch(() => {})
}
// 从 store 中获取屏幕模式状态

View File

@@ -73,7 +73,8 @@ const renderMermaid = async () => {
renderSuccess.value = false
const errorDiv = document.createElement("div")
errorDiv.style.cssText = "color: #ff4d4f; padding: 20px; text-align: center; border: 1px dashed #ff4d4f; border-radius: 4px;"
errorDiv.style.cssText =
"color: #ff4d4f; padding: 20px; text-align: center; border: 1px dashed #ff4d4f; border-radius: 4px;"
const titleP = document.createElement("p")
titleP.textContent = "Mermaid语法错误"
const detailP = document.createElement("p")