- Link a Minecraft account to customize a server you own.
- {" "}
- {user?.publicMetadata.player != undefined && linked && (
- <>Currently linked to {user?.publicMetadata.player as string}>
- )}
-
+ const forceUnlink = async () => {
+ if (!linked) await toast.promise(unlinkMCAccount(), {
+ success: "Unlinked account!",
+ loading: "Unlinking...",
+ error: "Error while unlinking account.",
+ });
+ else
+ await toast.warning("Please use the normal unlink option before using the force unlink one.")
+ };
-
+ return (
+
+ Linking
+
+
+ Link Account
+
+
+ Link a Minecraft account to customize a server you own.
+ {" "}
+ {user?.publicMetadata.player != undefined && linked && (
+ <>Currently linked to {user?.publicMetadata.player as string}>
+ )}
+
- {linked && (
-
- )}
-
-
- Unlink Account
-
-
Unlink your Minecraft account if you have already linked one.
+
- {!linked && (
-
- )}
+ {linked && (
+
+ )}
+
+
+ Unlink Account
+
+
Unlink your Minecraft account if you have already linked one.
- {linked && (
-
- )}
-
-
- All of your customizations stay the same, and can be changed if another
- account links your Minecraft account.
-
-
- );
+ {!linked && (
+
+ )}
+
+ {linked && (
+
+ )}
+
+
+ All of your customizations stay the same, and can be changed if another
+ account links your Minecraft account.{" "}
+
+ Still linked in-game? Force unlink your account.
+
+
+
+ );
}
diff --git a/src/app/(main)/layout.tsx b/src/app/(main)/layout.tsx
index acbba34..9cfe6a2 100644
--- a/src/app/(main)/layout.tsx
+++ b/src/app/(main)/layout.tsx
@@ -37,13 +37,13 @@ import { ThemeProvider } from "@/components/ThemeProvider";
import { ClerkThemeProvider } from "@/components/clerk/ClerkThemeProvider";
import NewDomainDialog from "@/components/misc/NewDomainDialog";
import ThemedToaster from "@/components/misc/ThemedToaster";
-import UnofficalDialog from "@/components/misc/UnofficalDialog";
import { TooltipProvider } from "@/components/ui/tooltip";
import type { Metadata, Viewport } from "next";
import { Inter as interFont } from "next/font/google";
import LayoutPart from "@/components/feat/LayoutPart";
import AllBanners from "@/components/feat/AllBanners";
import Footer from "@/components/misc/Footer";
+import { SwitchEnvPopup } from "@/components/misc/SwitchEnvPopup";
export const extraMetadata = {
twitter: {
@@ -84,7 +84,7 @@ export default async function RootLayout({
-
+
diff --git a/src/components/clerk/SignInPopoverButton.tsx b/src/components/clerk/SignInPopoverButton.tsx
index 78c504c..67fc82f 100644
--- a/src/components/clerk/SignInPopoverButton.tsx
+++ b/src/components/clerk/SignInPopoverButton.tsx
@@ -35,8 +35,9 @@ import {
PopoverTrigger,
} from "@/components/ui/popover";
import { Button } from "../ui/button";
-import { AtSign, LogIn } from "lucide-react";
+import { AtSign, LogIn, Ship } from "lucide-react";
import { useClerk } from "@clerk/nextjs";
+import { useRouter } from "@/lib/useRouter";
export default function SignInPopoverButton({
className,
@@ -67,11 +68,14 @@ export default function SignInPopoverButton({
export function SignInPopover() {
const clerk = useClerk();
+ const router = useRouter();
return (
Login
-
- Customize your own servers and favorite other servers. Secured by Clerk
+
+ Customize your own servers and favorite other servers. Secured by Clerk
+
+ If you created your account before Jan. 29, 2025, use the legacy migration button.
+
);
}
diff --git a/src/components/misc/Link.tsx b/src/components/misc/Link.tsx
index c9f716e..8b869d3 100644
--- a/src/components/misc/Link.tsx
+++ b/src/components/misc/Link.tsx
@@ -41,8 +41,8 @@ export default function A({
}) {
return (
{(children || "").startsWith("Docs:") && (
@@ -68,7 +68,7 @@ export function ALegacy({
}) {
return (
@@ -95,6 +95,7 @@ export const pageFind = (text: string) => {
if (text === "Special:AccountOptions") return "/account/settings/options";
if (text.startsWith("Server:") && text.endsWith("/Customization"))
return "/server/" + text.substring(7, text.length - 14) + "/customization";
+ if (text === "Special:ClerkConvertionPage") return process.env.NEXT_PUBLIC_CLERK_SWITCH_DOMAIN;
if (text.startsWith("Server:")) return "/server/" + text.substring(7);
if (text.startsWith("Wiki:"))
return "https://minehut.wiki.gg/wiki/" + text.substring(5);
diff --git a/src/components/misc/SwitchEnvPopup.tsx b/src/components/misc/SwitchEnvPopup.tsx
new file mode 100644
index 0000000..ba8115e
--- /dev/null
+++ b/src/components/misc/SwitchEnvPopup.tsx
@@ -0,0 +1,58 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import {
+ Dialog,
+ DialogContent,
+ DialogTitle,
+ DialogTrigger,
+} from "../ui/dialog";
+import { OctagonAlert } from "lucide-react";
+import A from "./Link";
+import { Button } from "../ui/button";
+import { useRouter } from "@/lib/useRouter";
+
+export function SwitchEnvPopup() {
+ const [open, setOpen] = useState(false);
+ const router = useRouter();
+
+ useEffect(() => {
+ if (localStorage.getItem("mhsf--switch-env-alert") !== "true") {
+ setOpen(true);
+ }
+ }, [])
+
+ const setDialogTrigger = (v: boolean) => {
+ setOpen(v)
+ if (!v) {
+ localStorage.setItem("mhsf--switch-env-alert", "true")
+ }
+ }
+
+ return (
+
+ );
+}
diff --git a/src/components/misc/UnofficalDialog.tsx b/src/components/misc/UnofficalDialog.tsx
deleted file mode 100644
index 0f904c5..0000000
--- a/src/components/misc/UnofficalDialog.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * MHSF, Minehut Server List
- * All external content is rather licensed under the ECA Agreement
- * located here: https://list.mlnehut.com/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 { useEffect, useState } from "react";
-import {
- Dialog,
- DialogContent,
- DialogDescription,
- DialogHeader,
- DialogTitle,
-} from "../ui/dialog";
-
-export default function UnofficalDialog() {
- const [isOpen, setOpen] = useState(false);
-
- useEffect(() => {
- const dialog = localStorage.getItem("unoffical-dialog-open");
-
- if (dialog == null) {
- setOpen(true);
- }
- }, []);
-
- const onChangeVal = (state: boolean) => {
- if (state == false) {
- setOpen(false);
- localStorage.setItem("unoffical-dialog-open", "true");
- } else setOpen(state);
- };
-
- return (
-
- );
-}
diff --git a/src/config/version.tsx b/src/config/version.tsx
index 642fab2..b5a7e78 100644
--- a/src/config/version.tsx
+++ b/src/config/version.tsx
@@ -67,8 +67,25 @@ const FeatureList = ({
);
};
-export const version = "1.7.0";
+export const version = "1.7.5";
export const changelog: { name: string; id: string; changelog: ReactNode }[] = [
+ {
+ id: "tj4ijg09aern9eargjjuauerr",
+ name: "v1.7.5",
+ changelog: (
+
+ Version 1.7.5 (January 29th 2025)
+
+ }
+ />
+ ),
+ },
{
id: "38ufajf8efajwj3njdaisef",
name: "v1.7",