mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-18 17:14:26 +03:00
Move upload to button
This commit is contained in:
parent
4f8d02cd0f
commit
bd6fa0706f
@ -120,7 +120,7 @@ export default function FaceLibrary() {
|
|||||||
onSave={onUploadImage}
|
onSave={onUploadImage}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="relative flex h-11 w-full items-center justify-between">
|
<div className="relative mb-2 flex h-11 w-full items-center justify-between">
|
||||||
<ScrollArea className="w-full whitespace-nowrap">
|
<ScrollArea className="w-full whitespace-nowrap">
|
||||||
<div ref={tabsRef} className="flex flex-row">
|
<div ref={tabsRef} className="flex flex-row">
|
||||||
<ToggleGroup
|
<ToggleGroup
|
||||||
@ -163,6 +163,10 @@ export default function FaceLibrary() {
|
|||||||
<ScrollBar orientation="horizontal" className="h-0" />
|
<ScrollBar orientation="horizontal" className="h-0" />
|
||||||
</div>
|
</div>
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
|
<Button className="flex gap-2" onClick={() => setUpload(true)}>
|
||||||
|
<LuImagePlus className="size-7 rounded-md p-1 text-secondary-foreground" />
|
||||||
|
Upload Image
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
{pageToggle &&
|
{pageToggle &&
|
||||||
(pageToggle == "train" ? (
|
(pageToggle == "train" ? (
|
||||||
@ -175,7 +179,6 @@ export default function FaceLibrary() {
|
|||||||
<FaceGrid
|
<FaceGrid
|
||||||
faceImages={faceImages}
|
faceImages={faceImages}
|
||||||
pageToggle={pageToggle}
|
pageToggle={pageToggle}
|
||||||
setUpload={setUpload}
|
|
||||||
onRefresh={refreshFaces}
|
onRefresh={refreshFaces}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
@ -327,15 +330,9 @@ function FaceAttempt({ image, faceNames, onRefresh }: FaceAttemptProps) {
|
|||||||
type FaceGridProps = {
|
type FaceGridProps = {
|
||||||
faceImages: string[];
|
faceImages: string[];
|
||||||
pageToggle: string;
|
pageToggle: string;
|
||||||
setUpload: (upload: boolean) => void;
|
|
||||||
onRefresh: () => void;
|
onRefresh: () => void;
|
||||||
};
|
};
|
||||||
function FaceGrid({
|
function FaceGrid({ faceImages, pageToggle, onRefresh }: FaceGridProps) {
|
||||||
faceImages,
|
|
||||||
pageToggle,
|
|
||||||
setUpload,
|
|
||||||
onRefresh,
|
|
||||||
}: FaceGridProps) {
|
|
||||||
return (
|
return (
|
||||||
<div className="scrollbar-container flex flex-wrap gap-2 overflow-y-scroll">
|
<div className="scrollbar-container flex flex-wrap gap-2 overflow-y-scroll">
|
||||||
{faceImages.map((image: string) => (
|
{faceImages.map((image: string) => (
|
||||||
@ -346,9 +343,6 @@ function FaceGrid({
|
|||||||
onRefresh={onRefresh}
|
onRefresh={onRefresh}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
<Button key="upload" className="size-40" onClick={() => setUpload(true)}>
|
|
||||||
<LuImagePlus className="size-10" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user