New: Add runtime format option in Settings > UI so users can choose between a mins view and h/m view

This commit is contained in:
nitsua
2020-08-29 11:41:03 -04:00
committed by Qstick
parent 361ffe353d
commit 3548433a10
13 changed files with 82 additions and 30 deletions

View File

@@ -43,6 +43,11 @@ export const timeFormatOptions = [
{ key: 'HH:mm', value: '17:00/17:30' }
];
export const movieRuntimeFormatOptions = [
{ key: 'hoursMinutes', value: '1h 15m' },
{ key: 'minutes', value: '75 mins' }
];
class UISettings extends Component {
//
@@ -111,9 +116,21 @@ class UISettings extends Component {
</FormGroup>
</FieldSet>
<FieldSet
legend={translate('Dates')}
>
<FieldSet legend={translate('Movies')}>
<FormGroup>
<FormLabel>{translate('SettingsRuntimeFormat')}</FormLabel>
<FormInputGroup
type={inputTypes.SELECT}
name="movieRuntimeFormat"
values={movieRuntimeFormatOptions}
onChange={onInputChange}
{...settings.movieRuntimeFormat}
/>
</FormGroup>
</FieldSet>
<FieldSet legend={translate('Dates')}>
<FormGroup>
<FormLabel>{translate('SettingsShortDateFormat')}</FormLabel>
@@ -162,9 +179,7 @@ class UISettings extends Component {
</FormGroup>
</FieldSet>
<FieldSet
legend={translate('Style')}
>
<FieldSet legend={translate('Style')}>
<FormGroup>
<FormLabel>{translate('SettingsEnableColorImpairedMode')}</FormLabel>
<FormInputGroup
@@ -177,9 +192,7 @@ class UISettings extends Component {
</FormGroup>
</FieldSet>
<FieldSet
legend={translate('Language')}
>
<FieldSet legend={translate('Language')}>
<FormGroup>
<FormLabel>{translate('SettingsUiLanguage')}</FormLabel>
<FormInputGroup