fix and update
This commit is contained in:
@@ -11,6 +11,7 @@ interface PublicSettingsContextValue {
|
||||
publicFrontendUrl: string;
|
||||
ldapEnabled: boolean;
|
||||
ldapUseLdaps: boolean;
|
||||
pinLockTimeoutMinutes: number;
|
||||
isLoading: boolean;
|
||||
refreshPublicSettings: () => Promise<void>;
|
||||
}
|
||||
@@ -22,6 +23,7 @@ const PublicSettingsContext = createContext<PublicSettingsContextValue>({
|
||||
publicFrontendUrl: DEFAULT_PUBLIC_FRONTEND_URL,
|
||||
ldapEnabled: false,
|
||||
ldapUseLdaps: false,
|
||||
pinLockTimeoutMinutes: 15,
|
||||
isLoading: true,
|
||||
refreshPublicSettings: async () => undefined
|
||||
});
|
||||
@@ -65,6 +67,7 @@ export function PublicSettingsProvider({ children }: { children: React.ReactNode
|
||||
publicFrontendUrl: publicFrontendUrl.replace(/\/+$/, ''),
|
||||
ldapEnabled: ['true', '1', 'yes'].includes((settings.LDAP_ENABLED ?? '').trim().toLowerCase()),
|
||||
ldapUseLdaps: ['true', '1', 'yes'].includes((settings.LDAP_USE_LDAPS ?? '').trim().toLowerCase()),
|
||||
pinLockTimeoutMinutes: Math.max(1, Number.parseInt(settings.PIN_LOCK_TIMEOUT_MINUTES ?? '15', 10) || 15),
|
||||
isLoading,
|
||||
refreshPublicSettings
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user