fix: use configured furni source and catalog assets

This commit is contained in:
Simo committed 2026-08-02 14:22:05 +02:00
1 parent aed70db81f
commit c78f8812ad
25 files changed
+368 -129

No files matched your search

@@ -2,6 +2,7 @@
import { ImageOff, Loader2 } from "lucide-react";
import { useEffect, useRef, useState } from "react";
import { CATALOGUE_ASSET_BASE_PATH } from "@/lib/catalog-assets";
interface ImagePreviewProps {
value: string;
@@ -12,7 +13,7 @@ interface ImagePreviewProps {
export function ImagePreview({
value,
basePath = "/swf/c_images/catalogue",
basePath = CATALOGUE_ASSET_BASE_PATH,
height = 60,
className,
}: ImagePreviewProps) {
+2 -1
View File
@@ -51,6 +51,7 @@ import {
TooltipTrigger,
} from "@/components/ui/tooltip";
import { adminFetch } from "@/lib/admin-fetch";
import { catalogueIconUrl } from "@/lib/catalog-assets";
import { translateCaption } from "@/lib/catalog-translations";
import { cn } from "@/lib/utils";
@@ -115,7 +116,7 @@ export function CatalogIcon({
return (
<img
src={`/swf/c_images/catalogue/icon_${iconImage}.png`}
src={catalogueIconUrl(iconImage)}
alt=""
width={size}
height={size}
@@ -11,6 +11,7 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import { catalogueAssetUrl } from "@/lib/catalog-assets";
import { cn } from "@/lib/utils";
interface CatalogImagePickerProps {
@@ -248,10 +249,7 @@ function CatalogImageThumb({
}
// Try .png first, fallback to .gif
const src =
error === 0
? `/swf/c_images/catalogue/${name}.png`
: `/swf/c_images/catalogue/${name}.gif`;
const src = catalogueAssetUrl(name, error === 0 ? "png" : "gif");
return (
<img
+2 -1
View File
@@ -11,6 +11,7 @@ import {
DialogTitle,
} from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import { catalogueIconUrl } from "@/lib/catalog-assets";
import { cn } from "@/lib/utils";
interface IconPickerProps {
@@ -228,7 +229,7 @@ function IconPreview({
return (
<img
src={`/swf/c_images/catalogue/icon_${iconImage}.png`}
src={catalogueIconUrl(iconImage)}
alt=""
width={size}
height={size}