feat(web): wire RowActionsMenu in requests + quarantine
Requests: primary Approve, secondary [Override, Reject]. Quarantine: primary Resolve, secondary [Play, Delete file]; the Delete-via-Lidarr conditional stays inline above md (preserves the disabled-with-tooltip semantics) and hides below md to avoid crowding — the operator can still trigger it from the desktop view. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { pageTitle } from '$lib/branding';
|
||||
import { Disc3, Album, Music2, Check, X, SlidersHorizontal } from 'lucide-svelte';
|
||||
import { useQueryClient } from '@tanstack/svelte-query';
|
||||
import RowActionsMenu, { type RowAction } from '$lib/components/RowActionsMenu.svelte';
|
||||
import {
|
||||
createAdminRequestsQuery,
|
||||
createQualityProfilesQuery,
|
||||
@@ -246,34 +247,13 @@
|
||||
</div>
|
||||
|
||||
{#if r.status === 'pending'}
|
||||
<div class="flex shrink-0 items-center gap-2">
|
||||
<button
|
||||
type="button"
|
||||
aria-label={`Override ${rowAccessibleName(r)}`}
|
||||
class="inline-flex items-center gap-1 rounded-md border border-border bg-transparent px-3 py-1.5 text-sm text-text-secondary hover:text-text-primary hover:bg-surface-hover"
|
||||
onclick={() => openOverride(r)}
|
||||
>
|
||||
<SlidersHorizontal size={14} strokeWidth={1.5} />
|
||||
Override
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
aria-label={`Approve ${rowAccessibleName(r)}`}
|
||||
class="inline-flex items-center gap-1 rounded-md bg-action-primary px-3 py-1.5 text-sm text-action-fg"
|
||||
onclick={() => onApprove(r)}
|
||||
>
|
||||
<Check size={14} strokeWidth={2} />
|
||||
Approve
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
aria-label={`Reject ${rowAccessibleName(r)}`}
|
||||
class="inline-flex items-center gap-1 rounded-md bg-action-secondary px-3 py-1.5 text-sm text-action-fg"
|
||||
onclick={() => openReject(r)}
|
||||
>
|
||||
<X size={14} strokeWidth={2} />
|
||||
Reject
|
||||
</button>
|
||||
{@const primary: RowAction = { icon: Check, label: 'Approve', onclick: () => onApprove(r) }}
|
||||
{@const secondary: RowAction[] = [
|
||||
{ icon: SlidersHorizontal, label: 'Override', onclick: () => openOverride(r) },
|
||||
{ icon: X, label: 'Reject', onclick: () => openReject(r), danger: true }
|
||||
]}
|
||||
<div class="shrink-0">
|
||||
<RowActionsMenu {primary} {secondary} />
|
||||
</div>
|
||||
{/if}
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user