mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
migrate User Edit Page
This commit is contained in:
parent
1b9202d9cb
commit
3f8b305995
5 changed files with 30 additions and 30 deletions
|
@ -1,3 +0,0 @@
|
|||
<div id="editUserPage" data-role="page" class="page type-interior">
|
||||
|
||||
</div>
|
|
@ -1,3 +0,0 @@
|
|||
<div id="userProfilesPage" data-role="page" class="page type-interior userProfilesPage fullWidthContent">
|
||||
|
||||
</div>
|
|
@ -1,19 +1,20 @@
|
|||
import { SyncPlayUserAccessType, UserDto } from '@thornbill/jellyfin-sdk/dist/generated-client';
|
||||
import React, { FunctionComponent, useCallback, useEffect, useState, useRef } from 'react';
|
||||
import Dashboard from '../../utils/dashboard';
|
||||
import globalize from '../../scripts/globalize';
|
||||
import LibraryMenu from '../../scripts/libraryMenu';
|
||||
import ButtonElement from '../dashboard/elements/ButtonElement';
|
||||
import CheckBoxElement from '../dashboard/elements/CheckBoxElement';
|
||||
import InputElement from '../dashboard/elements/InputElement';
|
||||
import LinkEditUserPreferences from '../dashboard/users/LinkEditUserPreferences';
|
||||
import SectionTitleContainer from '../dashboard/elements/SectionTitleContainer';
|
||||
import SectionTabs from '../dashboard/users/SectionTabs';
|
||||
import loading from '../loading/loading';
|
||||
import toast from '../toast/toast';
|
||||
import { getParameterByName } from '../../utils/url';
|
||||
import Dashboard from '../utils/dashboard';
|
||||
import globalize from '../scripts/globalize';
|
||||
import LibraryMenu from '../scripts/libraryMenu';
|
||||
import ButtonElement from '../components/dashboard/elements/ButtonElement';
|
||||
import CheckBoxElement from '../components/dashboard/elements/CheckBoxElement';
|
||||
import InputElement from '../components/dashboard/elements/InputElement';
|
||||
import LinkEditUserPreferences from '../components/dashboard/users/LinkEditUserPreferences';
|
||||
import SectionTitleContainer from '../components/dashboard/elements/SectionTitleContainer';
|
||||
import SectionTabs from '../components/dashboard/users/SectionTabs';
|
||||
import loading from '../components/loading/loading';
|
||||
import toast from '../components/toast/toast';
|
||||
import { getParameterByName } from '../utils/url';
|
||||
import escapeHTML from 'escape-html';
|
||||
import SelectElement from '../dashboard/elements/SelectElement';
|
||||
import SelectElement from '../components/dashboard/elements/SelectElement';
|
||||
import Page from '../components/Page';
|
||||
|
||||
type ItemsArr = {
|
||||
Name?: string;
|
||||
|
@ -298,8 +299,11 @@ const UserEditPage: FunctionComponent = () => {
|
|||
};
|
||||
|
||||
return (
|
||||
<div ref={element}>
|
||||
<div className='content-primary'>
|
||||
<Page
|
||||
id='editUserPage'
|
||||
className='mainAnimatedPage type-interior'
|
||||
>
|
||||
<div ref={element} className='content-primary'>
|
||||
<div className='verticalSection'>
|
||||
<SectionTitleContainer
|
||||
title={userName}
|
||||
|
@ -569,7 +573,8 @@ const UserEditPage: FunctionComponent = () => {
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</Page>
|
||||
|
||||
);
|
||||
};
|
||||
|
|
@ -4,6 +4,7 @@ import { Route, Routes } from 'react-router-dom';
|
|||
import ConnectionRequired from '../components/ConnectionRequired';
|
||||
import NewUserPage from './NewUserPage';
|
||||
import SearchPage from './search';
|
||||
import UserEditPage from './UserEditPage';
|
||||
import UserProfilesPage from './UserProfilesPage';
|
||||
|
||||
const AppRoutes = () => (
|
||||
|
@ -33,6 +34,14 @@ const AppRoutes = () => (
|
|||
</ConnectionRequired>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path='useredit.html'
|
||||
element={
|
||||
<ConnectionRequired>
|
||||
<UserEditPage />
|
||||
</ConnectionRequired>
|
||||
}
|
||||
/>
|
||||
{/* Suppress warnings for unhandled routes */}
|
||||
<Route path='*' element={null} />
|
||||
</Route>
|
||||
|
|
|
@ -429,14 +429,6 @@ import { appRouter } from '../components/appRouter';
|
|||
controller: 'shows/tvrecommended'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
alias: '/useredit.html',
|
||||
path: 'dashboard/users/useredit.html',
|
||||
autoFocus: false,
|
||||
roles: 'admin',
|
||||
pageComponent: 'UserEditPage'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
alias: '/userlibraryaccess.html',
|
||||
path: 'dashboard/users/userlibraryaccess.html',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue