mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-05 22:57:40 +03:00
consistently sort class names
keep None at the bottom
This commit is contained in:
parent
544d3c6139
commit
6ad5e98681
@ -125,7 +125,13 @@ export default function ClassificationSelectionDialog({
|
|||||||
isMobile && "gap-2 pb-4",
|
isMobile && "gap-2 pb-4",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{classes.sort().map((category) => (
|
{classes
|
||||||
|
.sort((a, b) => {
|
||||||
|
if (a === "none") return 1;
|
||||||
|
if (b === "none") return -1;
|
||||||
|
return a.localeCompare(b);
|
||||||
|
})
|
||||||
|
.map((category) => (
|
||||||
<SelectorItem
|
<SelectorItem
|
||||||
key={category}
|
key={category}
|
||||||
className="flex cursor-pointer gap-2 smart-capitalize"
|
className="flex cursor-pointer gap-2 smart-capitalize"
|
||||||
|
|||||||
@ -700,7 +700,13 @@ function LibrarySelector({
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{Object.keys(dataset).map((id) => (
|
{Object.keys(dataset)
|
||||||
|
.sort((a, b) => {
|
||||||
|
if (a === "none") return 1;
|
||||||
|
if (b === "none") return -1;
|
||||||
|
return a.localeCompare(b);
|
||||||
|
})
|
||||||
|
.map((id) => (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
key={id}
|
key={id}
|
||||||
className="group flex items-center justify-between"
|
className="group flex items-center justify-between"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user