mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-15 08:15:37 +00:00
2.0.0.beta5 (#629)
* Remove unnecessary "requiresLogin" handles * Rename property in UserInfoDto * Fix #628 * Fix ant matchers (again) * Major performance improvements for game matching * Minor logging improvements
This commit is contained in:
@@ -8,6 +8,7 @@ import {PaperPlaneRight, Pencil} from "@phosphor-icons/react";
|
||||
import MessageTemplateDto from "Frontend/generated/org/gameyfin/app/messages/templates/MessageTemplateDto";
|
||||
import SendTestNotificationModal from "Frontend/components/administration/messages/SendTestNotificationModal";
|
||||
import EditTemplateModal from "Frontend/components/administration/messages/EditTemplateModel";
|
||||
import * as Yup from "yup";
|
||||
|
||||
function MessageManagementLayout({getConfig, formik}: any) {
|
||||
|
||||
@@ -126,4 +127,21 @@ function MessageManagementLayout({getConfig, formik}: any) {
|
||||
);
|
||||
}
|
||||
|
||||
export const MessageManagement = withConfigPage(MessageManagementLayout, "Messages", "messages");
|
||||
const validationSchema = Yup.object({
|
||||
messages: Yup.object({
|
||||
providers: Yup.object({
|
||||
email: Yup.object({
|
||||
enabled: Yup.boolean().required("Required"),
|
||||
host: Yup.string().required("Host is required"),
|
||||
port: Yup.number().required("Port is required")
|
||||
.min(0, "Port must be between 0 and 65535")
|
||||
.max(65535, "Port must be between 0 and 65535"),
|
||||
username: Yup.string()
|
||||
.email("Invalid email address")
|
||||
.required("Username is required"),
|
||||
})
|
||||
})
|
||||
})
|
||||
});
|
||||
|
||||
export const MessageManagement = withConfigPage(MessageManagementLayout, "Messages", validationSchema);
|
||||
@@ -23,20 +23,18 @@ import SearchView from "Frontend/views/SearchView";
|
||||
import RecentlyAddedView from "Frontend/views/RecentlyAddedView";
|
||||
import LibraryView from "Frontend/views/LibraryView";
|
||||
import {RouterConfigurationBuilder} from "@vaadin/hilla-file-router/runtime.js";
|
||||
import {ConfigEndpoint} from "Frontend/generated/endpoints";
|
||||
|
||||
export const {router, routes} = new RouterConfigurationBuilder()
|
||||
.withReactRoutes([
|
||||
{
|
||||
element: <App/>,
|
||||
handle: {requiresLogin: false},
|
||||
children: [
|
||||
{
|
||||
element: <MainLayout/>,
|
||||
handle: {requiresLogin: !ConfigEndpoint.isPublicAccessEnabled()},
|
||||
children: [
|
||||
{
|
||||
index: true, element: <HomeView/>
|
||||
index: true,
|
||||
element: <HomeView/>
|
||||
},
|
||||
{
|
||||
path: 'search',
|
||||
@@ -65,7 +63,6 @@ export const {router, routes} = new RouterConfigurationBuilder()
|
||||
{
|
||||
path: 'administration',
|
||||
element: <AdministrationView/>,
|
||||
handle: {requiresLogin: true},
|
||||
children: [
|
||||
{
|
||||
path: 'libraries',
|
||||
@@ -86,19 +83,19 @@ export const {router, routes} = new RouterConfigurationBuilder()
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'login', element: <LoginView/>, handle: {requiresLogin: false}
|
||||
path: 'login', element: <LoginView/>
|
||||
},
|
||||
{
|
||||
path: 'setup', element: <SetupView/>, handle: {requiresLogin: false}
|
||||
path: 'setup', element: <SetupView/>
|
||||
},
|
||||
{
|
||||
path: 'accept-invitation', element: <InvitationRegistrationView/>, handle: {requiresLogin: false}
|
||||
path: 'accept-invitation', element: <InvitationRegistrationView/>
|
||||
},
|
||||
{
|
||||
path: 'reset-password', element: <PasswordResetView/>, handle: {requiresLogin: false}
|
||||
path: 'reset-password', element: <PasswordResetView/>
|
||||
},
|
||||
{
|
||||
path: 'confirm-email', element: <EmailConfirmationView/>, handle: {requiresLogin: true}
|
||||
path: 'confirm-email', element: <EmailConfirmationView/>
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user