Add app info and instrument controls

This commit is contained in:
Ninosaurier committed 2026-11-15 13:43:06 +01:00
1 parent e23825cdb1
commit 9d8f277971
38 files changed
+4001 -257

No files matched your search

+8 -8
View File
@@ -1,15 +1,15 @@
import { memo } from 'react';
import { IonButton, IonIcon, IonPopover } from '@ionic/react';
import { chevronDown } from 'ionicons/icons';
import { SOUND_BY_ID } from '../domain/sounds';
import type { SoundId } from '../domain/sounds';
import { INSTRUMENT_BY_ID } from '../domain/instruments';
import type { InstrumentId } from '../domain/instruments';
import { usePopoverDisclosure } from '../hooks/usePopoverDisclosure';
interface SoundRingSelectorProps {
soundIds: SoundId[];
focusedSoundId: SoundId | null;
colorBySoundId: Partial<Record<SoundId, string>>;
onSelectSound: (soundId: SoundId) => void;
soundIds: InstrumentId[];
focusedSoundId: InstrumentId | null;
colorBySoundId: Partial<Record<InstrumentId, string>>;
onSelectSound: (soundId: InstrumentId) => void;
}
export const SoundRingSelector = memo(function SoundRingSelector({
@@ -19,7 +19,7 @@ export const SoundRingSelector = memo(function SoundRingSelector({
onSelectSound,
}: SoundRingSelectorProps) {
const popover = usePopoverDisclosure();
const focusedSound = focusedSoundId ? SOUND_BY_ID[focusedSoundId] : undefined;
const focusedSound = focusedSoundId ? INSTRUMENT_BY_ID[focusedSoundId] : undefined;
return (
<>
@@ -70,7 +70,7 @@ export const SoundRingSelector = memo(function SoundRingSelector({
className="ring-selector-swatch"
style={{ backgroundColor: colorBySoundId[soundId] ?? '#b8b4e0' }}
/>
<span>{SOUND_BY_ID[soundId].label} ring</span>
<span>{INSTRUMENT_BY_ID[soundId].label} ring</span>
</span>
</IonButton>
);