Implemented front end for stem conversion

This commit is contained in:
patben8 committed 2026-10-01 10:55:09 +02:00
1 parent c560876c02
commit ae03a93f98
12 files changed
+1043 -12

No files matched your search

+14 -1
View File
@@ -1,5 +1,6 @@
import { useEffect, useRef, useState } from 'react'
import { ShortcutsDialog } from './ShortcutsDialog'
import { StemsSettings } from './StemsSettings'
interface Props {
onOpenPathMapping: () => void
@@ -8,11 +9,12 @@ interface Props {
}
/** Overflow menu for low-frequency, collection-level settings. Currently holds
* path remapping and the shortcut list; the natural home for future advanced
* path remapping, Stems and the shortcut list; the natural home for future advanced
* settings. The shortcuts dialog is owned here, since nothing else opens it. */
export function SettingsMenu({ onOpenPathMapping, up = false }: Props) {
const [open, setOpen] = useState(false)
const [showShortcuts, setShowShortcuts] = useState(false)
const [showStems, setShowStems] = useState(false)
const ref = useRef<HTMLDivElement>(null)
useEffect(() => {
@@ -66,6 +68,16 @@ export function SettingsMenu({ onOpenPathMapping, up = false }: Props) {
Point the collection at moved or relocated files
</span>
</button>
<button
onClick={() => {
setShowStems(true)
setOpen(false)
}}
className={item}
>
<span className="text-sm text-text">Stems…</span>
<span className="text-[11px] text-faint">The stem engine, device and conversion defaults</span>
</button>
<button
onClick={() => {
setShowShortcuts(true)
@@ -79,6 +91,7 @@ export function SettingsMenu({ onOpenPathMapping, up = false }: Props) {
</div>
)}
{showShortcuts && <ShortcutsDialog onClose={() => setShowShortcuts(false)} />}
{showStems && <StemsSettings onClose={() => setShowStems(false)} />}
</div>
)
}