diff --git a/monkeyai/admin/src/components/image-capability-selector.tsx b/monkeyai/admin/src/components/image-capability-selector.tsx new file mode 100644 index 000000000..d8c89563e --- /dev/null +++ b/monkeyai/admin/src/components/image-capability-selector.tsx @@ -0,0 +1,151 @@ +import { Badge } from "@/components/ui/badge" +import { Button } from "@/components/ui/button" +import { Field, FieldLabel } from "@/components/ui/field" +import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group" + +function AspectRatioGlyph({ value }: { value: string }) { + const [rawWidth, rawHeight] = value.split(":").map(Number) + const width = Number.isFinite(rawWidth) && rawWidth > 0 ? rawWidth : 1 + const height = Number.isFinite(rawHeight) && rawHeight > 0 ? rawHeight : 1 + const scale = Math.min(28 / width, 16 / height) + + return ( +