+
{servers.map((b: any) => (
<>
diff --git a/src/components/misc/UnofficalDialog.tsx b/src/components/misc/UnofficalDialog.tsx
new file mode 100644
index 0000000..48692cf
--- /dev/null
+++ b/src/components/misc/UnofficalDialog.tsx
@@ -0,0 +1,47 @@
+"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/components/ui/menubar.tsx b/src/components/ui/menubar.tsx
new file mode 100644
index 0000000..010145c
--- /dev/null
+++ b/src/components/ui/menubar.tsx
@@ -0,0 +1,240 @@
+"use client"
+
+import * as React from "react"
+import {
+ CheckIcon,
+ ChevronRightIcon,
+ DotFilledIcon,
+} from "@radix-ui/react-icons"
+import * as MenubarPrimitive from "@radix-ui/react-menubar"
+
+import { cn } from "@/lib/utils"
+
+const MenubarMenu = MenubarPrimitive.Menu
+
+const MenubarGroup = MenubarPrimitive.Group
+
+const MenubarPortal = MenubarPrimitive.Portal
+
+const MenubarSub = MenubarPrimitive.Sub
+
+const MenubarRadioGroup = MenubarPrimitive.RadioGroup
+
+const Menubar = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+Menubar.displayName = MenubarPrimitive.Root.displayName
+
+const MenubarTrigger = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName
+
+const MenubarSubTrigger = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef & {
+ inset?: boolean
+ }
+>(({ className, inset, children, ...props }, ref) => (
+
+ {children}
+
+
+))
+MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName
+
+const MenubarSubContent = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName
+
+const MenubarContent = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(
+ (
+ { className, align = "start", alignOffset = -4, sideOffset = 8, ...props },
+ ref
+ ) => (
+
+
+
+ )
+)
+MenubarContent.displayName = MenubarPrimitive.Content.displayName
+
+const MenubarItem = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef & {
+ inset?: boolean
+ }
+>(({ className, inset, ...props }, ref) => (
+
+))
+MenubarItem.displayName = MenubarPrimitive.Item.displayName
+
+const MenubarCheckboxItem = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, children, checked, ...props }, ref) => (
+
+
+
+
+
+
+ {children}
+
+))
+MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName
+
+const MenubarRadioItem = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, children, ...props }, ref) => (
+
+
+
+
+
+
+ {children}
+
+))
+MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName
+
+const MenubarLabel = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef & {
+ inset?: boolean
+ }
+>(({ className, inset, ...props }, ref) => (
+
+))
+MenubarLabel.displayName = MenubarPrimitive.Label.displayName
+
+const MenubarSeparator = React.forwardRef<
+ React.ElementRef,
+ React.ComponentPropsWithoutRef
+>(({ className, ...props }, ref) => (
+
+))
+MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName
+
+const MenubarShortcut = ({
+ className,
+ ...props
+}: React.HTMLAttributes) => {
+ return (
+
+ )
+}
+MenubarShortcut.displayname = "MenubarShortcut"
+
+export {
+ Menubar,
+ MenubarMenu,
+ MenubarTrigger,
+ MenubarContent,
+ MenubarItem,
+ MenubarSeparator,
+ MenubarLabel,
+ MenubarCheckboxItem,
+ MenubarRadioGroup,
+ MenubarRadioItem,
+ MenubarPortal,
+ MenubarSubContent,
+ MenubarSubTrigger,
+ MenubarGroup,
+ MenubarSub,
+ MenubarShortcut,
+}
diff --git a/src/lib/motdEngine.ts b/src/lib/motdEngine.ts
index b8295fd..d8ee07d 100644
--- a/src/lib/motdEngine.ts
+++ b/src/lib/motdEngine.ts
@@ -115,7 +115,10 @@ export default function parseToHTML(m: string, tw?: boolean): Promise {
});
}
-function objToHTML(i: Element): string {
+function objToHTML(i: Element | string): string {
+ if (typeof i == "string") {
+ return i;
+ }
var curClass = "";
var contents = "";
if (i.extra != undefined) {
@@ -152,7 +155,7 @@ function createHTML(
) {
if (className == undefined) className = "";
if (contents == undefined) contents = "";
- if (contents == "undefined") contents = "
";
+ if (contents == "\n") contents = "
";
if (tw == false || tw == undefined) {
return (
@@ -189,6 +192,9 @@ function colorConvert(className: string) {
if (classUnique.startsWith("text-[")) {
result +=
"color: " + classUnique.substring(6, classUnique.length - 1) + "; ";
+ } else {
+ result +=
+ "color: " + classUnique.substring(5, classUnique.length) + "; ";
}
}
if (classUnique.startsWith("font-bold")) {
diff --git a/src/version.tsx b/src/version.tsx
index 33d53bb..5f5560a 100644
--- a/src/version.tsx
+++ b/src/version.tsx
@@ -1,7 +1,7 @@
import Image from "next/image";
import Link from "next/link";
-export const version = "b-0.9.0";
+export const version = "b-0.10.0";
const User = ({ user }: { user: string }) => (
@@ -44,6 +44,28 @@ export const Changelog = () => (
+
+
+ Version b-0.10.0 (August 17th 2024)
+
+
+ - • Revamped server list button list
+ - • Added welcome dialog when first launching
+ -
+ • Fixed an issue where servers were still able to be favorited
+ client-side when logged out
+
+ - • Improved MOTD engine
+
+
+
👀
+ {/** Ensure Tailwind pre-renders all grid column types */}
+
+
+
+
+
+
Version b-0.9.0 (August 15th 2024)
diff --git a/yarn.lock b/yarn.lock
index 3fe8bc1..feaa35e 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -675,6 +675,11 @@
"@radix-ui/react-primitive" "2.0.0"
"@radix-ui/react-use-callback-ref" "1.1.0"
+"@radix-ui/react-icons@^1.3.0":
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-icons/-/react-icons-1.3.0.tgz#c61af8f323d87682c5ca76b856d60c2312dbcb69"
+ integrity sha512-jQxj/0LKgp+j9BiTXz3O3sgs26RNet2iLWmsPyRz2SIcR4q/4SbazXfnYwbAr+vLYKSfc7qxzyGQA1HLlYiuNw==
+
"@radix-ui/react-id@1.0.1":
version "1.0.1"
resolved "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.1.tgz"
@@ -746,6 +751,22 @@
aria-hidden "^1.1.1"
react-remove-scroll "2.5.7"
+"@radix-ui/react-menubar@^1.1.1":
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-menubar/-/react-menubar-1.1.1.tgz#e126514cb1c46e0a4f9fba7d016e578cc4e41f22"
+ integrity sha512-V05Hryq/BE2m+rs8d5eLfrS0jmSWSDHEbG7jEyLA5D5J9jTvWj/o3v3xDN9YsOlH6QIkJgiaNDaP+S4T1rdykw==
+ dependencies:
+ "@radix-ui/primitive" "1.1.0"
+ "@radix-ui/react-collection" "1.1.0"
+ "@radix-ui/react-compose-refs" "1.1.0"
+ "@radix-ui/react-context" "1.1.0"
+ "@radix-ui/react-direction" "1.1.0"
+ "@radix-ui/react-id" "1.1.0"
+ "@radix-ui/react-menu" "2.1.1"
+ "@radix-ui/react-primitive" "2.0.0"
+ "@radix-ui/react-roving-focus" "1.1.0"
+ "@radix-ui/react-use-controllable-state" "1.1.0"
+
"@radix-ui/react-navigation-menu@^1.1.4":
version "1.1.4"
resolved "https://registry.npmjs.org/@radix-ui/react-navigation-menu/-/react-navigation-menu-1.1.4.tgz"