[skip ci] Update server settings for Authentication modes (#984)

* Update GQL interface

* Update queried server settings

* package.json: Fix GQL script

* Basic AuthMode setting

* Setting disable, disclaimer on login page

* Update gql generated files

* Alphabetical sort en.json

* Fix constants name typos

* Move settings types and constants to corresponding files

* Rename setting constants

* Update required server version

---------

Co-authored-by: schroda <50052685+schroda@users.noreply.github.com>
This commit is contained in:
Constantin Piber
2025-07-12 01:08:40 +02:00
committed by GitHub
parent cdee6f4efa
commit 0d288afe74
14 changed files with 338 additions and 204 deletions

View File

@@ -18,10 +18,7 @@ import { getPersistedServerSetting, usePersistedValue } from '@/modules/core/hoo
import { makeToast } from '@/modules/core/utils/Toast.ts';
import { ServerSettings } from '@/modules/settings/Settings.types.ts';
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
const DEFAULT_VALUE = 23;
const MIN_VALUE = 1;
const MAX_VALUE = 23; // 1 month
import { WEB_UI_UPDATE_INTERVAL } from '@/modules/settings/Settings.constants.ts';
export const WebUIUpdateIntervalSetting = ({
disabled = false,
@@ -36,7 +33,7 @@ export const WebUIUpdateIntervalSetting = ({
const [mutateSettings] = requestManager.useUpdateServerSettings();
const [currentUpdateCheckInterval, persistUpdateCheckInterval] = usePersistedValue(
'lastUpdateCheckInterval',
DEFAULT_VALUE,
WEB_UI_UPDATE_INTERVAL.default,
updateCheckInterval,
getPersistedServerSetting,
);
@@ -75,9 +72,9 @@ export const WebUIUpdateIntervalSetting = ({
hours: currentUpdateCheckInterval,
})}
value={currentUpdateCheckInterval}
minValue={MIN_VALUE}
maxValue={MAX_VALUE}
defaultValue={DEFAULT_VALUE}
minValue={WEB_UI_UPDATE_INTERVAL.min}
maxValue={WEB_UI_UPDATE_INTERVAL.max}
defaultValue={WEB_UI_UPDATE_INTERVAL.default}
showSlider
valueUnit={t('global.time.hour_short')}
handleUpdate={updateSetting}