mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-12 01:57:36 +03:00
Fix layout of classification selection
This commit is contained in:
parent
0468b13725
commit
5f0870df0e
@ -11,7 +11,6 @@ import {
|
|||||||
FrigateConfig,
|
FrigateConfig,
|
||||||
} from "@/types/frigateConfig";
|
} from "@/types/frigateConfig";
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import { isMobile } from "react-device-detect";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { FaFolderPlus } from "react-icons/fa";
|
import { FaFolderPlus } from "react-icons/fa";
|
||||||
import { MdModelTraining } from "react-icons/md";
|
import { MdModelTraining } from "react-icons/md";
|
||||||
@ -131,7 +130,7 @@ export default function ModelSelectionView({
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex size-full gap-2 p-2">
|
<div className="grid auto-rows-max grid-cols-2 gap-2 overflow-y-auto p-2 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-8 3xl:grid-cols-10">
|
||||||
{selectedClassificationConfigs.length === 0 ? (
|
{selectedClassificationConfigs.length === 0 ? (
|
||||||
<NoModelsView
|
<NoModelsView
|
||||||
onCreateModel={() => setNewModel(true)}
|
onCreateModel={() => setNewModel(true)}
|
||||||
@ -208,14 +207,13 @@ function ModelCard({ config, onClick }: ModelCardProps) {
|
|||||||
<div
|
<div
|
||||||
key={config.name}
|
key={config.name}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative size-60 cursor-pointer overflow-hidden rounded-lg",
|
"relative aspect-square w-full cursor-pointer overflow-hidden rounded-lg",
|
||||||
"outline-transparent duration-500",
|
"outline-transparent duration-500",
|
||||||
isMobile && "w-full",
|
|
||||||
)}
|
)}
|
||||||
onClick={() => onClick()}
|
onClick={() => onClick()}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
className={cn("size-full", isMobile && "w-full")}
|
className="size-full"
|
||||||
src={`${baseUrl}clips/${config.name}/dataset/${coverImage?.name}/${coverImage?.img}`}
|
src={`${baseUrl}clips/${config.name}/dataset/${coverImage?.name}/${coverImage?.img}`}
|
||||||
/>
|
/>
|
||||||
<ImageShadowOverlay />
|
<ImageShadowOverlay />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user