Migrate from NextUI to HerUI

Update dependencies
This commit is contained in:
grimsi
2025-03-17 15:42:28 +01:00
parent d7258892fd
commit 84a90d41ea
47 changed files with 12506 additions and 3499 deletions
Vendored Regular → Executable
View File
+1 -1
View File
@@ -1,4 +1,4 @@
import {NextUIPluginConfig} from "@nextui-org/react";
import {NextUIPluginConfig} from "@heroui/react";
import {compileThemes, themes} from "./src/main/frontend/theming/themes"
export const NextUIConfig: NextUIPluginConfig = {
+12338 -3311
View File
File diff suppressed because it is too large Load Diff
+67 -67
View File
@@ -3,26 +3,26 @@
"version": "2.0.0-ALPHA",
"type": "module",
"dependencies": {
"@material-tailwind/react": "^2.1.9",
"@nextui-org/react": "^2.6.8",
"@material-tailwind/react": "^2.1.10",
"@heroui/react": "2.7.5",
"@phosphor-icons/react": "^2.1.7",
"@polymer/polymer": "3.5.2",
"@vaadin/bundles": "24.6.1",
"@vaadin/bundles": "24.6.6",
"@vaadin/common-frontend": "0.0.19",
"@vaadin/hilla-file-router": "24.6.1",
"@vaadin/hilla-frontend": "24.6.1",
"@vaadin/hilla-lit-form": "24.6.1",
"@vaadin/hilla-react-auth": "24.6.1",
"@vaadin/hilla-react-crud": "24.6.1",
"@vaadin/hilla-react-form": "24.6.1",
"@vaadin/hilla-react-i18n": "24.6.1",
"@vaadin/hilla-react-signals": "24.6.1",
"@vaadin/polymer-legacy-adapter": "24.6.1",
"@vaadin/react-components": "24.6.1",
"@vaadin/hilla-file-router": "24.6.6",
"@vaadin/hilla-frontend": "24.6.6",
"@vaadin/hilla-lit-form": "24.6.6",
"@vaadin/hilla-react-auth": "24.6.6",
"@vaadin/hilla-react-crud": "24.6.6",
"@vaadin/hilla-react-form": "24.6.6",
"@vaadin/hilla-react-i18n": "24.6.6",
"@vaadin/hilla-react-signals": "24.6.6",
"@vaadin/polymer-legacy-adapter": "24.6.6",
"@vaadin/react-components": "24.6.6",
"@vaadin/vaadin-development-mode-detector": "2.0.7",
"@vaadin/vaadin-lumo-styles": "24.6.1",
"@vaadin/vaadin-material-styles": "24.6.1",
"@vaadin/vaadin-themable-mixin": "24.6.1",
"@vaadin/vaadin-lumo-styles": "24.6.6",
"@vaadin/vaadin-material-styles": "24.6.6",
"@vaadin/vaadin-themable-mixin": "24.6.6",
"@vaadin/vaadin-usage-statistics": "2.1.3",
"class-variance-authority": "^0.7.0",
"classnames": "^2.5.1",
@@ -31,16 +31,16 @@
"cron-validator": "^1.3.1",
"date-fns": "2.29.3",
"formik": "^2.4.6",
"framer-motion": "^11.15.0",
"framer-motion": "^12.5.0",
"http-status-codes": "^2.3.0",
"lit": "3.2.1",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
"next-themes": "^0.4.4",
"moment-timezone": "^0.5.47",
"next-themes": "^0.4.6",
"react": "18.3.1",
"react-confetti-boom": "^1.0.0",
"react-dom": "18.3.1",
"react-router-dom": "6.28.0",
"react-router-dom": "6.29.0",
"sonner": "^1.7.1",
"tailwind-merge": "^2.5.2",
"yup": "^1.6.1"
@@ -48,22 +48,22 @@
"devDependencies": {
"@babel/preset-react": "7.26.3",
"@lit-labs/react": "^2.1.3",
"@preact/signals-react-transform": "0.5.0",
"@preact/signals-react-transform": "0.5.1",
"@rollup/plugin-replace": "6.0.2",
"@rollup/pluginutils": "5.1.4",
"@types/node": "^22.4.0",
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"@vaadin/hilla-generator-cli": "24.6.1",
"@vaadin/hilla-generator-core": "24.6.1",
"@vaadin/hilla-generator-plugin-backbone": "24.6.1",
"@vaadin/hilla-generator-plugin-barrel": "24.6.1",
"@vaadin/hilla-generator-plugin-client": "24.6.1",
"@vaadin/hilla-generator-plugin-model": "24.6.1",
"@vaadin/hilla-generator-plugin-push": "24.6.1",
"@vaadin/hilla-generator-plugin-signals": "24.6.1",
"@vaadin/hilla-generator-plugin-subtypes": "24.6.1",
"@vaadin/hilla-generator-utils": "24.6.1",
"@vaadin/hilla-generator-cli": "24.6.6",
"@vaadin/hilla-generator-core": "24.6.6",
"@vaadin/hilla-generator-plugin-backbone": "24.6.6",
"@vaadin/hilla-generator-plugin-barrel": "24.6.6",
"@vaadin/hilla-generator-plugin-client": "24.6.6",
"@vaadin/hilla-generator-plugin-model": "24.6.6",
"@vaadin/hilla-generator-plugin-push": "24.6.6",
"@vaadin/hilla-generator-plugin-signals": "24.6.6",
"@vaadin/hilla-generator-plugin-subtypes": "24.6.6",
"@vaadin/hilla-generator-utils": "24.6.6",
"@vitejs/plugin-react": "4.3.4",
"@vitejs/plugin-react-swc": "^3.7.0",
"async": "3.2.6",
@@ -72,12 +72,12 @@
"postcss": "^8.4.41",
"postcss-import": "^16.1.0",
"rollup-plugin-brotli": "3.1.0",
"rollup-plugin-visualizer": "5.13.1",
"rollup-plugin-visualizer": "5.14.0",
"strip-css-comments": "5.0.0",
"tailwindcss": "^3.4.13",
"transform-ast": "2.4.4",
"typescript": "5.7.2",
"vite": "6.0.6",
"typescript": "5.7.3",
"vite": "6.0.11",
"vite-plugin-checker": "0.8.0",
"workbox-build": "7.3.0",
"workbox-core": "7.3.0",
@@ -86,7 +86,7 @@
"overrides": {
"classnames": "$classnames",
"react": "$react",
"react-dom": "18.3.1",
"react-dom": "$react-dom",
"react-router-dom": "$react-router-dom",
"@vaadin/bundles": "$@vaadin/bundles",
"@vaadin/common-frontend": "$@vaadin/common-frontend",
@@ -100,7 +100,7 @@
"clsx": "$clsx",
"next-themes": "$next-themes",
"tailwind-merge": "$tailwind-merge",
"@nextui-org/react": "$@nextui-org/react",
"@heroui/react": "$@heroui/react",
"framer-motion": "$framer-motion",
"@material-tailwind/react": "$@material-tailwind/react",
"sonner": "$sonner",
@@ -129,61 +129,61 @@
"vaadin": {
"dependencies": {
"@polymer/polymer": "3.5.2",
"@vaadin/bundles": "24.6.1",
"@vaadin/bundles": "24.6.6",
"@vaadin/common-frontend": "0.0.19",
"@vaadin/hilla-file-router": "24.6.1",
"@vaadin/hilla-frontend": "24.6.1",
"@vaadin/hilla-lit-form": "24.6.1",
"@vaadin/hilla-react-auth": "24.6.1",
"@vaadin/hilla-react-crud": "24.6.1",
"@vaadin/hilla-react-form": "24.6.1",
"@vaadin/hilla-react-i18n": "24.6.1",
"@vaadin/hilla-react-signals": "24.6.1",
"@vaadin/polymer-legacy-adapter": "24.6.1",
"@vaadin/react-components": "24.6.1",
"@vaadin/hilla-file-router": "24.6.6",
"@vaadin/hilla-frontend": "24.6.6",
"@vaadin/hilla-lit-form": "24.6.6",
"@vaadin/hilla-react-auth": "24.6.6",
"@vaadin/hilla-react-crud": "24.6.6",
"@vaadin/hilla-react-form": "24.6.6",
"@vaadin/hilla-react-i18n": "24.6.6",
"@vaadin/hilla-react-signals": "24.6.6",
"@vaadin/polymer-legacy-adapter": "24.6.6",
"@vaadin/react-components": "24.6.6",
"@vaadin/vaadin-development-mode-detector": "2.0.7",
"@vaadin/vaadin-lumo-styles": "24.6.1",
"@vaadin/vaadin-material-styles": "24.6.1",
"@vaadin/vaadin-themable-mixin": "24.6.1",
"@vaadin/vaadin-lumo-styles": "24.6.6",
"@vaadin/vaadin-material-styles": "24.6.6",
"@vaadin/vaadin-themable-mixin": "24.6.6",
"@vaadin/vaadin-usage-statistics": "2.1.3",
"construct-style-sheets-polyfill": "3.1.0",
"date-fns": "2.29.3",
"lit": "3.2.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-router-dom": "6.28.0"
"react-router-dom": "6.29.0"
},
"devDependencies": {
"@babel/preset-react": "7.26.3",
"@preact/signals-react-transform": "0.5.0",
"@preact/signals-react-transform": "0.5.1",
"@rollup/plugin-replace": "6.0.2",
"@rollup/pluginutils": "5.1.4",
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"@vaadin/hilla-generator-cli": "24.6.1",
"@vaadin/hilla-generator-core": "24.6.1",
"@vaadin/hilla-generator-plugin-backbone": "24.6.1",
"@vaadin/hilla-generator-plugin-barrel": "24.6.1",
"@vaadin/hilla-generator-plugin-client": "24.6.1",
"@vaadin/hilla-generator-plugin-model": "24.6.1",
"@vaadin/hilla-generator-plugin-push": "24.6.1",
"@vaadin/hilla-generator-plugin-signals": "24.6.1",
"@vaadin/hilla-generator-plugin-subtypes": "24.6.1",
"@vaadin/hilla-generator-utils": "24.6.1",
"@vaadin/hilla-generator-cli": "24.6.6",
"@vaadin/hilla-generator-core": "24.6.6",
"@vaadin/hilla-generator-plugin-backbone": "24.6.6",
"@vaadin/hilla-generator-plugin-barrel": "24.6.6",
"@vaadin/hilla-generator-plugin-client": "24.6.6",
"@vaadin/hilla-generator-plugin-model": "24.6.6",
"@vaadin/hilla-generator-plugin-push": "24.6.6",
"@vaadin/hilla-generator-plugin-signals": "24.6.6",
"@vaadin/hilla-generator-plugin-subtypes": "24.6.6",
"@vaadin/hilla-generator-utils": "24.6.6",
"@vitejs/plugin-react": "4.3.4",
"async": "3.2.6",
"glob": "10.4.5",
"rollup-plugin-brotli": "3.1.0",
"rollup-plugin-visualizer": "5.13.1",
"rollup-plugin-visualizer": "5.14.0",
"strip-css-comments": "5.0.0",
"transform-ast": "2.4.4",
"typescript": "5.7.2",
"vite": "6.0.6",
"typescript": "5.7.3",
"vite": "6.0.11",
"vite-plugin-checker": "0.8.0",
"workbox-build": "7.3.0",
"workbox-core": "7.3.0",
"workbox-precaching": "7.3.0"
},
"hash": "8386ec0a264430ae74351314903f3a2bec7a94b06a38df5de6417ab03bedb4b9"
"hash": "4cb8eb38282e90ab28af32f01ad7d2f7a15758837309655a753bbc1989258d6f"
}
}
}
+3 -3
View File
@@ -1,7 +1,7 @@
import {Outlet, useHref, useNavigate} from 'react-router-dom';
import "./main.css";
import "Frontend/util/custom-validators";
import {NextUIProvider} from "@nextui-org/react";
import {HeroUIProvider} from "@heroui/react";
import {ThemeProvider as NextThemesProvider} from "next-themes";
import {themeNames} from "Frontend/theming/themes";
import {AuthProvider} from "Frontend/util/auth";
@@ -16,7 +16,7 @@ export default function App() {
client.middlewares = [ErrorHandlingMiddleware];
return (
<NextUIProvider className="size-full" navigate={navigate} useHref={useHref}>
<HeroUIProvider className="size-full" navigate={navigate} useHref={useHref}>
<NextThemesProvider attribute="class" themes={themeNames()} defaultTheme="gameyfin-violet-dark">
<AuthProvider>
<IconContext.Provider value={{size: 20}}>
@@ -25,6 +25,6 @@ export default function App() {
</IconContext.Provider>
</AuthProvider>
</NextThemesProvider>
</NextUIProvider>
</HeroUIProvider>
);
}
@@ -1,6 +1,6 @@
import {useAuth} from "Frontend/util/auth";
import {GearFine, Question, SignOut, User} from "@phosphor-icons/react";
import {Dropdown, DropdownItem, DropdownMenu, DropdownTrigger} from "@nextui-org/react";
import {Dropdown, DropdownItem, DropdownMenu, DropdownTrigger} from "@heroui/react";
import {useNavigate} from "react-router-dom";
import {ConfigEndpoint} from "Frontend/generated/endpoints";
import Avatar from "Frontend/components/general/Avatar";
@@ -12,7 +12,7 @@ export default function ProfileMenu() {
async function logout() {
if (auth.state.user?.managedBySso) {
window.location.href = await ConfigEndpoint.getLogoutUrl() || "/";
window.location.href = (await ConfigEndpoint.getLogoutUrl()) || "/";
} else {
await auth.logout();
}
@@ -4,7 +4,7 @@ import withConfigPage from "Frontend/components/administration/withConfigPage";
import * as Yup from 'yup';
import ConfigFormField from "Frontend/components/administration/ConfigFormField";
import {toast} from "sonner";
import {Button, Code, Divider, Tooltip} from "@nextui-org/react";
import {Button, Code, Divider, Tooltip} from "@heroui/react";
import {ArrowUDownLeft, SortAscending} from "@phosphor-icons/react";
function LogManagementLayout({getConfig, formik}: any) {
@@ -2,7 +2,7 @@ import React, {useEffect, useState} from "react";
import withConfigPage from "Frontend/components/administration/withConfigPage";
import ConfigFormField from "Frontend/components/administration/ConfigFormField";
import Section from "Frontend/components/general/Section";
import {Button, Card, Tooltip, useDisclosure} from "@nextui-org/react";
import {Button, Card, Tooltip, useDisclosure} from "@heroui/react";
import {MessageEndpoint, MessageTemplateEndpoint} from "Frontend/generated/endpoints";
import {toast} from "sonner";
import {PaperPlaneRight, Pencil} from "@phosphor-icons/react";
@@ -2,7 +2,7 @@ import React, {useEffect, useState} from "react";
import {PluginManagementEndpoint} from "Frontend/generated/endpoints";
import PluginDto from "Frontend/generated/de/grimsi/gameyfin/core/plugins/management/PluginDto";
import {PluginManagementCard} from "Frontend/components/general/PluginManagementCard";
import {Divider} from "@nextui-org/react";
import {Divider} from "@heroui/react";
export default function PluginManagement() {
const [plugins, setPlugins] = useState<PluginDto[]>([]);
@@ -1,6 +1,6 @@
import Section from "Frontend/components/general/Section";
import Input from "Frontend/components/general/Input";
import {Button, Input as NextUiInput, Tooltip} from "@nextui-org/react";
import {Button, Input as NextUiInput, Tooltip} from "@heroui/react";
import {Form, Formik} from "formik";
import {ArrowCounterClockwise, Check, Info, Trash} from "@phosphor-icons/react";
import React, {useEffect, useState} from "react";
@@ -3,7 +3,7 @@ import withConfigPage from "Frontend/components/administration/withConfigPage";
import * as Yup from 'yup';
import ConfigFormField from "Frontend/components/administration/ConfigFormField";
import Section from "Frontend/components/general/Section";
import {Button} from "@nextui-org/react";
import {Button} from "@heroui/react";
import {MagicWand} from "@phosphor-icons/react";
import {toast} from "sonner";
@@ -7,7 +7,7 @@ import UserInfoDto from "Frontend/generated/de/grimsi/gameyfin/users/dto/UserInf
import {UserManagementCard} from "Frontend/components/general/UserManagementCard";
import {SmallInfoField} from "Frontend/components/general/SmallInfoField";
import {Info, UserPlus} from "@phosphor-icons/react";
import {Button, Divider, Tooltip, useDisclosure} from "@nextui-org/react";
import {Button, Divider, Tooltip, useDisclosure} from "@heroui/react";
import InviteUserModal from "Frontend/components/general/InviteUserModal";
function UserManagementLayout({getConfig, formik}: any) {
@@ -9,7 +9,7 @@ import {
ModalFooter,
ModalHeader,
Textarea
} from "@nextui-org/react";
} from "@heroui/react";
import {toast} from "sonner";
import {MessageTemplateEndpoint} from "Frontend/generated/endpoints";
import MessageTemplateDto from "Frontend/generated/de/grimsi/gameyfin/messages/templates/MessageTemplateDto";
@@ -1,6 +1,6 @@
import React from "react";
import {Form, Formik} from "formik";
import {Button, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader} from "@nextui-org/react";
import {Button, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader} from "@heroui/react";
import {toast} from "sonner";
import Input from "Frontend/components/general/Input";
import {MessageEndpoint} from "Frontend/generated/endpoints";
@@ -2,7 +2,7 @@ import React, {useEffect, useRef, useState} from "react";
import {ConfigEndpoint} from "Frontend/generated/endpoints";
import ConfigEntryDto from "Frontend/generated/de/grimsi/gameyfin/config/dto/ConfigEntryDto";
import {Form, Formik} from "formik";
import {Button, Skeleton} from "@nextui-org/react";
import {Button, Skeleton} from "@heroui/react";
import {Check, Info} from "@phosphor-icons/react";
import ConfigValuePairDto from "Frontend/generated/de/grimsi/gameyfin/config/dto/ConfigValuePairDto";
import {SmallInfoField} from "Frontend/components/general/SmallInfoField";
@@ -1,5 +1,5 @@
import GameDto from "Frontend/generated/de/grimsi/gameyfin/games/dto/GameDto";
import {Card, Image} from "@nextui-org/react";
import {Card, Image} from "@heroui/react";
export function GameOverviewCard({game}: { game: GameDto }) {
return (
@@ -10,7 +10,7 @@ import {
SelectedItems,
Selection,
SelectItem
} from "@nextui-org/react";
} from "@heroui/react";
import {UserEndpoint} from "Frontend/generated/endpoints";
import UserInfoDto from "Frontend/generated/de/grimsi/gameyfin/users/dto/UserInfoDto";
import RoleChip from "Frontend/components/general/RoleChip";
@@ -1,5 +1,5 @@
import {useAuth} from "Frontend/util/auth";
import {Avatar as NextUiAvatar} from "@nextui-org/react";
import {Avatar as NextUiAvatar} from "@heroui/react";
// @ts-ignore
const Avatar = ({...props}) => {
@@ -1,5 +1,5 @@
import {useField} from "formik";
import {Checkbox} from "@nextui-org/react";
import {Checkbox} from "@heroui/react";
// @ts-ignore
const CheckboxInput = ({label, ...props}) => {
@@ -1,5 +1,5 @@
import React, {useEffect, useState} from "react";
import {Button, Code, Input, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader} from "@nextui-org/react";
import {Button, Code, Input, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader} from "@heroui/react";
import {UserEndpoint} from "Frontend/generated/endpoints";
import UserInfoDto from "Frontend/generated/de/grimsi/gameyfin/users/dto/UserInfoDto";
@@ -1,5 +1,5 @@
import {useField} from "formik";
import {Input as NextUiInput} from "@nextui-org/react";
import {Input as NextUiInput} from "@heroui/react";
import {SmallInfoField} from "Frontend/components/general/SmallInfoField";
import {XCircle} from "@phosphor-icons/react";
@@ -1,5 +1,5 @@
import React, {useEffect, useState} from "react";
import {Button, Input, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader} from "@nextui-org/react";
import {Button, Input, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader} from "@heroui/react";
import {RegistrationEndpoint, UserEndpoint} from "Frontend/generated/endpoints";
import {toast} from "sonner";
@@ -1,6 +1,6 @@
import React, {useEffect, useState} from "react";
import {Button, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader} from "@nextui-org/react";
import {Input as NextInput} from "@nextui-org/input";
import {Button, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader} from "@heroui/react";
import {Input as NextInput} from "@heroui/input";
import {WarningCircle} from "@phosphor-icons/react";
import {MessageEndpoint, PasswordResetEndpoint} from "Frontend/generated/endpoints";
import {toast} from "sonner";
@@ -1,5 +1,5 @@
import React, {useEffect, useState} from "react";
import {Button, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, Snippet} from "@nextui-org/react";
import {Button, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, Snippet} from "@heroui/react";
import TokenDto from "Frontend/generated/de/grimsi/gameyfin/shared/token/TokenDto";
import {timeUntil} from "Frontend/util/utils";
@@ -1,5 +1,5 @@
import React, {useEffect, useState} from "react";
import {Button, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader} from "@nextui-org/react";
import {Button, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader} from "@heroui/react";
import {toast} from "sonner";
import {Form, Formik} from "formik";
import {PluginConfigEndpoint, PluginManagementEndpoint} from "Frontend/generated/endpoints";
@@ -1,4 +1,4 @@
import {Button, Card, Chip, Skeleton, Tooltip, useDisclosure} from "@nextui-org/react";
import {Button, Card, Chip, Skeleton, Tooltip, useDisclosure} from "@heroui/react";
import {Plug, Power, SlidersHorizontal} from "@phosphor-icons/react";
import {PluginManagementEndpoint} from "Frontend/generated/endpoints";
import PluginDto from "Frontend/generated/de/grimsi/gameyfin/core/plugins/management/PluginDto";
@@ -1,4 +1,4 @@
import {Chip} from "@nextui-org/react";
import {Chip} from "@heroui/react";
import {roleToColor, roleToRoleName} from "Frontend/util/utils";
export default function RoleChip({role}: { role: string }) {
@@ -1,4 +1,4 @@
import {Divider} from "@nextui-org/react";
import {Divider} from "@heroui/react";
export default function Section({title}: { title: string }) {
return (
@@ -1,5 +1,5 @@
import {useField} from "formik";
import {Select, SelectItem} from "@nextui-org/react";
import {Select, SelectItem} from "@heroui/react";
// @ts-ignore
const SelectInput = ({label, values, ...props}) => {
@@ -1,5 +1,5 @@
import React from "react";
import {Button, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader} from "@nextui-org/react";
import {Button, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader} from "@heroui/react";
import {RegistrationEndpoint} from "Frontend/generated/endpoints";
import UserRegistrationDto from "Frontend/generated/de/grimsi/gameyfin/users/dto/UserRegistrationDto";
import {Form, Formik} from "formik";
@@ -1,4 +1,4 @@
import {Card, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, useDisclosure} from "@nextui-org/react";
import {Card, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, useDisclosure} from "@heroui/react";
import {DotsThreeVertical} from "@phosphor-icons/react";
import {useAuth} from "Frontend/util/auth";
import {useEffect, useState} from "react";
@@ -1,6 +1,6 @@
import {Outlet} from "react-router-dom";
import {Icon} from "@phosphor-icons/react";
import {Listbox, ListboxItem} from "@nextui-org/react";
import {Listbox, ListboxItem} from "@heroui/react";
import {ReactElement, useState} from "react";
export type MenuItem = {
@@ -17,7 +17,7 @@ export default function withSideMenu(menuItems: MenuItem[]) {
* Remove a "/" at the start if it exists
*/
function key(k: string): string {
return k.replace(/^(\/)/, "")
return k.replace(/^(\/)/, "");
}
/**
@@ -56,5 +56,5 @@ export default function withSideMenu(menuItems: MenuItem[]) {
</div>
</div>
);
}
};
}
@@ -1,5 +1,5 @@
import {Theme} from "Frontend/theming/theme";
import {Tooltip} from "@nextui-org/react";
import {Tooltip} from "@heroui/react";
export default function ThemePreview({theme, isSelected}: {
theme: Theme,
@@ -1,6 +1,6 @@
import {useTheme} from "next-themes";
import React, {useEffect, useState} from "react";
import {Button, Card, Divider, Select, Selection, SelectItem} from "@nextui-org/react";
import {Button, Card, Divider, Select, Selection, SelectItem} from "@heroui/react";
import {themes} from "Frontend/theming/themes";
import {Theme} from "Frontend/theming/theme";
import ThemePreview from "Frontend/components/theming/ThemePreview";
@@ -1,7 +1,7 @@
import React, {ReactNode, useState} from "react";
import {Form, Formik, FormikBag, FormikHelpers} from "formik";
import {ArrowLeft, ArrowRight, Check} from "@phosphor-icons/react";
import {Button} from "@nextui-org/react";
import {Button} from "@heroui/react";
import {Step, Stepper} from "@material-tailwind/react";
const Wizard = ({children, initialValues, onSubmit}: {
+1 -1
View File
@@ -12,7 +12,7 @@ import {Violet} from "./themes/violet";
import {Orange} from "./themes/orange";
import {Colorblind} from "./themes/colorblind";
import {Theme} from "./theme";
import {ConfigTheme, ConfigThemes} from "@nextui-org/react";
import {ConfigTheme, ConfigThemes} from "@heroui/react";
function light(c: Theme): ConfigTheme {
@@ -1,4 +1,4 @@
import {Card, CardBody, CardHeader} from "@nextui-org/react";
import {Card, CardBody, CardHeader} from "@heroui/react";
import {useNavigate, useSearchParams} from "react-router-dom";
import React, {useEffect, useState} from "react";
import {CheckCircle, Warning, WarningCircle} from "@phosphor-icons/react";
@@ -1,4 +1,4 @@
import {Button, Card, CardBody, CardHeader} from "@nextui-org/react";
import {Button, Card, CardBody, CardHeader} from "@heroui/react";
import {useNavigate, useSearchParams} from "react-router-dom";
import {Form, Formik} from "formik";
import Input from "Frontend/components/general/Input";
@@ -1,6 +1,6 @@
import {useAuth} from "Frontend/util/auth";
import {useEffect, useState} from "react";
import {Button, Card, CardBody, CardHeader, Link, useDisclosure} from "@nextui-org/react";
import {Button, Card, CardBody, CardHeader, Link, useDisclosure} from "@heroui/react";
import {useNavigate} from "react-router-dom";
import {Form, Formik} from "formik";
import Input from "Frontend/components/general/Input";
@@ -1,7 +1,7 @@
import {useRouteMetadata} from 'Frontend/util/routing.js';
import {useEffect, useState} from 'react';
import ProfileMenu from "Frontend/components/ProfileMenu";
import {Divider, Link, Navbar, NavbarBrand, NavbarContent, NavbarItem} from "@nextui-org/react";
import {Divider, Link, Navbar, NavbarBrand, NavbarContent, NavbarItem} from "@heroui/react";
import GameyfinLogo from "Frontend/components/theming/GameyfinLogo";
import * as PackageJson from "../../../../package.json";
import {Outlet, useNavigate} from "react-router-dom";
@@ -1,4 +1,4 @@
import {Button, Card, CardBody, CardHeader} from "@nextui-org/react";
import {Button, Card, CardBody, CardHeader} from "@heroui/react";
import {useNavigate, useSearchParams} from "react-router-dom";
import {Form, Formik} from "formik";
import Input from "Frontend/components/general/Input";
@@ -4,7 +4,7 @@ import Wizard from "Frontend/components/wizard/Wizard";
import WizardStep from "Frontend/components/wizard/WizardStep";
import Input from "Frontend/components/general/Input";
import {HandWaving, Palette, User} from "@phosphor-icons/react";
import {Card} from "@nextui-org/react";
import {Card} from "@heroui/react";
import {SetupEndpoint} from "Frontend/generated/endpoints";
import {ThemeSelector} from "Frontend/components/theming/ThemeSelector";
import {useNavigate} from "react-router-dom";
@@ -1,5 +1,5 @@
import {Link} from "react-router-dom";
import {Button, Input} from "@nextui-org/react";
import {Button, Input} from "@heroui/react";
import {toast} from "sonner";
import {LibraryEndpoint, SystemEndpoint} from "Frontend/generated/endpoints";
import {useState} from "react";
+3 -3
View File
@@ -1,5 +1,5 @@
import {Config} from "tailwindcss/types/config";
import {nextui} from "@nextui-org/react";
import {heroui} from "@heroui/react";
import {NextUIConfig} from "./nextui";
import withMT from "@material-tailwind/react/utils/withMT";
@@ -8,7 +8,7 @@ export default withMT({
content: [
'./src/main/frontend/index.html',
'./src/main/frontend/**/*.{js,ts,jsx,tsx}',
'./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}'
"./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}"
],
theme: {
extend: {
@@ -22,6 +22,6 @@ export default withMT({
}
},
plugins: [
nextui(NextUIConfig)
heroui(NextUIConfig)
],
} satisfies Config);
+40 -66
View File
@@ -16,18 +16,18 @@ import settings from './build/vaadin-dev-server-settings.json';
import {
AssetInfo,
ChunkInfo,
build,
defineConfig,
mergeConfig,
OutputOptions,
PluginOption,
ResolvedConfig,
InlineConfig,
UserConfigFn
} from 'vite';
import { getManifest, type ManifestTransform } from 'workbox-build';
import * as rollup from 'rollup';
import brotli from 'rollup-plugin-brotli';
import replace from '@rollup/plugin-replace';
import checker from 'vite-plugin-checker';
import postcssLit from './build/plugins/rollup-plugin-postcss-lit-custom/rollup-plugin-postcss-lit.js';
@@ -118,87 +118,61 @@ function injectManifestToSWPlugin(): rollup.Plugin {
}
function buildSWPlugin(opts: { devMode: boolean }): PluginOption {
let config: ResolvedConfig;
let buildConfig: InlineConfig;
let buildOutput: rollup.RollupOutput;
const devMode = opts.devMode;
const swObj: { code?: string, map?: rollup.SourceMap | null } = {};
async function build(action: 'generate' | 'write', additionalPlugins: rollup.Plugin[] = []) {
const includedPluginNames = [
'vite:esbuild',
'rollup-plugin-dynamic-import-variables',
'vite:esbuild-transpile',
'vite:terser'
];
const plugins: rollup.Plugin[] = config.plugins.filter((p) => {
return includedPluginNames.includes(p.name);
});
const resolver = config.createResolver();
const resolvePlugin: rollup.Plugin = {
name: 'resolver',
resolveId(source, importer, _options) {
return resolver(source, importer);
}
};
plugins.unshift(resolvePlugin); // Put resolve first
plugins.push(
replace({
values: {
'process.env.NODE_ENV': JSON.stringify(config.mode),
...config.define
},
preventAssignment: true
})
);
if (additionalPlugins) {
plugins.push(...additionalPlugins);
}
const bundle = await rollup.rollup({
input: path.resolve(settings.clientServiceWorkerSource),
plugins
});
try {
return await bundle[action]({
file: path.resolve(buildOutputFolder, 'sw.js'),
format: 'es',
exports: 'none',
sourcemap: config.command === 'serve' || config.build.sourcemap,
inlineDynamicImports: true
});
} finally {
await bundle.close();
}
}
return {
name: 'vaadin:build-sw',
enforce: 'post',
async configResolved(resolvedConfig) {
config = resolvedConfig;
async configResolved(viteConfig) {
buildConfig = {
base: viteConfig.base,
root: viteConfig.root,
mode: viteConfig.mode,
resolve: viteConfig.resolve,
define: {
...viteConfig.define,
'process.env.NODE_ENV': JSON.stringify(viteConfig.mode),
},
build: {
write: !devMode,
minify: viteConfig.build.minify,
outDir: viteConfig.build.outDir,
sourcemap: viteConfig.command === 'serve' || viteConfig.build.sourcemap,
emptyOutDir: false,
modulePreload: false,
rollupOptions: {
input: {
sw: settings.clientServiceWorkerSource
},
output: {
exports: 'none',
entryFileNames: 'sw.js',
inlineDynamicImports: true,
},
},
},
};
},
async buildStart() {
if (devMode) {
const { output } = await build('generate');
swObj.code = output[0].code;
swObj.map = output[0].map;
buildOutput = await build(buildConfig) as rollup.RollupOutput;
}
},
async load(id) {
if (id.endsWith('sw.js')) {
return '';
}
},
async transform(_code, id) {
if (id.endsWith('sw.js')) {
return swObj;
return buildOutput.output[0].code;
}
},
async closeBundle() {
if (!devMode) {
await build('write', [injectManifestToSWPlugin(), brotli()]);
await build({
...buildConfig,
plugins: [injectManifestToSWPlugin(), brotli()]
});
}
}
},
};
}
+6 -6
View File
@@ -1,13 +1,13 @@
# Plugin versions
kotlinVersion=2.1.0
kspVersion=2.1.0-1.0.29
vaadinVersion=24.6.1
springBootVersion=3.4.1
kotlinVersion=2.1.10
kspVersion=2.1.10-1.0.31
vaadinVersion=24.6.6
springBootVersion=3.4.3
springCloudVersion=2024.0.0
springDependencyManagementVersion=1.1.6
springDependencyManagementVersion=1.1.7
# Dependency versions
pf4jVersion=3.13.0
pf4jKspVersion=2.1.0-1.0.2
pf4jKspVersion=2.1.10-1.0.2
# Annotation processor settings
kapt.use.k2=true
ksp.useKSP2=true
+6
View File
@@ -0,0 +1,6 @@
{
"name": "gameyfin",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}