mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-09 12:44:58 -05:00
Compare commits
8 Commits
c19f56b685
...
fa7e1b1278
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa7e1b1278 | ||
|
|
e51a2ecd16 | ||
|
|
00f8a1f33e | ||
|
|
13489a4145 | ||
|
|
185bd77d5f | ||
|
|
48c038df0f | ||
|
|
49c0a599a4 | ||
|
|
7caf2c1b4e |
5
next-sitemap.config.js
Normal file
5
next-sitemap.config.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/** @type {import('next-sitemap').IConfig} */
|
||||||
|
module.exports = {
|
||||||
|
siteUrl: "https://mhsf.app",
|
||||||
|
generateRobotsTxt: true
|
||||||
|
}
|
||||||
@ -48,6 +48,7 @@
|
|||||||
"next": "14.2.10",
|
"next": "14.2.10",
|
||||||
"next-contentlayer": "^0.3.4",
|
"next-contentlayer": "^0.3.4",
|
||||||
"next-css-obfuscator": "^2.2.16",
|
"next-css-obfuscator": "^2.2.16",
|
||||||
|
"next-sitemap": "^4.2.3",
|
||||||
"next-themes": "^0.4.3",
|
"next-themes": "^0.4.3",
|
||||||
"nextjs-toploader": "^1.6.12",
|
"nextjs-toploader": "^1.6.12",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
|
|||||||
@ -68,7 +68,6 @@ import {
|
|||||||
} from "@/lib/api";
|
} from "@/lib/api";
|
||||||
import IconDisplay from "./IconDisplay";
|
import IconDisplay from "./IconDisplay";
|
||||||
import ServerSingle from "@/lib/single";
|
import ServerSingle from "@/lib/single";
|
||||||
import SnowfallController from "./misc/SnowfallController";
|
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { ServerResponse, OnlineServer } from "@/lib/types/mh-server";
|
import { ServerResponse, OnlineServer } from "@/lib/types/mh-server";
|
||||||
import {
|
import {
|
||||||
@ -856,7 +855,6 @@ export function CommandBarer() {
|
|||||||
<ServerCommandBar />
|
<ServerCommandBar />
|
||||||
<OfflineServerCB />
|
<OfflineServerCB />
|
||||||
<RandomServerDialog />
|
<RandomServerDialog />
|
||||||
<SnowfallController />
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -140,7 +140,7 @@ export default function ServerCustomize({
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, [isSignedIn]);
|
}, [isSignedIn, server]);
|
||||||
const form = useForm<z.infer<typeof formSchema>>({
|
const form = useForm<z.infer<typeof formSchema>>({
|
||||||
resolver: zodResolver(formSchema),
|
resolver: zodResolver(formSchema),
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
|
|||||||
@ -39,7 +39,6 @@ import { CloudSnow, InfoIcon } from "lucide-react";
|
|||||||
import LoggedInPopover from "./LoggedInPopover";
|
import LoggedInPopover from "./LoggedInPopover";
|
||||||
import SignInPopoverButton from "./SignInPopoverButton";
|
import SignInPopoverButton from "./SignInPopoverButton";
|
||||||
import InfoPopover from "../misc/InfoPopover";
|
import InfoPopover from "../misc/InfoPopover";
|
||||||
import { snowfallEvents } from "../misc/SnowfallController";
|
|
||||||
|
|
||||||
export default function TopBar({ inter }: { inter: string }) {
|
export default function TopBar({ inter }: { inter: string }) {
|
||||||
const clerk = useClerk();
|
const clerk = useClerk();
|
||||||
@ -48,16 +47,8 @@ export default function TopBar({ inter }: { inter: string }) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SignedOut>
|
<SignedOut>
|
||||||
<div className="mt-1 gap-1 grid grid-cols-6">
|
<div className="mt-1 gap-1 grid grid-cols-5">
|
||||||
<SignInPopoverButton className="col-span-2" variant="outline" />
|
<SignInPopoverButton className="col-span-2" variant="outline" />
|
||||||
<Button
|
|
||||||
size="icon"
|
|
||||||
variant="ghost"
|
|
||||||
className="mb-1"
|
|
||||||
onClick={() => snowfallEvents.emit("toggle")}
|
|
||||||
>
|
|
||||||
<CloudSnow className="h-[1.2rem] w-[1.2rem]" />
|
|
||||||
</Button>
|
|
||||||
<Popover>
|
<Popover>
|
||||||
<PopoverTrigger>
|
<PopoverTrigger>
|
||||||
<Button size="icon" variant="ghost">
|
<Button size="icon" variant="ghost">
|
||||||
@ -91,7 +82,7 @@ export default function TopBar({ inter }: { inter: string }) {
|
|||||||
</div>
|
</div>
|
||||||
</SignedOut>
|
</SignedOut>
|
||||||
<SignedIn>
|
<SignedIn>
|
||||||
<div className="mt-1 grid grid-cols-5 gap-1">
|
<div className="mt-1 grid grid-cols-4 gap-1">
|
||||||
<Popover>
|
<Popover>
|
||||||
<PopoverTrigger>
|
<PopoverTrigger>
|
||||||
<Button size="icon" variant="ghost" className="mb-1">
|
<Button size="icon" variant="ghost" className="mb-1">
|
||||||
@ -112,14 +103,6 @@ export default function TopBar({ inter }: { inter: string }) {
|
|||||||
<LoggedInPopover />
|
<LoggedInPopover />
|
||||||
</PopoverContent>
|
</PopoverContent>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Button
|
|
||||||
size="icon"
|
|
||||||
variant="ghost"
|
|
||||||
className="mb-1"
|
|
||||||
onClick={() => snowfallEvents.emit("toggle")}
|
|
||||||
>
|
|
||||||
<CloudSnow className="h-[1.2rem] w-[1.2rem]" />
|
|
||||||
</Button>
|
|
||||||
<Popover>
|
<Popover>
|
||||||
<PopoverTrigger>
|
<PopoverTrigger>
|
||||||
<Button size="icon" variant="ghost" className="mb-1">
|
<Button size="icon" variant="ghost" className="mb-1">
|
||||||
|
|||||||
@ -1,59 +0,0 @@
|
|||||||
/*
|
|
||||||
* MHSF, Minehut Server List
|
|
||||||
* All external content is rather licensed under the ECA Agreement
|
|
||||||
* located here: https://mhsf.app/docs/legal/external-content-agreement
|
|
||||||
*
|
|
||||||
* All code under MHSF is licensed under the MIT License
|
|
||||||
* by open source contributors
|
|
||||||
*
|
|
||||||
* Copyright (c) 2024 dvelo
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to
|
|
||||||
* deal in the Software without restriction, including without limitation the
|
|
||||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
* sell copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
"use client";
|
|
||||||
import { CommandEvents } from "@/lib/commandEvent";
|
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import Snowfall from "react-snowfall";
|
|
||||||
|
|
||||||
export const snowfallEvents = new CommandEvents();
|
|
||||||
export default function SnowfallController() {
|
|
||||||
const [visible, setVisible] = useState(true);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
snowfallEvents.on("toggle", () => {
|
|
||||||
setVisible(!visible);
|
|
||||||
});
|
|
||||||
}, [visible]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{visible && (
|
|
||||||
<Snowfall
|
|
||||||
style={{
|
|
||||||
position: "fixed",
|
|
||||||
width: "100vw",
|
|
||||||
height: "100vh",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
22
yarn.lock
22
yarn.lock
@ -373,6 +373,11 @@
|
|||||||
ts-pattern "^4.3.0"
|
ts-pattern "^4.3.0"
|
||||||
type-fest "^3.12.0"
|
type-fest "^3.12.0"
|
||||||
|
|
||||||
|
"@corex/deepmerge@^4.0.43":
|
||||||
|
version "4.0.43"
|
||||||
|
resolved "https://registry.yarnpkg.com/@corex/deepmerge/-/deepmerge-4.0.43.tgz#9bd42559ebb41cc5a7fb7cfeea5f231c20977dca"
|
||||||
|
integrity sha512-N8uEMrMPL0cu/bdboEWpQYb/0i2K5Qn8eCsxzOmxSggJbbQte7ljMRoXm917AbntqTGOzdTu+vP3KOOzoC70HQ==
|
||||||
|
|
||||||
"@discordjs/builders@^1.8.2":
|
"@discordjs/builders@^1.8.2":
|
||||||
version "1.8.2"
|
version "1.8.2"
|
||||||
resolved "https://registry.yarnpkg.com/@discordjs/builders/-/builders-1.8.2.tgz#535d970331ee40f20dec9ef8079e43092f323ce9"
|
resolved "https://registry.yarnpkg.com/@discordjs/builders/-/builders-1.8.2.tgz#535d970331ee40f20dec9ef8079e43092f323ce9"
|
||||||
@ -841,6 +846,11 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.10.tgz#1d3178340028ced2d679f84140877db4f420333c"
|
resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.10.tgz#1d3178340028ced2d679f84140877db4f420333c"
|
||||||
integrity sha512-dZIu93Bf5LUtluBXIv4woQw2cZVZ2DJTjax5/5DOs3lzEOeKLy7GxRSr4caK9/SCPdaW6bCgpye6+n4Dh9oJPw==
|
integrity sha512-dZIu93Bf5LUtluBXIv4woQw2cZVZ2DJTjax5/5DOs3lzEOeKLy7GxRSr4caK9/SCPdaW6bCgpye6+n4Dh9oJPw==
|
||||||
|
|
||||||
|
"@next/env@^13.4.3":
|
||||||
|
version "13.5.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.5.8.tgz#404d3b3e5881b6a0510500c6cc97e3589a2e6371"
|
||||||
|
integrity sha512-YmiG58BqyZ2FjrF2+5uZExL2BrLr8RTQzLXNDJ8pJr0O+rPlOeDPXp1p1/4OrR3avDidzZo3D8QO2cuDv1KCkw==
|
||||||
|
|
||||||
"@next/eslint-plugin-next@14.2.3":
|
"@next/eslint-plugin-next@14.2.3":
|
||||||
version "14.2.3"
|
version "14.2.3"
|
||||||
resolved "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.3.tgz"
|
resolved "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.3.tgz"
|
||||||
@ -6326,7 +6336,7 @@ minimessage-js@^1.1.3:
|
|||||||
resolved "https://registry.yarnpkg.com/minimessage-js/-/minimessage-js-1.1.3.tgz#ded53108d686e681cfb2071c2db60b6ae2da60db"
|
resolved "https://registry.yarnpkg.com/minimessage-js/-/minimessage-js-1.1.3.tgz#ded53108d686e681cfb2071c2db60b6ae2da60db"
|
||||||
integrity sha512-dP7O/JVfRwMwFl/8KQALtKa+Vo4Za3ihgcSLVB6X3k/fjZWhA8SDQBJ1xUZu0NB6mslkzrIE1Xo+EHYcSXGtQw==
|
integrity sha512-dP7O/JVfRwMwFl/8KQALtKa+Vo4Za3ihgcSLVB6X3k/fjZWhA8SDQBJ1xUZu0NB6mslkzrIE1Xo+EHYcSXGtQw==
|
||||||
|
|
||||||
minimist@^1.2.0, minimist@^1.2.6:
|
minimist@^1.2.0, minimist@^1.2.6, minimist@^1.2.8:
|
||||||
version "1.2.8"
|
version "1.2.8"
|
||||||
resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz"
|
resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz"
|
||||||
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
|
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
|
||||||
@ -6443,6 +6453,16 @@ next-css-obfuscator@^2.2.16:
|
|||||||
recoverable-random "^1.0.5"
|
recoverable-random "^1.0.5"
|
||||||
yargs "^17.7.2"
|
yargs "^17.7.2"
|
||||||
|
|
||||||
|
next-sitemap@^4.2.3:
|
||||||
|
version "4.2.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/next-sitemap/-/next-sitemap-4.2.3.tgz#5db3f650351a51e84b9fd6b58c5af2f9257b5058"
|
||||||
|
integrity sha512-vjdCxeDuWDzldhCnyFCQipw5bfpl4HmZA7uoo3GAaYGjGgfL4Cxb1CiztPuWGmS+auYs7/8OekRS8C2cjdAsjQ==
|
||||||
|
dependencies:
|
||||||
|
"@corex/deepmerge" "^4.0.43"
|
||||||
|
"@next/env" "^13.4.3"
|
||||||
|
fast-glob "^3.2.12"
|
||||||
|
minimist "^1.2.8"
|
||||||
|
|
||||||
next-themes@^0.4.3:
|
next-themes@^0.4.3:
|
||||||
version "0.4.3"
|
version "0.4.3"
|
||||||
resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.4.3.tgz#ea54552d5986936d177eed393ea50b658ae44800"
|
resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.4.3.tgz#ea54552d5986936d177eed393ea50b658ae44800"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user