Merge remote-tracking branch 'origin/main'

This commit is contained in:
2026-10-15 22:05:01 +02:00
2 changed files with 7 additions and 3 deletions
@@ -13,7 +13,7 @@ import { flushSync } from "react-dom"
import { ErrorBoundary } from "react-error-boundary" import { ErrorBoundary } from "react-error-boundary"
import type { WidgetDef } from "@/client" import type { WidgetDef } from "@/client"
import { slotsFor } from "@/components/Common/UplotChart" import { slotsFor } from "@/components/Common/UplotChart"
import { fadeIn } from "@/lib/motion" import { duration, fadeIn } from "@/lib/motion"
import { useShortcuts } from "@/lib/shortcuts" import { useShortcuts } from "@/lib/shortcuts"
import { cn } from "@/lib/utils" import { cn } from "@/lib/utils"
import { useClock } from "./ClockWidget" import { useClock } from "./ClockWidget"
@@ -476,7 +476,11 @@ export function RoundView({
useEffect(() => { useEffect(() => {
if (!announce) return if (!announce) return
const timer = setTimeout(() => setAnnounce(false), ANNOUNCE_MS) // Held for its whole time once faded in, as the docs and openpanel count it.
const timer = setTimeout(
() => setAnnounce(false),
duration.base * 1000 + ANNOUNCE_MS,
)
return () => clearTimeout(timer) return () => clearTimeout(timer)
}, [announce]) }, [announce])
@@ -133,7 +133,7 @@ export const turnsPage = (by: number, speed: number, size: number) =>
Math.sign(speed) === Math.sign(by) && Math.sign(speed) === Math.sign(by) &&
Math.abs(speed) >= PAGE_FLING) Math.abs(speed) >= PAGE_FLING)
/** How long a change of dashboard shows which one it landed on. */ /** How long a change of dashboard holds its name, once faded in. */
export const ANNOUNCE_MS = 1000 export const ANNOUNCE_MS = 1000
/** /**