fcea9515-7ac3-402f-9159-635593e53a1f

This commit is contained in:
Z User 2026-10-29 09:26:27 +00:00
parent 9e90f7ff8a
commit 78bf025686
3 changed files with 22 additions and 20 deletions

View file

@ -1,19 +1,18 @@
// OVE — sticky app header: logo, audio source controls (segmented), the // OVE — sticky app header: logo, audio source controls (segmented), the
// demo-track chip, theme tick switch, BPM readout, and the beat indicator + // demo-track chip, What's New!, theme tick switch, BPM readout and the beat
// "Set Beat" button side by side (hard requirement: that pairing is always // indicator. (v7.6.1: the Set Beat button moved out — tap-tempo lives in the
// visible in the header). // Beat tab, and Space works anywhere.)
'use client' 'use client'
import { useRef, useSyncExternalStore } from 'react' import { useRef, useSyncExternalStore } from 'react'
import { AudioWaveform, Disc3, FileAudio, Link2, Mic, Moon, Music2, Square, Sun, Timer } from 'lucide-react' import { AudioWaveform, Disc3, FileAudio, Link2, Mic, Moon, Music2, Square, Sun } from 'lucide-react'
import { useTheme } from 'next-themes' import { useTheme } from 'next-themes'
import { Button } from '@/components/ui/button'
import { Switch } from '@/components/ui/switch' import { Switch } from '@/components/ui/switch'
import { BeatDot } from '@/components/ava/beat-dot' import { BeatDot } from '@/components/ava/beat-dot'
import { LinkDialog } from '@/components/ava/link-dialog' import { LinkDialog } from '@/components/ava/link-dialog'
import { WhatsNew } from '@/components/ava/whats-new-dialog' import { WhatsNew } from '@/components/ava/whats-new-dialog'
import { tapBeat, useAudioSource } from '@/components/ava/audio-source' import { useAudioSource } from '@/components/ava/audio-source'
import { useAvaStore } from '@/lib/store' import { useAvaStore } from '@/lib/store'
import { getStoredDarkBase } from '@/lib/theme' import { getStoredDarkBase } from '@/lib/theme'
import { APP_NAME, APP_SHORT } from '@/lib/version' import { APP_NAME, APP_SHORT } from '@/lib/version'
@ -41,7 +40,7 @@ function SourceSegmentButton({
aria-pressed={active} aria-pressed={active}
title={title} title={title}
className={cn( className={cn(
'flex h-11 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors', 'flex h-11 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors max-[400px]:gap-0 max-[400px]:px-2.5',
active active
? 'glow-segment bg-emerald-400/15 text-emerald-300' ? 'glow-segment bg-emerald-400/15 text-emerald-300'
: tone === 'stop' : tone === 'stop'
@ -49,8 +48,11 @@ function SourceSegmentButton({
: 'text-zinc-400 hover:bg-zinc-800 hover:text-zinc-100', : 'text-zinc-400 hover:bg-zinc-800 hover:text-zinc-100',
)} )}
> >
<Icon className="size-3.5" /> <Icon className="size-3.5 shrink-0" />
{label} {/* under 400px the five-button segment row exceeds the viewport — the
labels collapse to screen-reader-only (icon + tooltip carries the
meaning, same shortening pattern as What's New! → New) */}
<span className="max-[400px]:sr-only">{label}</span>
</button> </button>
) )
} }
@ -192,21 +194,12 @@ export function AppHeader() {
<SourceControls /> <SourceControls />
</div> </div>
{/* what's new + theme switch + BPM readout + beat indicator + Set Beat — always visible */} {/* what's new + theme switch + BPM readout + beat indicator — always visible */}
<div className="order-2 ml-auto flex items-center gap-2.5 md:order-3 sm:gap-3"> <div className="order-2 ml-auto flex items-center gap-2.5 md:order-3 sm:gap-3">
<WhatsNew /> <WhatsNew />
<ThemeToggle /> <ThemeToggle />
<BpmReadout /> <BpmReadout />
<BeatDot size={44} /> <BeatDot size={44} />
<Button
onClick={tapBeat}
className="h-11 gap-1.5 bg-emerald-400 px-3 font-semibold text-emerald-950 hover:bg-emerald-300 sm:px-4"
title="Tap to set the tempo (or press Space)"
>
<Timer className="size-4" />
<span className="hidden sm:inline">Set Beat</span>
<span className="sm:hidden">Beat</span>
</Button>
</div> </div>
</div> </div>

View file

@ -33,6 +33,12 @@ export interface ReleaseNote {
} }
export const RELEASE_NOTES: ReleaseNote[] = [ export const RELEASE_NOTES: ReleaseNote[] = [
{
version: '7.6.1',
changes: [
{ kind: 'removed', text: 'The “Set Beat” button from the header — tap-tempo lives in the Beat tab (and Space still works anywhere). The beat indicator stays.' },
],
},
{ {
version: '7.6', version: '7.6',
name: 'What’s New!', name: 'What’s New!',

View file

@ -12,6 +12,9 @@
// warns in the console when the two drift apart. // warns in the console when the two drift apart.
// //
// History: // History:
// 7.6.1 — header declutter: the Set Beat button is gone from the header
// (tap-tempo lives in the Beat tab, and the Space shortcut works
// anywhere — both unchanged). The beat indicator dot stays.
// 7.6 — "What's New!" dialog: a Sparkles button in the header (left of // 7.6 — "What's New!" dialog: a Sparkles button in the header (left of
// the theme switch) opens the visitor-facing changelog — every // the theme switch) opens the visitor-facing changelog — every
// release from v4.0 on, newest first, each with one-line Added / // release from v4.0 on, newest first, each with one-line Added /
@ -220,4 +223,4 @@
export const APP_NAME = 'Open Visualization Engine' export const APP_NAME = 'Open Visualization Engine'
export const APP_SHORT = 'OVE' export const APP_SHORT = 'OVE'
export const APP_VERSION = '7.6' export const APP_VERSION = '7.6.1'