mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-16 08:15:48 +00:00
Update Hilla to pre-release 24.8.0.alpha6
because of Kotlin nullability support
This commit is contained in:
@@ -6,6 +6,9 @@ allprojects {
|
|||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
maven {
|
||||||
|
setUrl("https://maven.vaadin.com/vaadin-prereleases/")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Generated
+852
-820
File diff suppressed because it is too large
Load Diff
+53
-53
@@ -9,22 +9,22 @@
|
|||||||
"@polymer/polymer": "3.5.2",
|
"@polymer/polymer": "3.5.2",
|
||||||
"@react-stately/data": "^3.12.2",
|
"@react-stately/data": "^3.12.2",
|
||||||
"@react-types/shared": "^3.28.0",
|
"@react-types/shared": "^3.28.0",
|
||||||
"@vaadin/bundles": "24.7.5",
|
"@vaadin/bundles": "24.8.0-alpha15",
|
||||||
"@vaadin/common-frontend": "0.0.19",
|
"@vaadin/common-frontend": "0.0.19",
|
||||||
"@vaadin/hilla-file-router": "24.7.3",
|
"@vaadin/hilla-file-router": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-frontend": "24.7.3",
|
"@vaadin/hilla-frontend": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-lit-form": "24.7.3",
|
"@vaadin/hilla-lit-form": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-react-auth": "24.7.3",
|
"@vaadin/hilla-react-auth": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-react-crud": "24.7.3",
|
"@vaadin/hilla-react-crud": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-react-form": "24.7.3",
|
"@vaadin/hilla-react-form": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-react-i18n": "24.7.3",
|
"@vaadin/hilla-react-i18n": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-react-signals": "24.7.3",
|
"@vaadin/hilla-react-signals": "24.8.0-alpha6",
|
||||||
"@vaadin/polymer-legacy-adapter": "24.7.5",
|
"@vaadin/polymer-legacy-adapter": "24.8.0-alpha15",
|
||||||
"@vaadin/react-components": "24.7.5",
|
"@vaadin/react-components": "24.8.0-alpha15",
|
||||||
"@vaadin/vaadin-development-mode-detector": "2.0.7",
|
"@vaadin/vaadin-development-mode-detector": "2.0.7",
|
||||||
"@vaadin/vaadin-lumo-styles": "24.7.5",
|
"@vaadin/vaadin-lumo-styles": "24.8.0-alpha15",
|
||||||
"@vaadin/vaadin-material-styles": "24.7.5",
|
"@vaadin/vaadin-material-styles": "24.8.0-alpha15",
|
||||||
"@vaadin/vaadin-themable-mixin": "24.7.5",
|
"@vaadin/vaadin-themable-mixin": "24.8.0-alpha15",
|
||||||
"@vaadin/vaadin-usage-statistics": "2.1.3",
|
"@vaadin/vaadin-usage-statistics": "2.1.3",
|
||||||
"classnames": "^2.5.1",
|
"classnames": "^2.5.1",
|
||||||
"construct-style-sheets-polyfill": "3.1.0",
|
"construct-style-sheets-polyfill": "3.1.0",
|
||||||
@@ -55,17 +55,17 @@
|
|||||||
"@types/node": "^22.4.0",
|
"@types/node": "^22.4.0",
|
||||||
"@types/react": "18.3.20",
|
"@types/react": "18.3.20",
|
||||||
"@types/react-dom": "18.3.6",
|
"@types/react-dom": "18.3.6",
|
||||||
"@vaadin/hilla-generator-cli": "24.7.3",
|
"@vaadin/hilla-generator-cli": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-core": "24.7.3",
|
"@vaadin/hilla-generator-core": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-backbone": "24.7.3",
|
"@vaadin/hilla-generator-plugin-backbone": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-barrel": "24.7.3",
|
"@vaadin/hilla-generator-plugin-barrel": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-client": "24.7.3",
|
"@vaadin/hilla-generator-plugin-client": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-model": "24.7.3",
|
"@vaadin/hilla-generator-plugin-model": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-push": "24.7.3",
|
"@vaadin/hilla-generator-plugin-push": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-signals": "24.7.3",
|
"@vaadin/hilla-generator-plugin-signals": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-subtypes": "24.7.3",
|
"@vaadin/hilla-generator-plugin-subtypes": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-transfertypes": "24.7.3",
|
"@vaadin/hilla-generator-plugin-transfertypes": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-utils": "24.7.3",
|
"@vaadin/hilla-generator-utils": "24.8.0-alpha6",
|
||||||
"@vitejs/plugin-react": "4.4.1",
|
"@vitejs/plugin-react": "4.4.1",
|
||||||
"@vitejs/plugin-react-swc": "^3.7.0",
|
"@vitejs/plugin-react-swc": "^3.7.0",
|
||||||
"async": "3.2.6",
|
"async": "3.2.6",
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"strip-css-comments": "5.0.0",
|
"strip-css-comments": "5.0.0",
|
||||||
"tailwindcss": "^3.4.13",
|
"tailwindcss": "^3.4.13",
|
||||||
"transform-ast": "2.4.4",
|
"transform-ast": "2.4.4",
|
||||||
"typescript": "5.7.3",
|
"typescript": "5.8.3",
|
||||||
"vite": "6.3.3",
|
"vite": "6.3.3",
|
||||||
"vite-plugin-checker": "0.9.1",
|
"vite-plugin-checker": "0.9.1",
|
||||||
"workbox-build": "7.3.0",
|
"workbox-build": "7.3.0",
|
||||||
@@ -133,22 +133,22 @@
|
|||||||
"vaadin": {
|
"vaadin": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@polymer/polymer": "3.5.2",
|
"@polymer/polymer": "3.5.2",
|
||||||
"@vaadin/bundles": "24.7.5",
|
"@vaadin/bundles": "24.8.0-alpha15",
|
||||||
"@vaadin/common-frontend": "0.0.19",
|
"@vaadin/common-frontend": "0.0.19",
|
||||||
"@vaadin/hilla-file-router": "24.7.3",
|
"@vaadin/hilla-file-router": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-frontend": "24.7.3",
|
"@vaadin/hilla-frontend": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-lit-form": "24.7.3",
|
"@vaadin/hilla-lit-form": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-react-auth": "24.7.3",
|
"@vaadin/hilla-react-auth": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-react-crud": "24.7.3",
|
"@vaadin/hilla-react-crud": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-react-form": "24.7.3",
|
"@vaadin/hilla-react-form": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-react-i18n": "24.7.3",
|
"@vaadin/hilla-react-i18n": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-react-signals": "24.7.3",
|
"@vaadin/hilla-react-signals": "24.8.0-alpha6",
|
||||||
"@vaadin/polymer-legacy-adapter": "24.7.5",
|
"@vaadin/polymer-legacy-adapter": "24.8.0-alpha15",
|
||||||
"@vaadin/react-components": "24.7.5",
|
"@vaadin/react-components": "24.8.0-alpha15",
|
||||||
"@vaadin/vaadin-development-mode-detector": "2.0.7",
|
"@vaadin/vaadin-development-mode-detector": "2.0.7",
|
||||||
"@vaadin/vaadin-lumo-styles": "24.7.5",
|
"@vaadin/vaadin-lumo-styles": "24.8.0-alpha15",
|
||||||
"@vaadin/vaadin-material-styles": "24.7.5",
|
"@vaadin/vaadin-material-styles": "24.8.0-alpha15",
|
||||||
"@vaadin/vaadin-themable-mixin": "24.7.5",
|
"@vaadin/vaadin-themable-mixin": "24.8.0-alpha15",
|
||||||
"@vaadin/vaadin-usage-statistics": "2.1.3",
|
"@vaadin/vaadin-usage-statistics": "2.1.3",
|
||||||
"construct-style-sheets-polyfill": "3.1.0",
|
"construct-style-sheets-polyfill": "3.1.0",
|
||||||
"date-fns": "2.29.3",
|
"date-fns": "2.29.3",
|
||||||
@@ -164,17 +164,17 @@
|
|||||||
"@rollup/pluginutils": "5.1.4",
|
"@rollup/pluginutils": "5.1.4",
|
||||||
"@types/react": "18.3.20",
|
"@types/react": "18.3.20",
|
||||||
"@types/react-dom": "18.3.6",
|
"@types/react-dom": "18.3.6",
|
||||||
"@vaadin/hilla-generator-cli": "24.7.3",
|
"@vaadin/hilla-generator-cli": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-core": "24.7.3",
|
"@vaadin/hilla-generator-core": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-backbone": "24.7.3",
|
"@vaadin/hilla-generator-plugin-backbone": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-barrel": "24.7.3",
|
"@vaadin/hilla-generator-plugin-barrel": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-client": "24.7.3",
|
"@vaadin/hilla-generator-plugin-client": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-model": "24.7.3",
|
"@vaadin/hilla-generator-plugin-model": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-push": "24.7.3",
|
"@vaadin/hilla-generator-plugin-push": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-signals": "24.7.3",
|
"@vaadin/hilla-generator-plugin-signals": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-subtypes": "24.7.3",
|
"@vaadin/hilla-generator-plugin-subtypes": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-plugin-transfertypes": "24.7.3",
|
"@vaadin/hilla-generator-plugin-transfertypes": "24.8.0-alpha6",
|
||||||
"@vaadin/hilla-generator-utils": "24.7.3",
|
"@vaadin/hilla-generator-utils": "24.8.0-alpha6",
|
||||||
"@vitejs/plugin-react": "4.4.1",
|
"@vitejs/plugin-react": "4.4.1",
|
||||||
"async": "3.2.6",
|
"async": "3.2.6",
|
||||||
"glob": "11.0.2",
|
"glob": "11.0.2",
|
||||||
@@ -182,13 +182,13 @@
|
|||||||
"rollup-plugin-visualizer": "5.14.0",
|
"rollup-plugin-visualizer": "5.14.0",
|
||||||
"strip-css-comments": "5.0.0",
|
"strip-css-comments": "5.0.0",
|
||||||
"transform-ast": "2.4.4",
|
"transform-ast": "2.4.4",
|
||||||
"typescript": "5.7.3",
|
"typescript": "5.8.3",
|
||||||
"vite": "6.3.3",
|
"vite": "6.3.3",
|
||||||
"vite-plugin-checker": "0.9.1",
|
"vite-plugin-checker": "0.9.1",
|
||||||
"workbox-build": "7.3.0",
|
"workbox-build": "7.3.0",
|
||||||
"workbox-core": "7.3.0",
|
"workbox-core": "7.3.0",
|
||||||
"workbox-precaching": "7.3.0"
|
"workbox-precaching": "7.3.0"
|
||||||
},
|
},
|
||||||
"hash": "4507ade910f8d37b606e1a8cff078e31d3a90314f1c7426a4aea761dc563f02a"
|
"hash": "fdf5506c7d7915b341632254a47867cd7d7007cab8d08447bd909b37cdb94cf9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ function MessageManagementLayout({getConfig, getConfigs, formik}: any) {
|
|||||||
const editorModal = useDisclosure();
|
const editorModal = useDisclosure();
|
||||||
const testNotificationModal = useDisclosure();
|
const testNotificationModal = useDisclosure();
|
||||||
const [availableTemplates, setAvailableTemplates] = useState<MessageTemplateDto[]>([]);
|
const [availableTemplates, setAvailableTemplates] = useState<MessageTemplateDto[]>([]);
|
||||||
const [selectedTemplate, setSelectedTemplate] = useState<MessageTemplateDto | null>(null);
|
const [selectedTemplate, setSelectedTemplate] = useState<MessageTemplateDto>();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
MessageTemplateEndpoint.getAll().then((response: any) => {
|
MessageTemplateEndpoint.getAll().then((response: any) => {
|
||||||
@@ -113,13 +113,13 @@ function MessageManagementLayout({getConfig, getConfigs, formik}: any) {
|
|||||||
<EditTemplateModal
|
<EditTemplateModal
|
||||||
isOpen={editorModal.isOpen}
|
isOpen={editorModal.isOpen}
|
||||||
onOpenChange={editorModal.onOpenChange}
|
onOpenChange={editorModal.onOpenChange}
|
||||||
selectedTemplate={selectedTemplate}
|
selectedTemplate={selectedTemplate!!}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SendTestNotificationModal
|
<SendTestNotificationModal
|
||||||
isOpen={testNotificationModal.isOpen}
|
isOpen={testNotificationModal.isOpen}
|
||||||
onOpenChange={testNotificationModal.onOpenChange}
|
onOpenChange={testNotificationModal.onOpenChange}
|
||||||
selectedTemplate={selectedTemplate}
|
selectedTemplate={selectedTemplate!!}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ export default function PluginManagement() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
PluginManagementEndpoint.getPlugins().then((response) => {
|
PluginManagementEndpoint.getPlugins().then((response) => {
|
||||||
if (response === undefined) return;
|
|
||||||
|
|
||||||
let sortedPlugins: PluginDto[] = response
|
let sortedPlugins: PluginDto[] = response
|
||||||
.filter(p => !!p)
|
.filter(p => !!p)
|
||||||
.sort((a: PluginDto, b: PluginDto) => {
|
.sort((a: PluginDto, b: PluginDto) => {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function UserManagementLayout({getConfig, formik}: any) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
UserEndpoint.getAllUsers().then(
|
UserEndpoint.getAllUsers().then(
|
||||||
(response) => setUsers(response as UserInfoDto[])
|
(response) => setUsers(response)
|
||||||
);
|
);
|
||||||
|
|
||||||
ConfigEndpoint.get("sso.oidc.auto-register-new-users").then(
|
ConfigEndpoint.get("sso.oidc.auto-register-new-users").then(
|
||||||
|
|||||||
+4
-4
@@ -9,7 +9,7 @@ import MessageTemplateDto from "Frontend/generated/de/grimsi/gameyfin/messages/t
|
|||||||
interface SendTestNotificationModalProps {
|
interface SendTestNotificationModalProps {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
onOpenChange: () => void;
|
onOpenChange: () => void;
|
||||||
selectedTemplate: MessageTemplateDto | null;
|
selectedTemplate: MessageTemplateDto;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function SendTestNotificationModal({
|
export default function SendTestNotificationModal({
|
||||||
@@ -35,7 +35,7 @@ export default function SendTestNotificationModal({
|
|||||||
initialValues={{}}
|
initialValues={{}}
|
||||||
isInitialValid={false}
|
isInitialValid={false}
|
||||||
onSubmit={async (values) => {
|
onSubmit={async (values) => {
|
||||||
await MessageEndpoint.sendTestNotification(selectedTemplate?.key, values);
|
await MessageEndpoint.sendTestNotification(selectedTemplate.key, values);
|
||||||
addToast({
|
addToast({
|
||||||
title: "Notification sent",
|
title: "Notification sent",
|
||||||
description: "Test notification to you has been sent",
|
description: "Test notification to you has been sent",
|
||||||
@@ -43,7 +43,7 @@ export default function SendTestNotificationModal({
|
|||||||
});
|
});
|
||||||
onClose();
|
onClose();
|
||||||
}}
|
}}
|
||||||
validationSchema={generateValidationSchema(selectedTemplate?.availablePlaceholders as string[])}
|
validationSchema={generateValidationSchema(selectedTemplate.availablePlaceholders)}
|
||||||
>
|
>
|
||||||
{(formik) => (
|
{(formik) => (
|
||||||
<Form>
|
<Form>
|
||||||
@@ -53,7 +53,7 @@ export default function SendTestNotificationModal({
|
|||||||
<ModalBody>
|
<ModalBody>
|
||||||
<p className="text-ls font-semibold mb-4">Fill the placeholders of the
|
<p className="text-ls font-semibold mb-4">Fill the placeholders of the
|
||||||
template</p>
|
template</p>
|
||||||
{selectedTemplate?.availablePlaceholders?.map((placeholder) =>
|
{selectedTemplate.availablePlaceholders.map((placeholder) =>
|
||||||
<Input key={placeholder} label={placeholder} name={placeholder}/>
|
<Input key={placeholder} label={placeholder} name={placeholder}/>
|
||||||
)}
|
)}
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
|
|||||||
@@ -28,12 +28,9 @@ export default function FileTreeView({onPathChange}: { onPathChange: (file: stri
|
|||||||
const [flattenedFileTree, setFlattenedFileTree] = useState<INode[]>([rootNode]);
|
const [flattenedFileTree, setFlattenedFileTree] = useState<INode[]>([rootNode]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
FilesystemEndpoint.getHostOperatingSystem().then(
|
FilesystemEndpoint.getHostOperatingSystem().then((response) => {
|
||||||
result => {
|
setHostOSType(response);
|
||||||
if (result === undefined) return;
|
})
|
||||||
setHostOSType(result);
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
FilesystemEndpoint.listSubDirectories("").then(
|
FilesystemEndpoint.listSubDirectories("").then(
|
||||||
result => {
|
result => {
|
||||||
|
|||||||
@@ -32,14 +32,14 @@ export default function AssignRolesModal({isOpen, onOpenChange, user}: AssignRol
|
|||||||
const [error, setError] = useState<string>();
|
const [error, setError] = useState<string>();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setSelectedRole(rolesToSelection(user.roles!));
|
setSelectedRole(rolesToSelection(user.roles));
|
||||||
UserEndpoint.getRolesBelow().then((availableRoles) => {
|
UserEndpoint.getRolesBelow().then((availableRoles) => {
|
||||||
setAvailableRoles(availableRoles!.map((role) => ({id: role!.toString()})));
|
setAvailableRoles(availableRoles.map((role) => ({id: role.toString()})));
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
function rolesToSelection(roles: Array<string | undefined>): Selection {
|
function rolesToSelection(roles: Array<string>): Selection {
|
||||||
return new Set(roles.map((role) => role!.toString()));
|
return new Set(roles.map((role) => role.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function assignRoles() {
|
async function assignRoles() {
|
||||||
@@ -47,7 +47,6 @@ export default function AssignRolesModal({isOpen, onOpenChange, user}: AssignRol
|
|||||||
|
|
||||||
let selectedRolesArray = Array.from(selectedRole).map((role) => role.toString());
|
let selectedRolesArray = Array.from(selectedRole).map((role) => role.toString());
|
||||||
let result = await UserEndpoint.assignRoles(user.username, selectedRolesArray);
|
let result = await UserEndpoint.assignRoles(user.username, selectedRolesArray);
|
||||||
if (!result) return;
|
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case RoleAssignmentResult.SUCCESS:
|
case RoleAssignmentResult.SUCCESS:
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default function InviteUserModal({isOpen, onOpenChange}: InviteUserModalP
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
async function inviteUser(onClose: () => void) {
|
async function inviteUser(onClose: () => void) {
|
||||||
if (email === null) return;
|
if (!email) return;
|
||||||
|
|
||||||
if (await UserEndpoint.existsByMail(email)) {
|
if (await UserEndpoint.existsByMail(email)) {
|
||||||
setError("User with this email already exists");
|
setError("User with this email already exists");
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ export default function PasswordResetModal({
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
async function resetPassword() {
|
async function resetPassword() {
|
||||||
|
if (!resetEmail) return;
|
||||||
|
|
||||||
await PasswordResetEndpoint.requestPasswordReset(resetEmail);
|
await PasswordResetEndpoint.requestPasswordReset(resetEmail);
|
||||||
addToast({
|
addToast({
|
||||||
title: "Password reset requested",
|
title: "Password reset requested",
|
||||||
|
|||||||
@@ -1,4 +1,16 @@
|
|||||||
|
import {useEffect, useState} from "react";
|
||||||
|
import {LibraryEndpoint} from "Frontend/generated/endpoints";
|
||||||
|
import LibraryDto from "Frontend/generated/de/grimsi/gameyfin/libraries/dto/LibraryDto";
|
||||||
|
|
||||||
export default function HomeView() {
|
export default function HomeView() {
|
||||||
|
const [libraries, setLibraries] = useState<LibraryDto[]>([]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
LibraryEndpoint.getAllLibraries().then(libraries => {
|
||||||
|
setLibraries(libraries);
|
||||||
|
});
|
||||||
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="grow justify-center mt-12">
|
<div className="grow justify-center mt-12">
|
||||||
<div className="flex flex-col items-center gap-6">
|
<div className="flex flex-col items-center gap-6">
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import UserInvitationAcceptanceResult
|
|||||||
from "Frontend/generated/de/grimsi/gameyfin/users/enums/UserInvitationAcceptanceResult";
|
from "Frontend/generated/de/grimsi/gameyfin/users/enums/UserInvitationAcceptanceResult";
|
||||||
|
|
||||||
export default function InvitationRegistrationView() {
|
export default function InvitationRegistrationView() {
|
||||||
const [searchParams, setSearchParams] = useSearchParams();
|
const [searchParams] = useSearchParams();
|
||||||
const [token, setToken] = useState<string>();
|
const [token, setToken] = useState<string>();
|
||||||
const [email, setEmail] = useState<string>();
|
const [email, setEmail] = useState<string>();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -24,6 +24,8 @@ export default function InvitationRegistrationView() {
|
|||||||
}, [searchParams]);
|
}, [searchParams]);
|
||||||
|
|
||||||
async function register(values: any, formik: any) {
|
async function register(values: any, formik: any) {
|
||||||
|
if (!token || !email) return;
|
||||||
|
|
||||||
let result = await RegistrationEndpoint.acceptInvitation(token, {
|
let result = await RegistrationEndpoint.acceptInvitation(token, {
|
||||||
email: email,
|
email: email,
|
||||||
username: values.username,
|
username: values.username,
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ const themeOptions = {
|
|||||||
|
|
||||||
const hasExportedWebComponents = existsSync(path.resolve(frontendFolder, 'web-component.html'));
|
const hasExportedWebComponents = existsSync(path.resolve(frontendFolder, 'web-component.html'));
|
||||||
|
|
||||||
|
const target = ['safari15', 'es2022'];
|
||||||
|
|
||||||
// Block debug and trace logs.
|
// Block debug and trace logs.
|
||||||
console.trace = () => {};
|
console.trace = () => {};
|
||||||
console.debug = () => {};
|
console.debug = () => {};
|
||||||
@@ -139,10 +141,10 @@ function buildSWPlugin(opts: { devMode: boolean }): PluginOption {
|
|||||||
write: !devMode,
|
write: !devMode,
|
||||||
minify: viteConfig.build.minify,
|
minify: viteConfig.build.minify,
|
||||||
outDir: viteConfig.build.outDir,
|
outDir: viteConfig.build.outDir,
|
||||||
|
target,
|
||||||
sourcemap: viteConfig.command === 'serve' || viteConfig.build.sourcemap,
|
sourcemap: viteConfig.command === 'serve' || viteConfig.build.sourcemap,
|
||||||
emptyOutDir: false,
|
emptyOutDir: false,
|
||||||
modulePreload: false,
|
modulePreload: false,
|
||||||
target: ['safari15', 'es2022'],
|
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
input: {
|
input: {
|
||||||
sw: settings.clientServiceWorkerSource
|
sw: settings.clientServiceWorkerSource
|
||||||
@@ -698,13 +700,24 @@ export const vaadinConfig: UserConfigFn = (env) => {
|
|||||||
outDir: buildOutputFolder,
|
outDir: buildOutputFolder,
|
||||||
emptyOutDir: devBundle,
|
emptyOutDir: devBundle,
|
||||||
assetsDir: 'VAADIN/build',
|
assetsDir: 'VAADIN/build',
|
||||||
target: ['safari15', 'es2022'],
|
target,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
input: {
|
input: {
|
||||||
indexhtml: projectIndexHtml,
|
indexhtml: projectIndexHtml,
|
||||||
|
|
||||||
...(hasExportedWebComponents ? { webcomponenthtml: path.resolve(frontendFolder, 'web-component.html') } : {})
|
...(hasExportedWebComponents ? { webcomponenthtml: path.resolve(frontendFolder, 'web-component.html') } : {})
|
||||||
},
|
},
|
||||||
|
output: {
|
||||||
|
// Workaround to enable dynamic imports with top-level await for
|
||||||
|
// commonjs modules, such as "atmosphere.js" in Hilla. Extracting
|
||||||
|
// Rollup's commonjs helpers into separate manual chunk avoids
|
||||||
|
// circular dependencies in this case. Caused
|
||||||
|
// - https://github.com/vitejs/vite/issues/10995
|
||||||
|
// - https://github.com/rollup/rollup/issues/5884
|
||||||
|
// - https://github.com/vitejs/vite/issues/19695
|
||||||
|
// - https://github.com/vitejs/vite/issues/12209
|
||||||
|
manualChunks: (id: string) => id.startsWith('\0commonjsHelpers.js') ? 'commonjsHelpers' : null
|
||||||
|
},
|
||||||
onwarn: (warning: rollup.RollupLog, defaultHandler: rollup.LoggingFunction) => {
|
onwarn: (warning: rollup.RollupLog, defaultHandler: rollup.LoggingFunction) => {
|
||||||
const ignoreEvalWarning = [
|
const ignoreEvalWarning = [
|
||||||
'generated/jar-resources/FlowClient.js',
|
'generated/jar-resources/FlowClient.js',
|
||||||
@@ -719,6 +732,9 @@ export const vaadinConfig: UserConfigFn = (env) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
|
esbuildOptions: {
|
||||||
|
target,
|
||||||
|
},
|
||||||
entries: [
|
entries: [
|
||||||
// Pre-scan entrypoints in Vite to avoid reloading on first open
|
// Pre-scan entrypoints in Vite to avoid reloading on first open
|
||||||
'generated/vaadin.ts'
|
'generated/vaadin.ts'
|
||||||
@@ -836,11 +852,11 @@ export const vaadinConfig: UserConfigFn = (env) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
vitePluginFileSystemRouter({isDevMode: devMode}),
|
||||||
checker({
|
checker({
|
||||||
typescript: true
|
typescript: true
|
||||||
}),
|
}),
|
||||||
productionMode && visualizer({ brotliSize: true, filename: bundleSizeFile })
|
productionMode && visualizer({ brotliSize: true, filename: bundleSizeFile })
|
||||||
, vitePluginFileSystemRouter({isDevMode: devMode})
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
# Plugin versions
|
# Plugin versions
|
||||||
kotlinVersion=2.1.20
|
kotlinVersion=2.1.20
|
||||||
kspVersion=2.1.20-2.0.1
|
kspVersion=2.1.20-2.0.1
|
||||||
vaadinVersion=24.7.3
|
vaadinVersion=24.8.0.alpha6
|
||||||
springBootVersion=3.4.5
|
springBootVersion=3.4.5
|
||||||
springCloudVersion=2024.0.1
|
springCloudVersion=2024.0.1
|
||||||
springDependencyManagementVersion=1.1.7
|
springDependencyManagementVersion=1.1.7
|
||||||
|
|||||||
Reference in New Issue
Block a user