mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-07 17:44:59 -05:00
f
This commit is contained in:
parent
ed88ea8977
commit
c70332c144
@ -54,7 +54,13 @@ import {
|
|||||||
} from "@/components/ui/dropdown-menu";
|
} from "@/components/ui/dropdown-menu";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { ServerRandomServerProvider } from "./server-random-server-provider";
|
import { ServerRandomServerProvider } from "./server-random-server-provider";
|
||||||
import { Dice2, Dices, EllipsisIcon, RefreshCcw, ShareIcon } from "lucide-react";
|
import {
|
||||||
|
Dice2,
|
||||||
|
Dices,
|
||||||
|
EllipsisIcon,
|
||||||
|
RefreshCcw,
|
||||||
|
ShareIcon,
|
||||||
|
} from "lucide-react";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import useClipboard from "@/lib/useClipboard";
|
import useClipboard from "@/lib/useClipboard";
|
||||||
|
|
||||||
@ -101,9 +107,7 @@ export function ServerList() {
|
|||||||
<TooltipTrigger>
|
<TooltipTrigger>
|
||||||
<ModificationButton disabled={testModeEnabled} />
|
<ModificationButton disabled={testModeEnabled} />
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent
|
<TooltipContent side="bottom">
|
||||||
side="bottom"
|
|
||||||
>
|
|
||||||
{filterCount} modification(s) enabled
|
{filterCount} modification(s) enabled
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
@ -156,12 +160,14 @@ export function ServerList() {
|
|||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="flex items-center gap-2"
|
className="flex items-center gap-2"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const data = { url: "https://mhsf.app", text: "Check out MHSF, the modern server finder!" };
|
const data = {
|
||||||
if (navigator.canShare(data))
|
url: "https://mhsf.app",
|
||||||
navigator.share(data)
|
text: "Check out MHSF, the modern server finder!",
|
||||||
|
};
|
||||||
|
if (navigator.canShare(data)) navigator.share(data);
|
||||||
else {
|
else {
|
||||||
clipboard.writeText("https://mhsf.app")
|
clipboard.writeText("https://mhsf.app");
|
||||||
toast.success("Sent to clipboard!")
|
toast.success("Sent to clipboard!");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -171,11 +177,11 @@ export function ServerList() {
|
|||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</div>
|
</div>
|
||||||
{filterLoading ? (
|
{filterLoading && (
|
||||||
<span className="mt-2 left-[50%] right-[50%] absolute">
|
<span className="mt-2 left-[50%] right-[50%] absolute">
|
||||||
<Spinner />
|
<Spinner />
|
||||||
</span>
|
</span>
|
||||||
) : (
|
)}
|
||||||
<InfiniteScroll
|
<InfiniteScroll
|
||||||
dataLength={itemsLength}
|
dataLength={itemsLength}
|
||||||
next={fetchMoreData}
|
next={fetchMoreData}
|
||||||
@ -192,7 +198,6 @@ export function ServerList() {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</InfiniteScroll>
|
</InfiniteScroll>
|
||||||
)}
|
|
||||||
</ServerRandomServerProvider>
|
</ServerRandomServerProvider>
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user