Harden catalog admin: fix translate/quick-add, RCON sync, and confirm UX.
Local Build and Deploy / deploy (push) Successful in 1m18s
Local Build and Deploy / deploy (push) Successful in 1m18s
Restore broken Quick Add search, correct Translate saves to items_base and FurnitureData, reparent page deletes, sync RCON on create/toggle/BC mutations, and replace native confirms/prompts with dialogs. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
de9f837da1
commit
b52e25578d
20 files changed
+557
-216
No files matched your search
@@ -9,7 +9,6 @@ import {
|
||||
DialogContent,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from "@/components/ui/dialog";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { cn } from "@/lib/utils";
|
||||
@@ -106,35 +105,34 @@ export function CatalogImagePicker({
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
disabled={disabled}
|
||||
className="h-auto w-full justify-start gap-2 px-3 py-2"
|
||||
>
|
||||
{value ? (
|
||||
<CatalogImageThumb name={value} size={40} />
|
||||
) : (
|
||||
<div className="flex h-10 w-16 items-center justify-center rounded bg-muted">
|
||||
<ImageIcon className="h-4 w-4 text-muted-foreground" />
|
||||
</div>
|
||||
)}
|
||||
<div className="min-w-0 text-left">
|
||||
<p className="text-xs font-medium truncate">
|
||||
{label ||
|
||||
(type === "header"
|
||||
? "Headline image"
|
||||
: type === "teaser"
|
||||
? "Teaser image"
|
||||
: "Image")}
|
||||
</p>
|
||||
<p className="text-[11px] text-muted-foreground truncate font-mono">
|
||||
{value || "None selected"}
|
||||
</p>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
disabled={disabled}
|
||||
className="h-auto w-full justify-start gap-2 px-3 py-2"
|
||||
onClick={() => setOpen(true)}
|
||||
>
|
||||
{value ? (
|
||||
<CatalogImageThumb name={value} size={40} />
|
||||
) : (
|
||||
<div className="flex h-10 w-16 items-center justify-center rounded bg-muted">
|
||||
<ImageIcon className="h-4 w-4 text-muted-foreground" />
|
||||
</div>
|
||||
</Button>
|
||||
</DialogTrigger>
|
||||
)}
|
||||
<div className="min-w-0 text-left">
|
||||
<p className="text-xs font-medium truncate">
|
||||
{label ||
|
||||
(type === "header"
|
||||
? "Headline image"
|
||||
: type === "teaser"
|
||||
? "Teaser image"
|
||||
: "Image")}
|
||||
</p>
|
||||
<p className="text-[11px] text-muted-foreground truncate font-mono">
|
||||
{value || "None selected"}
|
||||
</p>
|
||||
</div>
|
||||
</Button>
|
||||
<DialogContent className="max-w-4xl">
|
||||
<DialogHeader>
|
||||
<DialogTitle>
|
||||
|
||||
Reference in new issue
Block a user