mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix admin page ui
This commit is contained in:
parent
2cdc1bcfef
commit
732e3eb956
2 changed files with 11 additions and 12 deletions
|
@ -160,7 +160,11 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <Outlet />;
|
return (
|
||||||
|
<div className='skinBody'>
|
||||||
|
<Outlet />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ConnectionRequired;
|
export default ConnectionRequired;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { AccessSchedule, DynamicDayOfWeek, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
|
import { AccessSchedule, DynamicDayOfWeek, ParentalRating, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
|
||||||
import React, { FunctionComponent, useCallback, useEffect, useState, useRef } from 'react';
|
import React, { FunctionComponent, useCallback, useEffect, useState, useRef } from 'react';
|
||||||
import globalize from '../../scripts/globalize';
|
import globalize from '../../scripts/globalize';
|
||||||
import LibraryMenu from '../../scripts/libraryMenu';
|
import LibraryMenu from '../../scripts/libraryMenu';
|
||||||
|
@ -15,12 +15,7 @@ import escapeHTML from 'escape-html';
|
||||||
import SelectElement from '../../elements/SelectElement';
|
import SelectElement from '../../elements/SelectElement';
|
||||||
import Page from '../../components/Page';
|
import Page from '../../components/Page';
|
||||||
|
|
||||||
type RatingsArr = {
|
type UnratedItem = {
|
||||||
Name: string;
|
|
||||||
Value: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
type ItemsArr = {
|
|
||||||
name: string;
|
name: string;
|
||||||
value: string;
|
value: string;
|
||||||
checkedAttribute: string
|
checkedAttribute: string
|
||||||
|
@ -28,8 +23,8 @@ type ItemsArr = {
|
||||||
|
|
||||||
const UserParentalControl: FunctionComponent = () => {
|
const UserParentalControl: FunctionComponent = () => {
|
||||||
const [ userName, setUserName ] = useState('');
|
const [ userName, setUserName ] = useState('');
|
||||||
const [ parentalRatings, setParentalRatings ] = useState<RatingsArr[]>([]);
|
const [ parentalRatings, setParentalRatings ] = useState<ParentalRating[]>([]);
|
||||||
const [ unratedItems, setUnratedItems ] = useState<ItemsArr[]>([]);
|
const [ unratedItems, setUnratedItems ] = useState<UnratedItem[]>([]);
|
||||||
const [ accessSchedules, setAccessSchedules ] = useState<AccessSchedule[]>([]);
|
const [ accessSchedules, setAccessSchedules ] = useState<AccessSchedule[]>([]);
|
||||||
const [ blockedTags, setBlockedTags ] = useState([]);
|
const [ blockedTags, setBlockedTags ] = useState([]);
|
||||||
|
|
||||||
|
@ -37,7 +32,7 @@ const UserParentalControl: FunctionComponent = () => {
|
||||||
|
|
||||||
const populateRatings = useCallback((allParentalRatings) => {
|
const populateRatings = useCallback((allParentalRatings) => {
|
||||||
let rating;
|
let rating;
|
||||||
const ratings: RatingsArr[] = [];
|
const ratings: ParentalRating[] = [];
|
||||||
|
|
||||||
for (let i = 0, length = allParentalRatings.length; i < length; i++) {
|
for (let i = 0, length = allParentalRatings.length; i < length; i++) {
|
||||||
rating = allParentalRatings[i];
|
rating = allParentalRatings[i];
|
||||||
|
@ -91,7 +86,7 @@ const UserParentalControl: FunctionComponent = () => {
|
||||||
value: 'Series'
|
value: 'Series'
|
||||||
}];
|
}];
|
||||||
|
|
||||||
const itemsArr: ItemsArr[] = [];
|
const itemsArr: UnratedItem[] = [];
|
||||||
|
|
||||||
for (const item of items) {
|
for (const item of items) {
|
||||||
const isChecked = user.Policy.BlockUnratedItems.indexOf(item.value) != -1;
|
const isChecked = user.Policy.BlockUnratedItems.indexOf(item.value) != -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue