Support Gitea configuration and safe Catalog Studio furniture completion
This commit is contained in:
1 parent
26f071117b
commit
9f791ba284
22 files changed
+1120
-166
No files matched your search
@@ -42,11 +42,7 @@ export function ImportReview({
|
||||
const complete = items.every((item) => localByName.has(item.classname));
|
||||
const ready = items.filter((item) => {
|
||||
const local = localByName.get(item.classname);
|
||||
return (
|
||||
local &&
|
||||
local.sql.length === 0 &&
|
||||
compareFurniture(item, local).state !== "conflict"
|
||||
);
|
||||
return local && compareFurniture(item, local).state !== "conflict";
|
||||
});
|
||||
const blocked = items.filter((item) => {
|
||||
const local = localByName.get(item.classname);
|
||||
@@ -119,7 +115,7 @@ export function ImportReview({
|
||||
<>
|
||||
<p role="status" className="text-sm">
|
||||
{ready.length} ready to import · {existing} already in SQL
|
||||
(skipped) · {blocked} conflicts (skipped)
|
||||
(complete missing data) · {blocked} conflicts (skipped)
|
||||
</p>
|
||||
{inspection.items.some(
|
||||
(item) =>
|
||||
@@ -184,7 +180,10 @@ export function ImportReview({
|
||||
<>
|
||||
<p className="text-sm">
|
||||
Only the {ready.length} eligible items below will be
|
||||
submitted. Existing SQL items and conflicts are excluded.
|
||||
submitted. Existing furniture keeps its local IDs, SQL
|
||||
settings and catalog offers. Missing assets and catalog
|
||||
entries are completed; furnidata is refreshed. Conflicts are
|
||||
excluded.
|
||||
</p>
|
||||
<p className="text-xs text-[var(--admin-text-muted)]">
|
||||
Automatic categories and prices below are estimates. Source
|
||||
|
||||
@@ -692,6 +692,7 @@ export function StudioClient({
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
repairExisting: true,
|
||||
id: item.id,
|
||||
classname: item.classname,
|
||||
name: item.name,
|
||||
@@ -779,6 +780,7 @@ export function StudioClient({
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
sourceId: activeSource || undefined,
|
||||
repairExisting: true,
|
||||
items: toImport.map((i) => ({
|
||||
id: i.id,
|
||||
classname: i.classname,
|
||||
@@ -2323,6 +2325,16 @@ export function StudioClient({
|
||||
</Button>
|
||||
) : (
|
||||
<div className="space-y-2">
|
||||
<Button
|
||||
variant="outline"
|
||||
className="w-full gap-1.5"
|
||||
disabled={importingId !== null}
|
||||
onClick={() =>
|
||||
setReview({ items: [detail], single: true })
|
||||
}
|
||||
>
|
||||
Complete missing data
|
||||
</Button>
|
||||
{!detail.nitroExists && (
|
||||
<>
|
||||
<p className="rounded-md border border-[var(--admin-warning)]/30 bg-[var(--admin-warning)]/10 p-2 text-[0.65rem] text-[var(--admin-warning)]">
|
||||
|
||||
Reference in new issue
Block a user