fix: clarify popup text and form fields in import UI - fix Italian copy in nitro editor, use shared CloneSource interface, make nitro/icon fields optional
CI / check (push) Successful in 31s
CI / release (push) Skipped
CI / deploy (push) Successful in 1m3s

This commit is contained in:
openhands committed 2026-08-06 20:44:34 +02:00
1 parent f792c276b7
commit 94ccd098d5
2 files changed
+15 -16

No files matched your search

@@ -28,20 +28,12 @@ import {
} from "@/components/ui/select";
import { adminFetch } from "@/lib/admin-fetch";
import { HABBO_GAMEDATA_HOTELS } from "@/lib/habbo-gamedata-hotel";
import type { CloneSource } from "@/lib/services/clone-sources";
import { runSseImport } from "@/lib/sse-client";
import { cn } from "@/lib/utils";
// ── Types ─────────────────────────────────────────────────────────────────────
interface CloneSource {
id: string;
name: string;
furnidataUrl: string;
nitroBaseUrl: string;
iconBaseUrl: string;
hotel: string;
}
interface FurniItem {
classname: string;
name: string;
@@ -80,6 +72,9 @@ function SourceForm({ initial, onSave, onCancel, saving }: SourceFormProps) {
const [furnidataUrl, setFurnidataUrl] = useState(initial?.furnidataUrl ?? "");
const [nitroBaseUrl, setNitroBaseUrl] = useState(initial?.nitroBaseUrl ?? "");
const [iconBaseUrl, setIconBaseUrl] = useState(initial?.iconBaseUrl ?? "");
const [sourceSwfBaseUrl, setSourceSwfBaseUrl] = useState(
initial?.sourceSwfBaseUrl ?? "",
);
const [hotel, setHotel] = useState(initial?.hotel ?? "");
async function handleSubmit(e: React.FormEvent) {
@@ -90,6 +85,7 @@ function SourceForm({ initial, onSave, onCancel, saving }: SourceFormProps) {
furnidataUrl,
nitroBaseUrl,
iconBaseUrl,
sourceSwfBaseUrl,
hotel,
});
}
@@ -119,13 +115,16 @@ function SourceForm({ initial, onSave, onCancel, saving }: SourceFormProps) {
placeholder="Nitro base URL (e.g. https://x/bundled/furniture)"
value={nitroBaseUrl}
onChange={(e) => setNitroBaseUrl(e.target.value)}
required
/>
<Input
placeholder="Icon base URL (e.g. https://x/icons)"
value={iconBaseUrl}
onChange={(e) => setIconBaseUrl(e.target.value)}
required
/>
<Input
placeholder="SWF base URL (optional, for non-Habbo sources)"
value={sourceSwfBaseUrl}
onChange={(e) => setSourceSwfBaseUrl(e.target.value)}
/>
<Select value={hotel} onValueChange={setHotel}>
<SelectTrigger>