diff --git a/WonderQ-Admin-UI/src/components/admin/ConciergeAdvisorEditor.tsx b/WonderQ-Admin-UI/src/components/admin/ConciergeAdvisorEditor.tsx index 100cb87..775df2a 100644 --- a/WonderQ-Admin-UI/src/components/admin/ConciergeAdvisorEditor.tsx +++ b/WonderQ-Admin-UI/src/components/admin/ConciergeAdvisorEditor.tsx @@ -89,6 +89,7 @@ export function ConciergeAdvisorEditor({ value={draft.avatar} onChange={(value) => update("avatar", value ?? "")} group="concierge" + aspectRatio="square" />
@@ -97,6 +98,7 @@ export function ConciergeAdvisorEditor({ value={draft.qrImage} onChange={(value) => update("qrImage", value ?? "")} group="concierge" + aspectRatio="square" />
diff --git a/WonderQ-Admin-UI/src/components/admin/HomeWanfaRecommendationRail.tsx b/WonderQ-Admin-UI/src/components/admin/HomeWanfaRecommendationRail.tsx index bdebb6d..7b231f4 100644 --- a/WonderQ-Admin-UI/src/components/admin/HomeWanfaRecommendationRail.tsx +++ b/WonderQ-Admin-UI/src/components/admin/HomeWanfaRecommendationRail.tsx @@ -3,7 +3,7 @@ import { ArrowDown, ArrowUp, Plus, Trash2 } from "lucide-react"; import type { HomeWanfaRecommendation, WanfaCategory } from "@/api"; import { Button } from "@/components/ui/button"; -import { NativeSelect } from "@/components/ui/select"; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Switch } from "@/components/ui/switch"; export function HomeWanfaRecommendationRail({ @@ -35,20 +35,23 @@ export function HomeWanfaRecommendationRail({

关联玩法分类,维护首页推荐入口和展示顺序。

- setSelectedCategoryId(event.target.value)} + onValueChange={setSelectedCategoryId} > - - {availableCategories.map((category) => ( - - ))} - + + + + + {availableCategories.map((category) => ( + + {category.label} + + ))} + + +
+ + ))} + {uploadTile} + + + {error ? ( +

+ {error} +

+ ) : null} + + ); +} diff --git a/WonderQ-Admin-UI/src/components/admin/SingleImageUploader.tsx b/WonderQ-Admin-UI/src/components/admin/SingleImageUploader.tsx index 325af75..cc51f72 100644 --- a/WonderQ-Admin-UI/src/components/admin/SingleImageUploader.tsx +++ b/WonderQ-Admin-UI/src/components/admin/SingleImageUploader.tsx @@ -10,10 +10,12 @@ export function SingleImageUploader({ value, onChange, group = "site-config", + aspectRatio = "landscape", }: { value?: string | null; onChange: (value: string | null) => void; group?: string; + aspectRatio?: "landscape" | "square"; }) { const inputRef = useRef(null); const [error, setError] = useState(""); @@ -53,7 +55,7 @@ export function SingleImageUploader({ }; return ( -
+
void }) { +export function ToastStack({ toasts, onClose }: { toasts: AdminToast[]; onClose: (id: string) => void }) { if (!toasts.length) return null; return ( -
+ {toasts.map((toast) => ( -
- {toast.tone === "success" ? : } - - {toast.title} - {toast.message} - - -
+ + {toast.tone === "success" ? ( + ))} -
+ ); } diff --git a/WonderQ-Admin-UI/src/components/admin/WanfaRouteDetailFields.tsx b/WonderQ-Admin-UI/src/components/admin/WanfaRouteDetailFields.tsx index 56ed514..a947239 100644 --- a/WonderQ-Admin-UI/src/components/admin/WanfaRouteDetailFields.tsx +++ b/WonderQ-Admin-UI/src/components/admin/WanfaRouteDetailFields.tsx @@ -1,5 +1,7 @@ import type { DetailCreate } from "@/api"; +import { ImageGalleryUploader } from "@/components/admin/ImageGalleryUploader"; import { Input } from "@/components/ui/input"; +import { Switch } from "@/components/ui/switch"; import { Textarea } from "@/components/ui/textarea"; const detailArrayFields = [ @@ -7,7 +9,6 @@ const detailArrayFields = [ ["included", "费用包含", "每行填写一项包含内容"], ["excluded", "费用不含", "每行填写一项不包含内容"], ["notes", "注意事项", "每行填写一项注意事项"], - ["gallery", "详情图片画廊", "每行填写一个 http(s) 图片地址"], ] as const; type DetailArrayField = (typeof detailArrayFields)[number][0]; @@ -100,21 +101,39 @@ export function WanfaRouteDetailFields({