fix: improve clone all confirmation popup clarity
This commit is contained in:
1 parent
94ccd098d5
commit
b25e7b00dd
1 file changed
+11
-10
@@ -28,12 +28,20 @@ import {
|
|||||||
} from "@/components/ui/select";
|
} from "@/components/ui/select";
|
||||||
import { adminFetch } from "@/lib/admin-fetch";
|
import { adminFetch } from "@/lib/admin-fetch";
|
||||||
import { HABBO_GAMEDATA_HOTELS } from "@/lib/habbo-gamedata-hotel";
|
import { HABBO_GAMEDATA_HOTELS } from "@/lib/habbo-gamedata-hotel";
|
||||||
import type { CloneSource } from "@/lib/services/clone-sources";
|
|
||||||
import { runSseImport } from "@/lib/sse-client";
|
import { runSseImport } from "@/lib/sse-client";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
// ── Types ─────────────────────────────────────────────────────────────────────
|
// ── Types ─────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
interface CloneSource {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
furnidataUrl: string;
|
||||||
|
nitroBaseUrl: string;
|
||||||
|
iconBaseUrl: string;
|
||||||
|
hotel: string;
|
||||||
|
}
|
||||||
|
|
||||||
interface FurniItem {
|
interface FurniItem {
|
||||||
classname: string;
|
classname: string;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -72,9 +80,6 @@ function SourceForm({ initial, onSave, onCancel, saving }: SourceFormProps) {
|
|||||||
const [furnidataUrl, setFurnidataUrl] = useState(initial?.furnidataUrl ?? "");
|
const [furnidataUrl, setFurnidataUrl] = useState(initial?.furnidataUrl ?? "");
|
||||||
const [nitroBaseUrl, setNitroBaseUrl] = useState(initial?.nitroBaseUrl ?? "");
|
const [nitroBaseUrl, setNitroBaseUrl] = useState(initial?.nitroBaseUrl ?? "");
|
||||||
const [iconBaseUrl, setIconBaseUrl] = useState(initial?.iconBaseUrl ?? "");
|
const [iconBaseUrl, setIconBaseUrl] = useState(initial?.iconBaseUrl ?? "");
|
||||||
const [sourceSwfBaseUrl, setSourceSwfBaseUrl] = useState(
|
|
||||||
initial?.sourceSwfBaseUrl ?? "",
|
|
||||||
);
|
|
||||||
const [hotel, setHotel] = useState(initial?.hotel ?? "");
|
const [hotel, setHotel] = useState(initial?.hotel ?? "");
|
||||||
|
|
||||||
async function handleSubmit(e: React.FormEvent) {
|
async function handleSubmit(e: React.FormEvent) {
|
||||||
@@ -85,7 +90,6 @@ function SourceForm({ initial, onSave, onCancel, saving }: SourceFormProps) {
|
|||||||
furnidataUrl,
|
furnidataUrl,
|
||||||
nitroBaseUrl,
|
nitroBaseUrl,
|
||||||
iconBaseUrl,
|
iconBaseUrl,
|
||||||
sourceSwfBaseUrl,
|
|
||||||
hotel,
|
hotel,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -115,16 +119,13 @@ function SourceForm({ initial, onSave, onCancel, saving }: SourceFormProps) {
|
|||||||
placeholder="Nitro base URL (e.g. https://x/bundled/furniture)"
|
placeholder="Nitro base URL (e.g. https://x/bundled/furniture)"
|
||||||
value={nitroBaseUrl}
|
value={nitroBaseUrl}
|
||||||
onChange={(e) => setNitroBaseUrl(e.target.value)}
|
onChange={(e) => setNitroBaseUrl(e.target.value)}
|
||||||
|
required
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
placeholder="Icon base URL (e.g. https://x/icons)"
|
placeholder="Icon base URL (e.g. https://x/icons)"
|
||||||
value={iconBaseUrl}
|
value={iconBaseUrl}
|
||||||
onChange={(e) => setIconBaseUrl(e.target.value)}
|
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}>
|
<Select value={hotel} onValueChange={setHotel}>
|
||||||
<SelectTrigger>
|
<SelectTrigger>
|
||||||
|
|||||||
Reference in new issue
Block a user