diff --git a/public/branding/meta-banner.png b/public/branding/meta-banner.png new file mode 100644 index 0000000..fab38f5 Binary files /dev/null and b/public/branding/meta-banner.png differ diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 3fc6fcd..4ff189f 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -21,6 +21,17 @@ import ThemedToaster from "@/components/misc/ThemedToaster"; import UnofficalDialog from "@/components/misc/UnofficalDialog"; import ClientFadeIn from "@/components/ClientFadeIn"; import { BrandingGenericIcon } from "@/components/Icon"; +import type { Metadata } from "next"; + +export const metadata = { + openGraph: { + images: [ + { + url: "/branding/meta-banner.png", + }, + ], + }, +} satisfies Metadata; const inter = interFont({ variable: "--font-inter", subsets: ["latin"] }); export default async function RootLayout({ diff --git a/src/components/ServerList.tsx b/src/components/ServerList.tsx index 3013ae6..ae3fa3a 100644 --- a/src/components/ServerList.tsx +++ b/src/components/ServerList.tsx @@ -131,7 +131,7 @@ export default function ServerList() { const { user, isSignedIn } = useUser(); const [pOS, setpOS] = useState(false); const [ipr, setIPR] = useState("4"); - const [am, setAM] = useState(false); + const [am, setAM] = useState(false); const [filters, setFilters] = useState< Array<(server: OnlineServer) => Promise> >([]); @@ -147,11 +147,12 @@ export default function ServerList() { useEffect(() => { if (isSignedIn) { + setAM(true); console.log(user.publicMetadata); + setIPR((user.publicMetadata.ipr as string | undefined) || "4"); setPadding((user.publicMetadata.pad as string | undefined) || "0"); setpOS((user.publicMetadata.srv as boolean | undefined) || false); - setAM(pOS != false || padding != "0" || ipr != "4"); } }, [isSignedIn, user]); @@ -200,7 +201,7 @@ export default function ServerList() { if (loading) { return ( - <> +
@@ -217,7 +218,7 @@ export default function ServerList() {
- +
); } @@ -397,10 +398,10 @@ export default function ServerList() { ))} + + )} - -
@@ -867,7 +868,26 @@ export default function ServerList() { setPadding(v)} + onValueChange={(v) => { + if (am) + toast( + + These settings will not change over reloads + because you have account specific options enabled + + , + { icon: "⚠️" } + ); + setPadding(v); + }} > Default @@ -889,9 +909,9 @@ export default function ServerList() { - c == "favorites" && router.push("/sort/favorites") - } + onValueChange={(c) => { + if (c === "favorites") router.push("/sort/favorites"); + }} > Players Online @@ -912,8 +932,16 @@ export default function ServerList() { View the docs {am && ( - router.push("/account/settings")}> - Currently using settings in your preferences + router.push("/account/settings")} + className="block" + > + Using saved settings in Preferences +
+ + Your using settings stored on your account, that are not + temporary. +
)}