fix: sort popover width

This commit is contained in:
hamster1963 2024-12-15 23:33:46 +08:00
parent cbbd69bbc7
commit 682267b520

View File

@ -137,8 +137,8 @@ export default function Servers() {
status === "all" status === "all"
? filteredServers ? filteredServers
: filteredServers.filter((server) => : filteredServers.filter((server) =>
[status].includes(formatNezhaInfo(nezhaWsData.now, server).online ? "online" : "offline"), [status].includes(formatNezhaInfo(nezhaWsData.now, server).online ? "online" : "offline"),
) )
filteredServers = filteredServers.sort((a, b) => { filteredServers = filteredServers.sort((a, b) => {
const serverAInfo = formatNezhaInfo(nezhaWsData.now, a) const serverAInfo = formatNezhaInfo(nezhaWsData.now, a)
@ -248,7 +248,7 @@ export default function Servers() {
<CogIcon className="size-[13px]" /> <CogIcon className="size-[13px]" />
</button> </button>
</PopoverTrigger> </PopoverTrigger>
<PopoverContent className="py-2 px-2 w-fit max-w-56 rounded-[8px]"> <PopoverContent className="py-2 px-2 w-fit max-w-60 rounded-[8px]">
<div className="flex flex-col gap-2"> <div className="flex flex-col gap-2">
<section className="flex flex-col gap-1"> <section className="flex flex-col gap-1">
<Label className=" text-stone-500 text-xs">Sort by</Label> <Label className=" text-stone-500 text-xs">Sort by</Label>