Implemented OneLibrary track addition and removal

This commit is contained in:
patben8 committed 2026-10-01 16:43:37 +02:00
1 parent c5280a95f2
commit 7960a5a68f
20 files changed
+822 -85

No files matched your search

+8 -1
View File
@@ -2,7 +2,7 @@ import { useState, type ReactNode } from 'react'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { api } from '../api'
import { useCaps } from '../lib/capabilities'
import { overwriteWarning, readOnlyNotice, saveLabel } from '../lib/platformCopy'
import { exportManagedWarning, overwriteWarning, readOnlyNotice, saveLabel } from '../lib/platformCopy'
import { Icon } from '../lib/icons'
import { askConfirm } from '../lib/confirm'
@@ -55,6 +55,7 @@ export function SaveBar({ onError, trailing, onDiscarded }: Props) {
const caps = useCaps()
const warning = overwriteWarning(caps.save)
const exportWarning = exportManagedWarning(caps.save)
const dirty = state?.dirty ?? false
const pending = state?.pending_stems
const readOnly = readOnlyNotice(caps)
@@ -81,6 +82,12 @@ export function SaveBar({ onError, trailing, onDiscarded }: Props) {
<span>{warning}</span>
</div>
)}
{dirty && exportWarning && (
<div className="mb-2 flex gap-1.5 rounded-xl bg-gold/10 px-2.5 py-1.5 text-[11px] leading-snug text-gold">
<Icon name="warning" size={13} className="mt-px shrink-0" />
<span>{exportWarning}</span>
</div>
)}
{/* Decided: the consequence is shown where Save is pressed, not only in
the Stems panel — Save deletes what a Replace conversion parked. */}
{pending && pending.parked > 0 && (