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 { SyncPlayUserAccessType, 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 Dashboard from '../../utils/dashboard';
|
import Dashboard from '../utils/dashboard';
|
||||||
import globalize from '../../scripts/globalize';
|
import globalize from '../scripts/globalize';
|
||||||
import LibraryMenu from '../../scripts/libraryMenu';
|
import LibraryMenu from '../scripts/libraryMenu';
|
||||||
import ButtonElement from '../dashboard/elements/ButtonElement';
|
import ButtonElement from '../components/dashboard/elements/ButtonElement';
|
||||||
import CheckBoxElement from '../dashboard/elements/CheckBoxElement';
|
import CheckBoxElement from '../components/dashboard/elements/CheckBoxElement';
|
||||||
import InputElement from '../dashboard/elements/InputElement';
|
import InputElement from '../components/dashboard/elements/InputElement';
|
||||||
import LinkEditUserPreferences from '../dashboard/users/LinkEditUserPreferences';
|
import LinkEditUserPreferences from '../components/dashboard/users/LinkEditUserPreferences';
|
||||||
import SectionTitleContainer from '../dashboard/elements/SectionTitleContainer';
|
import SectionTitleContainer from '../components/dashboard/elements/SectionTitleContainer';
|
||||||
import SectionTabs from '../dashboard/users/SectionTabs';
|
import SectionTabs from '../components/dashboard/users/SectionTabs';
|
||||||
import loading from '../loading/loading';
|
import loading from '../components/loading/loading';
|
||||||
import toast from '../toast/toast';
|
import toast from '../components/toast/toast';
|
||||||
import { getParameterByName } from '../../utils/url';
|
import { getParameterByName } from '../utils/url';
|
||||||
import escapeHTML from 'escape-html';
|
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 = {
|
type ItemsArr = {
|
||||||
Name?: string;
|
Name?: string;
|
||||||
|
@ -298,8 +299,11 @@ const UserEditPage: FunctionComponent = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={element}>
|
<Page
|
||||||
<div className='content-primary'>
|
id='editUserPage'
|
||||||
|
className='mainAnimatedPage type-interior'
|
||||||
|
>
|
||||||
|
<div ref={element} className='content-primary'>
|
||||||
<div className='verticalSection'>
|
<div className='verticalSection'>
|
||||||
<SectionTitleContainer
|
<SectionTitleContainer
|
||||||
title={userName}
|
title={userName}
|
||||||
|
@ -569,7 +573,8 @@ const UserEditPage: FunctionComponent = () => {
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Page>
|
||||||
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { Route, Routes } from 'react-router-dom';
|
||||||
import ConnectionRequired from '../components/ConnectionRequired';
|
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 UserProfilesPage from './UserProfilesPage';
|
import UserProfilesPage from './UserProfilesPage';
|
||||||
|
|
||||||
const AppRoutes = () => (
|
const AppRoutes = () => (
|
||||||
|
@ -33,6 +34,14 @@ const AppRoutes = () => (
|
||||||
</ConnectionRequired>
|
</ConnectionRequired>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<Route
|
||||||
|
path='useredit.html'
|
||||||
|
element={
|
||||||
|
<ConnectionRequired>
|
||||||
|
<UserEditPage />
|
||||||
|
</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: '/useredit.html',
|
|
||||||
path: 'dashboard/users/useredit.html',
|
|
||||||
autoFocus: false,
|
|
||||||
roles: 'admin',
|
|
||||||
pageComponent: 'UserEditPage'
|
|
||||||
});
|
|
||||||
|
|
||||||
defineRoute({
|
defineRoute({
|
||||||
alias: '/userlibraryaccess.html',
|
alias: '/userlibraryaccess.html',
|
||||||
path: 'dashboard/users/userlibraryaccess.html',
|
path: 'dashboard/users/userlibraryaccess.html',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue