Files
torrserver/web/src/components/Settings/TMDBSettings.jsx
T
nkozobrod 616c6b1c62
Release Docker multi arch / docker (push) Has been cancelled
Test Install Script / Test Script Syntax (push) Has been cancelled
Test Install Script / Test on almalinux-10 (default) (push) Has been cancelled
Test Install Script / Test on almalinux-10 (root) (push) Has been cancelled
Test Install Script / Test on almalinux-8 (default) (push) Has been cancelled
Test Install Script / Test on almalinux-8 (root) (push) Has been cancelled
Test Install Script / Test on almalinux-9 (default) (push) Has been cancelled
Test Install Script / Test on almalinux-9 (root) (push) Has been cancelled
Test Install Script / Test on amazonlinux-2 (default) (push) Has been cancelled
Test Install Script / Test on amazonlinux-2 (root) (push) Has been cancelled
Test Install Script / Test on debian-11 (default) (push) Has been cancelled
Test Install Script / Test on debian-11 (root) (push) Has been cancelled
Test Install Script / Test on debian-12 (default) (push) Has been cancelled
Test Install Script / Test on debian-12 (root) (push) Has been cancelled
Test Install Script / Test on debian-13 (default) (push) Has been cancelled
Test Install Script / Test on debian-13 (root) (push) Has been cancelled
Test Install Script / Test on fedora-latest (default) (push) Has been cancelled
Test Install Script / Test on fedora-latest (root) (push) Has been cancelled
Test Install Script / Test on rocky-10 (default) (push) Has been cancelled
Test Install Script / Test on rocky-10 (root) (push) Has been cancelled
Test Install Script / Test on rocky-8 (default) (push) Has been cancelled
Test Install Script / Test on rocky-8 (root) (push) Has been cancelled
Test Install Script / Test on rocky-9 (default) (push) Has been cancelled
Test Install Script / Test on rocky-9 (root) (push) Has been cancelled
Test Install Script / Test on ubuntu-22.04 (default) (push) Has been cancelled
Test Install Script / Test on ubuntu-22.04 (root) (push) Has been cancelled
Test Install Script / Test on ubuntu-24.04 (default) (push) Has been cancelled
Test Install Script / Test on ubuntu-24.04 (root) (push) Has been cancelled
Initial commit: docker compose config
2026-05-30 12:07:11 +00:00

87 lines
2.6 KiB
React

import { useTranslation } from 'react-i18next'
import { FormGroup, FormHelperText, TextField } from '@material-ui/core'
import { SecondarySettingsContent, SettingSectionLabel } from './style'
export default function TMDBSettings({ settings, updateSettings }) {
const { t } = useTranslation()
const { TMDBSettings } = settings || {}
const {
APIKey = '',
APIURL = 'https://api.themoviedb.org/3',
ImageURL = 'https://image.tmdb.org',
ImageURLRu = 'https://imagetmdb.com',
} = TMDBSettings || {}
const handleChange = (field, value) => {
updateSettings({
TMDBSettings: {
...TMDBSettings,
[field]: value,
},
})
}
return (
<SecondarySettingsContent>
<SettingSectionLabel>{t('TMDB.Settings')}</SettingSectionLabel>
<FormGroup>
<TextField
label={t('TMDB.APIKey')}
value={APIKey}
onChange={e => handleChange('APIKey', e.target.value)}
placeholder='Enter your TMDB API key'
variant='outlined'
size='small'
fullWidth
style={{ marginBottom: 15 }}
/>
<FormHelperText margin='none'>{t('TMDB.APIKeyHint')}</FormHelperText>
</FormGroup>
<FormGroup style={{ marginTop: 20 }}>
<TextField
label={t('TMDB.APIURL')}
value={APIURL}
onChange={e => handleChange('APIURL', e.target.value)}
placeholder='https://api.themoviedb.org/3'
variant='outlined'
size='small'
fullWidth
style={{ marginBottom: 10 }}
/>
<FormHelperText margin='none'>{t('TMDB.APIURLHint')}</FormHelperText>
</FormGroup>
<FormGroup style={{ marginTop: 20 }}>
<TextField
label={t('TMDB.ImageURL')}
value={ImageURL}
onChange={e => handleChange('ImageURL', e.target.value)}
placeholder='https://image.tmdb.org'
variant='outlined'
size='small'
fullWidth
style={{ marginBottom: 10 }}
/>
<FormHelperText margin='none'>{t('TMDB.ImageURLHint')}</FormHelperText>
</FormGroup>
<FormGroup style={{ marginTop: 20 }}>
<TextField
label={t('TMDB.ImageURLRu')}
value={ImageURLRu}
onChange={e => handleChange('ImageURLRu', e.target.value)}
placeholder='https://imagetmdb.com'
variant='outlined'
size='small'
fullWidth
style={{ marginBottom: 10 }}
/>
<FormHelperText margin='none'>{t('TMDB.ImageURLRuHint')}</FormHelperText>
</FormGroup>
<br />
</SecondarySettingsContent>
)
}