Rewrites the web app's comments to rule 32. Task, milestone, rule and spec ids are gone; regression stories are restated as the trap they guard (public auth routes, the menu's stopPropagation, universal loads under adapter-static, metric deltas with their margin). Flutter and Tauri mentions now name the Android app or a native shell, operator quotes and dates are dropped, and one library's counts no longer appear outside test fixtures. Verified with a TypeScript-scanner token comparison (template literals and regex literals re-scanned): only comment text changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
1.5 KiB
Svelte
53 lines
1.5 KiB
Svelte
<script lang="ts">
|
|
// Play and Shuffle, the same on every page that has them: album,
|
|
// playlist and artist. Play is filled and Shuffle outlined. The fill is
|
|
// the accent, a deliberate exception to the house rule against accent on
|
|
// action buttons.
|
|
import type { Snippet } from 'svelte';
|
|
import { Play, Shuffle } from 'lucide-svelte';
|
|
|
|
let {
|
|
name,
|
|
disabled = false,
|
|
onPlay,
|
|
onShuffle,
|
|
children
|
|
}: {
|
|
/** What is played, for the buttons' accessible names. */
|
|
name: string;
|
|
disabled?: boolean;
|
|
onPlay: () => void;
|
|
onShuffle: () => void;
|
|
/** Further actions after Shuffle. */
|
|
children?: Snippet;
|
|
} = $props();
|
|
</script>
|
|
|
|
<div class="flex flex-wrap items-center gap-2">
|
|
<button
|
|
type="button"
|
|
aria-label={`Play ${name}`}
|
|
onclick={onPlay}
|
|
{disabled}
|
|
class="flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium
|
|
text-text-primary hover:opacity-90 focus-visible:ring-2 focus-visible:ring-accent
|
|
disabled:opacity-50"
|
|
>
|
|
<Play size={16} strokeWidth={1.5} fill="currentColor" />
|
|
Play
|
|
</button>
|
|
<button
|
|
type="button"
|
|
aria-label={`Shuffle ${name}`}
|
|
onclick={onShuffle}
|
|
{disabled}
|
|
class="flex items-center gap-2 rounded-md border border-border bg-surface px-4 py-2
|
|
text-sm font-medium text-text-primary hover:border-accent
|
|
focus-visible:ring-2 focus-visible:ring-accent disabled:opacity-50"
|
|
>
|
|
<Shuffle size={16} strokeWidth={1.5} />
|
|
Shuffle
|
|
</button>
|
|
{#if children}{@render children()}{/if}
|
|
</div>
|