diff --git a/web/src/App.tsx b/web/src/App.tsx index 3a17946..6a48ce5 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -33,6 +33,7 @@ import { playPop } from "./lib/pop"; import { targetForAlbum } from "./lib/remote"; import type { Group, Results, SongHit } from "./lib/search"; import { categoryMatches, groupOf, results as computeResults } from "./lib/search"; +import { SHOW_AMBIENCE, SHOW_GLASS_BLUR } from "./lib/theme"; /** How long an armed "A" waits for the digit that completes the shortcut. */ const ASSIGN_PENDING_TIMEOUT_MS = 4000; @@ -377,8 +378,8 @@ export function App() { setUi((previous) => ({ ...previous, page: previous.page === "room" ? "music" : "room" })); return ( -
- {state && ( +
+ {state && SHOW_AMBIENCE && ( +
event.stopPropagation()} style={{ background: "oklch(96% 0.012 210)", diff --git a/web/src/components/BrowseView.tsx b/web/src/components/BrowseView.tsx index c6cc634..5688458 100644 --- a/web/src/components/BrowseView.tsx +++ b/web/src/components/BrowseView.tsx @@ -20,6 +20,7 @@ import { clock } from "../lib/format"; import type { Category, Group, Results, SongHit } from "../lib/search"; import { categoryMatches, groupOf } from "../lib/search"; import { + ANIMATE_VIEW_TRANSITIONS, glassTint, GROUP_HUE, GROUP_ICON, @@ -137,7 +138,11 @@ export function BrowseView({ if (isRootShelf) { return ( -
+
{shelves.map(({ group: shelfGroup, categories: shelfCategories }, index) => (
{songs.length > 0 && ( diff --git a/web/src/components/PlayView.tsx b/web/src/components/PlayView.tsx index 8d9ffe9..1cef629 100644 --- a/web/src/components/PlayView.tsx +++ b/web/src/components/PlayView.tsx @@ -5,6 +5,7 @@ import { usePlaybackClock } from "../hooks/usePlaybackClock"; import { albumLine, isBook } from "../lib/covers"; import { clock, remainingInAlbum } from "../lib/format"; import { groupOf } from "../lib/search"; +import { SHOW_DECORATIVE_ANIMATIONS } from "../lib/theme"; import { Cover } from "./Cover"; import { ProgressBar } from "./ProgressBar"; import { Transport } from "./Transport"; @@ -76,7 +77,7 @@ export function PlayView({ zIndex: 0, pointerEvents: "none", opacity: 0.92, - animation: "dolphinSwim 62s linear infinite", + animation: SHOW_DECORATIVE_ANIMATIONS ? "dolphinSwim 62s linear infinite" : "none", // Freezes in its current pose rather than snapping back to frame 0 - // `animation: "none"` would restart it, `animationPlayState` just pauses. animationPlayState: state.playing ? "running" : "paused", diff --git a/web/src/components/PlayerBar.tsx b/web/src/components/PlayerBar.tsx index 8583b28..e222771 100644 --- a/web/src/components/PlayerBar.tsx +++ b/web/src/components/PlayerBar.tsx @@ -3,6 +3,7 @@ import type { Album, PlayerState } from "../api/types"; import { usePlaybackClock } from "../hooks/usePlaybackClock"; import { albumLine, isBook } from "../lib/covers"; +import { SHOW_DECORATIVE_ANIMATIONS, SHOW_GLASS_BLUR } from "../lib/theme"; import { Cover } from "./Cover"; import { ProgressBar } from "./ProgressBar"; import { Transport } from "./Transport"; @@ -41,7 +42,7 @@ export function PlayerBar({ bottom: 0, zIndex: 2, background: "oklch(18% 0.05 210 / .96)", - backdropFilter: "blur(6px)", + backdropFilter: SHOW_GLASS_BLUR ? "blur(6px)" : undefined, padding: "16px clamp(12px, 3vw, 32px)", // Clear of the iPhone home indicator when installed to the home screen. paddingBottom: "calc(16px + env(safe-area-inset-bottom))", @@ -61,7 +62,10 @@ export function PlayerBar({ objectFit: "contain", flex: "0 1 auto", minWidth: 0, - animation: state.playing ? "dolphinBob 1.6s ease-in-out infinite" : "none", + animation: + SHOW_DECORATIVE_ANIMATIONS && state.playing + ? "dolphinBob 1.6s ease-in-out infinite" + : "none", filter: "drop-shadow(0 4px 12px oklch(10% 0.05 210 / .5))", }} /> diff --git a/web/src/components/RoomView.tsx b/web/src/components/RoomView.tsx index 35023f7..4edabee 100644 --- a/web/src/components/RoomView.tsx +++ b/web/src/components/RoomView.tsx @@ -7,6 +7,7 @@ import { useState } from "react"; import type { HaConfig } from "../api/types"; import { useHomeAssistant } from "../hooks/useHomeAssistant"; +import { SHOW_DECORATIVE_ANIMATIONS } from "../lib/theme"; import { AppHeader } from "./AppHeader"; import { Bubbles } from "./Bubbles"; import { LightCard } from "./LightCard"; @@ -28,7 +29,7 @@ export function RoomView({ config }: { config: HaConfig }) { return (
- + {SHOW_DECORATIVE_ANIMATIONS && }