mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
migrate New User Page
This commit is contained in:
parent
9efc39f828
commit
a2cd1b3176
4 changed files with 26 additions and 23 deletions
|
@ -1,3 +0,0 @@
|
||||||
<div id="newUserPage" data-role="page" class="page type-interior">
|
|
||||||
|
|
||||||
</div>
|
|
|
@ -1,14 +1,15 @@
|
||||||
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 loading from '../loading/loading';
|
import loading from '../components/loading/loading';
|
||||||
import toast from '../toast/toast';
|
import toast from '../components/toast/toast';
|
||||||
import SectionTitleContainer from '../dashboard/elements/SectionTitleContainer';
|
import SectionTitleContainer from '../components/dashboard/elements/SectionTitleContainer';
|
||||||
import InputElement from '../dashboard/elements/InputElement';
|
import InputElement from '../components/dashboard/elements/InputElement';
|
||||||
import ButtonElement from '../dashboard/elements/ButtonElement';
|
import ButtonElement from '../components/dashboard/elements/ButtonElement';
|
||||||
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 userInput = {
|
type userInput = {
|
||||||
Name?: string;
|
Name?: string;
|
||||||
|
@ -175,8 +176,11 @@ const NewUserPage: FunctionComponent = () => {
|
||||||
}, [loadUser]);
|
}, [loadUser]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={element}>
|
<Page
|
||||||
<div className='content-primary'>
|
id='newUserPage'
|
||||||
|
className='mainAnimatedPage type-interior'
|
||||||
|
>
|
||||||
|
<div ref={element} className='content-primary'>
|
||||||
<div className='verticalSection'>
|
<div className='verticalSection'>
|
||||||
<SectionTitleContainer
|
<SectionTitleContainer
|
||||||
title={globalize.translate('HeaderAddUser')}
|
title={globalize.translate('HeaderAddUser')}
|
||||||
|
@ -254,7 +258,8 @@ const NewUserPage: FunctionComponent = () => {
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Page>
|
||||||
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import { Route, Routes } from 'react-router-dom';
|
import { Route, Routes } from 'react-router-dom';
|
||||||
|
|
||||||
import ConnectionRequired from '../components/ConnectionRequired';
|
import ConnectionRequired from '../components/ConnectionRequired';
|
||||||
|
import NewUserPage from './NewUserPage';
|
||||||
import SearchPage from './search';
|
import SearchPage from './search';
|
||||||
|
|
||||||
const AppRoutes = () => (
|
const AppRoutes = () => (
|
||||||
|
@ -15,6 +16,14 @@ const AppRoutes = () => (
|
||||||
</ConnectionRequired>
|
</ConnectionRequired>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<Route
|
||||||
|
path='usernew.html'
|
||||||
|
element={
|
||||||
|
<ConnectionRequired>
|
||||||
|
<NewUserPage />
|
||||||
|
</ConnectionRequired>
|
||||||
|
}
|
||||||
|
/>
|
||||||
{/* Suppress warnings for unhandled routes */}
|
{/* Suppress warnings for unhandled routes */}
|
||||||
<Route path='*' element={null} />
|
<Route path='*' element={null} />
|
||||||
</Route>
|
</Route>
|
||||||
|
|
|
@ -445,14 +445,6 @@ import { appRouter } from '../components/appRouter';
|
||||||
pageComponent: 'UserLibraryAccessPage'
|
pageComponent: 'UserLibraryAccessPage'
|
||||||
});
|
});
|
||||||
|
|
||||||
defineRoute({
|
|
||||||
alias: '/usernew.html',
|
|
||||||
path: 'dashboard/users/usernew.html',
|
|
||||||
autoFocus: false,
|
|
||||||
roles: 'admin',
|
|
||||||
pageComponent: 'NewUserPage'
|
|
||||||
});
|
|
||||||
|
|
||||||
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