mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
apply suggestion
Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
parent
4d37b47331
commit
06e585e2bc
2 changed files with 13 additions and 13 deletions
|
@ -35,13 +35,13 @@ const PlaybackTrickplay: FC = () => {
|
|||
(page.querySelector('.chkEnableHwEncoding') as HTMLInputElement).checked = options?.EnableHwEncoding || false;
|
||||
(page.querySelector('#selectScanBehavior') as HTMLSelectElement).value = (options?.ScanBehavior || TrickplayScanBehavior.NonBlocking);
|
||||
(page.querySelector('#selectProcessPriority') as HTMLSelectElement).value = (options?.ProcessPriority || ProcessPriorityClass.Normal);
|
||||
(page.querySelector('#txtInterval') as HTMLInputElement).value = String(options?.Interval);
|
||||
(page.querySelector('#txtInterval') as HTMLInputElement).value = options?.Interval?.toString() || '10000';
|
||||
(page.querySelector('#txtWidthResolutions') as HTMLInputElement).value = options?.WidthResolutions?.join(',') || '';
|
||||
(page.querySelector('#txtTileWidth') as HTMLInputElement).value = String(options?.TileWidth);
|
||||
(page.querySelector('#txtTileHeight') as HTMLInputElement).value = String(options?.TileHeight);
|
||||
(page.querySelector('#txtQscale') as HTMLInputElement).value = String(options?.Qscale);
|
||||
(page.querySelector('#txtJpegQuality') as HTMLInputElement).value = String(options?.JpegQuality);
|
||||
(page.querySelector('#txtProcessThreads') as HTMLInputElement).value = String(options?.ProcessThreads);
|
||||
(page.querySelector('#txtTileWidth') as HTMLInputElement).value = options?.TileWidth?.toString() || '10';
|
||||
(page.querySelector('#txtTileHeight') as HTMLInputElement).value = options?.TileHeight?.toString() || '10';
|
||||
(page.querySelector('#txtQscale') as HTMLInputElement).value = options?.Qscale?.toString() || '4';
|
||||
(page.querySelector('#txtJpegQuality') as HTMLInputElement).value = options?.JpegQuality?.toString() || '90';
|
||||
(page.querySelector('#txtProcessThreads') as HTMLInputElement).value = options?.ProcessThreads?.toString() || '1';
|
||||
|
||||
loading.hide();
|
||||
}, []);
|
||||
|
|
|
@ -20,12 +20,12 @@ import Page from '../../../../components/Page';
|
|||
import prompt from '../../../../components/prompt/prompt';
|
||||
import ServerConnections from 'components/ServerConnections';
|
||||
|
||||
type ItemArr = {
|
||||
type NamedItem = {
|
||||
name: string;
|
||||
value: UnratedItem;
|
||||
};
|
||||
|
||||
type UnratedItemArr = ItemArr & {
|
||||
type UnratedNamedItem = NamedItem & {
|
||||
checkedAttribute: string
|
||||
};
|
||||
|
||||
|
@ -63,7 +63,7 @@ function handleSaveUser(
|
|||
const UserParentalControl = () => {
|
||||
const [ userName, setUserName ] = useState('');
|
||||
const [ parentalRatings, setParentalRatings ] = useState<ParentalRating[]>([]);
|
||||
const [ unratedItems, setUnratedItems ] = useState<UnratedItemArr[]>([]);
|
||||
const [ unratedItems, setUnratedItems ] = useState<UnratedNamedItem[]>([]);
|
||||
const [ accessSchedules, setAccessSchedules ] = useState<AccessSchedule[]>([]);
|
||||
const [ allowedTags, setAllowedTags ] = useState<string[]>([]);
|
||||
const [ blockedTags, setBlockedTags ] = useState<string[]>([]);
|
||||
|
@ -103,7 +103,7 @@ const UserParentalControl = () => {
|
|||
return;
|
||||
}
|
||||
|
||||
const items: ItemArr[] = [{
|
||||
const items: NamedItem[] = [{
|
||||
name: globalize.translate('Books'),
|
||||
value: UnratedItem.Book
|
||||
}, {
|
||||
|
@ -126,19 +126,19 @@ const UserParentalControl = () => {
|
|||
value: UnratedItem.Series
|
||||
}];
|
||||
|
||||
const itemsArr: UnratedItemArr[] = [];
|
||||
const unratedNamedItem: UnratedNamedItem[] = [];
|
||||
|
||||
for (const item of items) {
|
||||
const isChecked = user.Policy?.BlockUnratedItems?.indexOf(item.value) != -1;
|
||||
const checkedAttribute = isChecked ? ' checked="checked"' : '';
|
||||
itemsArr.push({
|
||||
unratedNamedItem.push({
|
||||
value: item.value,
|
||||
name: item.name,
|
||||
checkedAttribute: checkedAttribute
|
||||
});
|
||||
}
|
||||
|
||||
setUnratedItems(itemsArr);
|
||||
setUnratedItems(unratedNamedItem);
|
||||
|
||||
const blockUnratedItems = page.querySelector('.blockUnratedItems') as HTMLDivElement;
|
||||
blockUnratedItems.dispatchEvent(new CustomEvent('create'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue