Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions ui/src/features/settings/MidiSettingsPanel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -346,28 +346,44 @@
MIDI arrives from your DAW's track routing.
</p>
{:else}
<!-- Header row (label + Refresh) above the list rather than beside it, so
the device names get the strip's whole width: squeezed between the
two, a name like Linux's "Midi Through Port-0" either ran under
Refresh or had to be cut short (issue #28). A name too long even for
the full width wraps inside its pill instead of being clipped. -->
<div
class="mt-[.9rem] flex flex-wrap items-center gap-[.6rem] rounded-lg border border-[color-mix(in_srgb,var(--color-ink)_10%,transparent)] bg-[color-mix(in_srgb,var(--color-ink)_4%,transparent)] py-[.4rem] pr-[.4rem] pl-[.65rem]"
class="mt-[.9rem] flex flex-col gap-[.4rem] rounded-lg border border-[color-mix(in_srgb,var(--color-ink)_10%,transparent)] bg-[color-mix(in_srgb,var(--color-ink)_4%,transparent)] py-[.4rem] pr-[.4rem] pl-[.65rem]"
>
<span
class="text-[.625rem] font-semibold tracking-[.14em] whitespace-nowrap text-muted uppercase"
id="midi-inputs-label">Inputs</span
>
<div class="flex items-center justify-between gap-[.6rem]">
<span
class="text-[.625rem] font-semibold tracking-[.14em] whitespace-nowrap text-muted uppercase"
id="midi-inputs-label">Inputs</span
>
<Button
size="sm"
onclick={() => engine.refreshMidiDevices()}
tip="Re-scan the connected MIDI inputs"
>
Refresh
</Button>
</div>
<div
class="flex min-w-0 flex-1 flex-wrap items-center gap-[.35rem]"
class="flex min-w-0 flex-wrap items-center gap-[.35rem] pb-[.15rem]"
role="status"
aria-labelledby="midi-inputs-label"
>
{#if devices.length > 0}
{#each devices as device (device)}
<!-- rounded-xl is a full pill at one line's height and stays a
rounded box if the name wraps to two. -->
<span
class="inline-flex items-center gap-[.35rem] rounded-full border border-[color-mix(in_srgb,var(--color-accent)_30%,transparent)] bg-[color-mix(in_srgb,var(--color-accent)_8%,transparent)] px-[.55rem] py-[.1rem] text-[.7rem] whitespace-nowrap text-[color-mix(in_srgb,var(--color-ink)_85%,transparent)]"
class="inline-flex max-w-full min-w-0 items-center gap-[.35rem] rounded-xl border border-[color-mix(in_srgb,var(--color-accent)_30%,transparent)] bg-[color-mix(in_srgb,var(--color-accent)_8%,transparent)] px-[.55rem] py-[.1rem] text-[.7rem] text-[color-mix(in_srgb,var(--color-ink)_85%,transparent)]"
>
<span
class="size-1.5 rounded-full bg-accent shadow-[0_0_6px_color-mix(in_srgb,var(--color-accent)_60%,transparent)]"
class="size-1.5 shrink-0 rounded-full bg-accent shadow-[0_0_6px_color-mix(in_srgb,var(--color-accent)_60%,transparent)]"
aria-hidden="true"
></span>
{device}
<span class="min-w-0 break-words">{device}</span>
</span>
{/each}
{:else}
Expand All @@ -376,13 +392,6 @@
>
{/if}
</div>
<Button
size="sm"
onclick={() => engine.refreshMidiDevices()}
tip="Re-scan the connected MIDI inputs"
>
Refresh
</Button>
</div>
{/if}

Expand Down
Loading