mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix inputProps depreciation
This commit is contained in:
parent
27febb599c
commit
419c225937
10 changed files with 174 additions and 124 deletions
|
@ -148,11 +148,13 @@ const NewTriggerForm: FunctionComponent<IProps> = ({ open, title, onClose, onAdd
|
|||
fullWidth
|
||||
defaultValue={''}
|
||||
type='number'
|
||||
inputProps={{
|
||||
label={globalize.translate('LabelTimeLimitHours')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 1,
|
||||
step: 0.5
|
||||
}
|
||||
}}
|
||||
label={globalize.translate('LabelTimeLimitHours')}
|
||||
/>
|
||||
</Stack>
|
||||
</DialogContent>
|
||||
|
|
|
@ -123,14 +123,16 @@ export const Component = () => {
|
|||
multiline
|
||||
minRows={5}
|
||||
maxRows={5}
|
||||
InputProps={{
|
||||
className: 'textarea-mono'
|
||||
}}
|
||||
name={BrandingOption.LoginDisclaimer}
|
||||
label={globalize.translate('LabelLoginDisclaimer')}
|
||||
helperText={globalize.translate('LabelLoginDisclaimerHelp')}
|
||||
value={brandingOptions?.LoginDisclaimer}
|
||||
onChange={setBrandingOption}
|
||||
slotProps={{
|
||||
input: {
|
||||
className: 'textarea-mono'
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
@ -138,14 +140,16 @@ export const Component = () => {
|
|||
multiline
|
||||
minRows={5}
|
||||
maxRows={20}
|
||||
InputProps={{
|
||||
className: 'textarea-mono'
|
||||
}}
|
||||
name={BrandingOption.CustomCss}
|
||||
label={globalize.translate('LabelCustomCss')}
|
||||
helperText={globalize.translate('LabelCustomCssHelp')}
|
||||
value={brandingOptions?.CustomCss}
|
||||
onChange={setBrandingOption}
|
||||
slotProps={{
|
||||
input: {
|
||||
className: 'textarea-mono'
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
<Button
|
||||
|
|
|
@ -127,12 +127,14 @@ export const Component = () => {
|
|||
name={'DummyChapterDuration'}
|
||||
defaultValue={config.DummyChapterDuration}
|
||||
type='number'
|
||||
inputProps={{
|
||||
min: 0,
|
||||
required: true
|
||||
}}
|
||||
label={globalize.translate('LabelDummyChapterDuration')}
|
||||
helperText={globalize.translate('LabelDummyChapterDurationHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 0,
|
||||
required: true
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
|
|
@ -81,12 +81,14 @@ export const Component = () => {
|
|||
name='MinResumePercentage'
|
||||
type='number'
|
||||
defaultValue={config?.MinResumePct}
|
||||
inputProps={{
|
||||
helperText={globalize.translate('LabelMinResumePercentageHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 0,
|
||||
max: 100,
|
||||
required: true
|
||||
}
|
||||
}}
|
||||
helperText={globalize.translate('LabelMinResumePercentageHelp')}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
@ -94,12 +96,14 @@ export const Component = () => {
|
|||
name='MaxResumePercentage'
|
||||
type='number'
|
||||
defaultValue={config?.MaxResumePct}
|
||||
inputProps={{
|
||||
helperText={globalize.translate('LabelMaxResumePercentageHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 1,
|
||||
max: 100,
|
||||
required: true
|
||||
}
|
||||
}}
|
||||
helperText={globalize.translate('LabelMaxResumePercentageHelp')}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
@ -107,12 +111,14 @@ export const Component = () => {
|
|||
name='MinAudiobookResume'
|
||||
type='number'
|
||||
defaultValue={config?.MinAudiobookResume}
|
||||
inputProps={{
|
||||
helperText={globalize.translate('LabelMinAudiobookResumeHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 0,
|
||||
max: 100,
|
||||
required: true
|
||||
}
|
||||
}}
|
||||
helperText={globalize.translate('LabelMinAudiobookResumeHelp')}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
@ -120,12 +126,14 @@ export const Component = () => {
|
|||
name='MaxAudiobookResume'
|
||||
type='number'
|
||||
defaultValue={config?.MaxAudiobookResume}
|
||||
inputProps={{
|
||||
helperText={globalize.translate('LabelMaxAudiobookResumeHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 1,
|
||||
max: 100,
|
||||
required: true
|
||||
}
|
||||
}}
|
||||
helperText={globalize.translate('LabelMaxAudiobookResumeHelp')}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
@ -133,11 +141,13 @@ export const Component = () => {
|
|||
name='MinResumeDuration'
|
||||
type='number'
|
||||
defaultValue={config?.MinResumeDurationSeconds}
|
||||
inputProps={{
|
||||
helperText={globalize.translate('LabelMinResumeDurationHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 0,
|
||||
required: true
|
||||
}
|
||||
}}
|
||||
helperText={globalize.translate('LabelMinResumeDurationHelp')}
|
||||
/>
|
||||
|
||||
<Button
|
||||
|
|
|
@ -70,14 +70,16 @@ export const Component = () => {
|
|||
<TextField
|
||||
type='number'
|
||||
inputMode='decimal'
|
||||
inputProps={{
|
||||
min: 0,
|
||||
step: 0.25
|
||||
}}
|
||||
name='StreamingBitrateLimit'
|
||||
label={globalize.translate('LabelRemoteClientBitrateLimit')}
|
||||
helperText={globalize.translate('LabelRemoteClientBitrateLimitHelp')}
|
||||
defaultValue={defaultConfiguration?.RemoteClientBitrateLimit ? defaultConfiguration?.RemoteClientBitrateLimit / 1e6 : ''}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 0,
|
||||
step: 0.25
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
type='submit'
|
||||
|
|
|
@ -158,22 +158,26 @@ export const Component = () => {
|
|||
type='number'
|
||||
inputMode='numeric'
|
||||
defaultValue={defaultConfig.TrickplayOptions?.Interval}
|
||||
inputProps={{
|
||||
helperText={globalize.translate('LabelImageIntervalHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 1,
|
||||
required: true
|
||||
}
|
||||
}}
|
||||
helperText={globalize.translate('LabelImageIntervalHelp')}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
label={globalize.translate('LabelWidthResolutions')}
|
||||
name='WidthResolutions'
|
||||
defaultValue={defaultConfig.TrickplayOptions?.WidthResolutions}
|
||||
inputProps={{
|
||||
helperText={globalize.translate('LabelWidthResolutionsHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
required: true,
|
||||
pattern: '[0-9,]*'
|
||||
}
|
||||
}}
|
||||
helperText={globalize.translate('LabelWidthResolutionsHelp')}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
@ -182,11 +186,13 @@ export const Component = () => {
|
|||
type='number'
|
||||
inputMode='numeric'
|
||||
defaultValue={defaultConfig.TrickplayOptions?.TileWidth}
|
||||
inputProps={{
|
||||
helperText={globalize.translate('LabelTileWidthHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 1,
|
||||
required: true
|
||||
}
|
||||
}}
|
||||
helperText={globalize.translate('LabelTileWidthHelp')}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
@ -195,11 +201,13 @@ export const Component = () => {
|
|||
type='number'
|
||||
inputMode='numeric'
|
||||
defaultValue={defaultConfig.TrickplayOptions?.TileHeight}
|
||||
inputProps={{
|
||||
helperText={globalize.translate('LabelTileHeightHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 1,
|
||||
required: true
|
||||
}
|
||||
}}
|
||||
helperText={globalize.translate('LabelTileHeightHelp')}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
@ -208,12 +216,14 @@ export const Component = () => {
|
|||
type='number'
|
||||
inputMode='numeric'
|
||||
defaultValue={defaultConfig.TrickplayOptions?.JpegQuality}
|
||||
inputProps={{
|
||||
helperText={globalize.translate('LabelJpegQualityHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 1,
|
||||
max: 100,
|
||||
required: true
|
||||
}
|
||||
}}
|
||||
helperText={globalize.translate('LabelJpegQualityHelp')}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
@ -222,12 +232,14 @@ export const Component = () => {
|
|||
type='number'
|
||||
inputMode='numeric'
|
||||
defaultValue={defaultConfig.TrickplayOptions?.Qscale}
|
||||
inputProps={{
|
||||
helperText={globalize.translate('LabelQscaleHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 2,
|
||||
max: 31,
|
||||
required: true
|
||||
}
|
||||
}}
|
||||
helperText={globalize.translate('LabelQscaleHelp')}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
|
@ -236,11 +248,13 @@ export const Component = () => {
|
|||
type='number'
|
||||
inputMode='numeric'
|
||||
defaultValue={defaultConfig.TrickplayOptions?.ProcessThreads}
|
||||
inputProps={{
|
||||
helperText={globalize.translate('LabelTrickplayThreadsHelp')}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 0,
|
||||
required: true
|
||||
}
|
||||
}}
|
||||
helperText={globalize.translate('LabelTrickplayThreadsHelp')}
|
||||
/>
|
||||
|
||||
<Button
|
||||
|
|
|
@ -161,7 +161,6 @@ export const Component = () => {
|
|||
select
|
||||
name='UICulture'
|
||||
label={globalize.translate('LabelPreferredDisplayLanguage')}
|
||||
FormHelperTextProps={{ component: Stack }}
|
||||
helperText={(
|
||||
<>
|
||||
<span>{globalize.translate('LabelDisplayLanguageHelp')}</span>
|
||||
|
@ -171,6 +170,9 @@ export const Component = () => {
|
|||
</>
|
||||
)}
|
||||
defaultValue={config.UICulture}
|
||||
slotProps={{
|
||||
formHelperText: { component: Stack }
|
||||
}}
|
||||
>
|
||||
{languageOptions.map((language) =>
|
||||
<MenuItem key={language.Name} value={language.Value || ''}>{language.Name}</MenuItem>
|
||||
|
@ -185,7 +187,8 @@ export const Component = () => {
|
|||
helperText={globalize.translate('LabelCachePathHelp')}
|
||||
value={cachePath}
|
||||
onChange={onCachePathChange}
|
||||
InputProps={{
|
||||
slotProps={{
|
||||
input: {
|
||||
endAdornment: (
|
||||
<InputAdornment position='end'>
|
||||
<IconButton edge='end' onClick={showCachePathPicker}>
|
||||
|
@ -193,6 +196,7 @@ export const Component = () => {
|
|||
</IconButton>
|
||||
</InputAdornment>
|
||||
)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
|
@ -202,7 +206,8 @@ export const Component = () => {
|
|||
helperText={globalize.translate('LabelMetadataPathHelp')}
|
||||
value={metadataPath}
|
||||
onChange={onMetadataPathChange}
|
||||
InputProps={{
|
||||
slotProps={{
|
||||
input: {
|
||||
endAdornment: (
|
||||
<InputAdornment position='end'>
|
||||
<IconButton edge='end' onClick={showMetadataPathPicker}>
|
||||
|
@ -210,6 +215,7 @@ export const Component = () => {
|
|||
</IconButton>
|
||||
</InputAdornment>
|
||||
)
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
|
@ -232,25 +238,29 @@ export const Component = () => {
|
|||
<TextField
|
||||
name='LibraryScanFanoutConcurrency'
|
||||
type='number'
|
||||
inputProps={{
|
||||
min: 0,
|
||||
step: 1
|
||||
}}
|
||||
label={globalize.translate('LibraryScanFanoutConcurrency')}
|
||||
helperText={globalize.translate('LibraryScanFanoutConcurrencyHelp')}
|
||||
defaultValue={config.LibraryScanFanoutConcurrency || ''}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 0,
|
||||
step: 1
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
<TextField
|
||||
name='ParallelImageEncodingLimit'
|
||||
type='number'
|
||||
inputProps={{
|
||||
min: 0,
|
||||
step: 1
|
||||
}}
|
||||
label={globalize.translate('LabelParallelImageEncodingLimit')}
|
||||
helperText={globalize.translate('LabelParallelImageEncodingLimitHelp')}
|
||||
defaultValue={config.ParallelImageEncodingLimit || ''}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
min: 0,
|
||||
step: 1
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
<Button type='submit' size='large'>
|
||||
|
|
|
@ -146,7 +146,11 @@ export function DisplayPreferences({ onChange, values }: Readonly<DisplayPrefere
|
|||
<TextField
|
||||
aria-describedby='display-settings-screensaver-interval-description'
|
||||
value={values.screensaverInterval}
|
||||
inputProps={{
|
||||
label={globalize.translate('LabelBackdropScreensaverInterval')}
|
||||
name='screensaverInterval'
|
||||
onChange={onChange}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
inputMode: 'numeric',
|
||||
max: '3600',
|
||||
min: '1',
|
||||
|
@ -154,10 +158,8 @@ export function DisplayPreferences({ onChange, values }: Readonly<DisplayPrefere
|
|||
required: true,
|
||||
step: '1',
|
||||
type: 'number'
|
||||
}
|
||||
}}
|
||||
label={globalize.translate('LabelBackdropScreensaverInterval')}
|
||||
name='screensaverInterval'
|
||||
onChange={onChange}
|
||||
/>
|
||||
<FormHelperText id='display-settings-screensaver-interval-description'>
|
||||
{globalize.translate('LabelBackdropScreensaverIntervalHelp')}
|
||||
|
|
|
@ -24,7 +24,12 @@ export function LibraryPreferences({ onChange, values }: Readonly<LibraryPrefere
|
|||
<FormControl fullWidth>
|
||||
<TextField
|
||||
aria-describedby='display-settings-lib-pagesize-description'
|
||||
inputProps={{
|
||||
value={values.libraryPageSize}
|
||||
label={globalize.translate('LabelLibraryPageSize')}
|
||||
name='libraryPageSize'
|
||||
onChange={onChange}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
type: 'number',
|
||||
inputMode: 'numeric',
|
||||
max: '1000',
|
||||
|
@ -32,11 +37,8 @@ export function LibraryPreferences({ onChange, values }: Readonly<LibraryPrefere
|
|||
pattern: '[0-9]',
|
||||
required: true,
|
||||
step: '1'
|
||||
}
|
||||
}}
|
||||
value={values.libraryPageSize}
|
||||
label={globalize.translate('LabelLibraryPageSize')}
|
||||
name='libraryPageSize'
|
||||
onChange={onChange}
|
||||
/>
|
||||
<FormHelperText id='display-settings-lib-pagesize-description'>
|
||||
{globalize.translate('LabelLibraryPageSizeHelp')}
|
||||
|
|
|
@ -25,7 +25,11 @@ export function NextUpPreferences({ onChange, values }: Readonly<NextUpPreferenc
|
|||
<TextField
|
||||
aria-describedby='display-settings-max-days-next-up-description'
|
||||
value={values.maxDaysForNextUp}
|
||||
inputProps={{
|
||||
label={globalize.translate('LabelMaxDaysForNextUp')}
|
||||
name='maxDaysForNextUp'
|
||||
onChange={onChange}
|
||||
slotProps={{
|
||||
htmlInput: {
|
||||
type: 'number',
|
||||
inputMode: 'numeric',
|
||||
max: '1000',
|
||||
|
@ -33,10 +37,8 @@ export function NextUpPreferences({ onChange, values }: Readonly<NextUpPreferenc
|
|||
pattern: '[0-9]',
|
||||
required: true,
|
||||
step: '1'
|
||||
}
|
||||
}}
|
||||
label={globalize.translate('LabelMaxDaysForNextUp')}
|
||||
name='maxDaysForNextUp'
|
||||
onChange={onChange}
|
||||
/>
|
||||
<FormHelperText id='display-settings-max-days-next-up-description'>
|
||||
{globalize.translate('LabelMaxDaysForNextUpHelp')}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue