mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
migrate User Library Access Page
This commit is contained in:
parent
3f8b305995
commit
5d29529562
4 changed files with 27 additions and 24 deletions
|
@ -1,3 +0,0 @@
|
||||||
<div id="userLibraryAccessPage" data-role="page" class="page type-interior">
|
|
||||||
|
|
||||||
</div>
|
|
|
@ -1,16 +1,17 @@
|
||||||
import { UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
|
import { 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 loading from '../loading/loading';
|
import loading from '../components/loading/loading';
|
||||||
import libraryMenu from '../../scripts/libraryMenu';
|
import libraryMenu from '../scripts/libraryMenu';
|
||||||
import globalize from '../../scripts/globalize';
|
import globalize from '../scripts/globalize';
|
||||||
import toast from '../toast/toast';
|
import toast from '../components/toast/toast';
|
||||||
import SectionTabs from '../dashboard/users/SectionTabs';
|
import SectionTabs from '../components/dashboard/users/SectionTabs';
|
||||||
import ButtonElement from '../dashboard/elements/ButtonElement';
|
import ButtonElement from '../components/dashboard/elements/ButtonElement';
|
||||||
import { getParameterByName } from '../../utils/url';
|
import { getParameterByName } from '../utils/url';
|
||||||
import SectionTitleContainer from '../dashboard/elements/SectionTitleContainer';
|
import SectionTitleContainer from '../components/dashboard/elements/SectionTitleContainer';
|
||||||
import AccessContainer from '../dashboard/users/AccessContainer';
|
import AccessContainer from '../components/dashboard/users/AccessContainer';
|
||||||
import CheckBoxElement from '../dashboard/elements/CheckBoxElement';
|
import CheckBoxElement from '../components/dashboard/elements/CheckBoxElement';
|
||||||
|
import Page from '../components/Page';
|
||||||
|
|
||||||
type ItemsArr = {
|
type ItemsArr = {
|
||||||
Name?: string;
|
Name?: string;
|
||||||
|
@ -226,8 +227,11 @@ const UserLibraryAccessPage: FunctionComponent = () => {
|
||||||
}, [loadData]);
|
}, [loadData]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={element}>
|
<Page
|
||||||
<div className='content-primary'>
|
id='userLibraryAccessPage'
|
||||||
|
className='mainAnimatedPage type-interior'
|
||||||
|
>
|
||||||
|
<div ref={element} className='content-primary'>
|
||||||
<div className='verticalSection'>
|
<div className='verticalSection'>
|
||||||
<SectionTitleContainer
|
<SectionTitleContainer
|
||||||
title={userName}
|
title={userName}
|
||||||
|
@ -309,7 +313,8 @@ const UserLibraryAccessPage: FunctionComponent = () => {
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Page>
|
||||||
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,6 +5,7 @@ import ConnectionRequired from '../components/ConnectionRequired';
|
||||||
import NewUserPage from './NewUserPage';
|
import NewUserPage from './NewUserPage';
|
||||||
import SearchPage from './search';
|
import SearchPage from './search';
|
||||||
import UserEditPage from './UserEditPage';
|
import UserEditPage from './UserEditPage';
|
||||||
|
import UserLibraryAccessPage from './UserLibraryAccessPage';
|
||||||
import UserProfilesPage from './UserProfilesPage';
|
import UserProfilesPage from './UserProfilesPage';
|
||||||
|
|
||||||
const AppRoutes = () => (
|
const AppRoutes = () => (
|
||||||
|
@ -42,6 +43,14 @@ const AppRoutes = () => (
|
||||||
</ConnectionRequired>
|
</ConnectionRequired>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<Route
|
||||||
|
path='userLibraryAccessPage.html'
|
||||||
|
element={
|
||||||
|
<ConnectionRequired>
|
||||||
|
<UserLibraryAccessPage />
|
||||||
|
</ConnectionRequired>
|
||||||
|
}
|
||||||
|
/>
|
||||||
{/* Suppress warnings for unhandled routes */}
|
{/* Suppress warnings for unhandled routes */}
|
||||||
<Route path='*' element={null} />
|
<Route path='*' element={null} />
|
||||||
</Route>
|
</Route>
|
||||||
|
|
|
@ -429,14 +429,6 @@ import { appRouter } from '../components/appRouter';
|
||||||
controller: 'shows/tvrecommended'
|
controller: 'shows/tvrecommended'
|
||||||
});
|
});
|
||||||
|
|
||||||
defineRoute({
|
|
||||||
alias: '/userlibraryaccess.html',
|
|
||||||
path: 'dashboard/users/userlibraryaccess.html',
|
|
||||||
autoFocus: false,
|
|
||||||
roles: 'admin',
|
|
||||||
pageComponent: 'UserLibraryAccessPage'
|
|
||||||
});
|
|
||||||
|
|
||||||
defineRoute({
|
defineRoute({
|
||||||
alias: '/userparentalcontrol.html',
|
alias: '/userparentalcontrol.html',
|
||||||
path: 'dashboard/users/userparentalcontrol.html',
|
path: 'dashboard/users/userparentalcontrol.html',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue