import { Dialog, Transition } from "@headlessui/react"; import Link from "next/link"; import { Fragment, useEffect, useRef, useState } from "react"; const web = { version: "v4.3.1", }; const logs = [ { version: "v4.3.1", pre: true, notes: null, highlights: true, changes: [ "Fix: Auto Next Episode forcing to play sub even if dub is selected", "Fix: Episode metadata not showing after switching to dub", "Fix: Profile picture weirdly cropped", "Fix: Weird padding on the navbar in profile page", ], }, { version: "v4.3.0", pre: true, notes: null, highlights: false, changes: [ "Added changelogs section", "Added recommendations based on user lists", "New Player!", "And other minor bug fixes!", ], }, ]; export default function ChangeLogs() { let [isOpen, setIsOpen] = useState(false); let completeButtonRef = useRef(null); function closeModal() { localStorage.setItem("version", web.version); setIsOpen(false); } function getVersion() { let version = localStorage.getItem("version"); if (version !== web.version) { setIsOpen(true); } } useEffect(() => { getVersion(); }, []); return ( <>

Changelogs

{/* Github Icon */} {/* Discord Icon */}

Hi! Welcome to the new changelogs section. Here you can see a lists of the latest changes and updates to the site.

*This update is still in it's pre-release state, please expect to see some bugs. If you find any, please report them.

{logs.map((x) => ( {x.changes.map((i, index) => (

- {i}

))}
))} {/*

v4.3.0 pre

*This update is still in it's pre-release state, please expect to see some bugs. If you find any, please report them.

- Added changelogs section

- Added recommendations based on user lists

- New Player!

- And other minor bug fixes!

*/}

see more changelogs{" "} here

); } type ChangelogsVersionsProps = { version?: string; pre: boolean; notes?: string | null; highlights?: boolean; children: React.ReactNode; }; export function ChangelogsVersions({ version, pre, notes, highlights, children, }: ChangelogsVersionsProps) { return ( <>

{version} {pre && ( pre )}

{notes && (

*{notes}

)} {children}
); }