1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

migrate User Password Page

This commit is contained in:
grafixeyehero 2022-06-29 03:31:55 +03:00
parent 2d115bc6c8
commit d2df5830b5
4 changed files with 20 additions and 16 deletions

View file

@ -1,3 +0,0 @@
<div id="userPasswordPage" data-role="page" class="page type-interior userPasswordPage">
</div>

View file

@ -1,8 +1,9 @@
import React, { FunctionComponent, useCallback, useEffect, useState } from 'react'; import React, { FunctionComponent, useCallback, useEffect, useState } from 'react';
import SectionTabs from '../dashboard/users/SectionTabs'; import SectionTabs from '../components/dashboard/users/SectionTabs';
import UserPasswordForm from '../dashboard/users/UserPasswordForm'; import UserPasswordForm from '../components/dashboard/users/UserPasswordForm';
import { getParameterByName } from '../../utils/url'; import { getParameterByName } from '../utils/url';
import SectionTitleContainer from '../dashboard/elements/SectionTitleContainer'; import SectionTitleContainer from '../components/dashboard/elements/SectionTitleContainer';
import Page from '../components/Page';
const UserPasswordPage: FunctionComponent = () => { const UserPasswordPage: FunctionComponent = () => {
const userId = getParameterByName('userId'); const userId = getParameterByName('userId');
@ -21,7 +22,10 @@ const UserPasswordPage: FunctionComponent = () => {
}, [loadUser]); }, [loadUser]);
return ( return (
<div> <Page
id='userPasswordPage'
className='mainAnimatedPage type-interior userPasswordPage'
>
<div className='content-primary'> <div className='content-primary'>
<div className='verticalSection'> <div className='verticalSection'>
<SectionTitleContainer <SectionTitleContainer
@ -36,7 +40,8 @@ const UserPasswordPage: FunctionComponent = () => {
/> />
</div> </div>
</div> </div>
</div> </Page>
); );
}; };

View file

@ -7,6 +7,7 @@ import SearchPage from './search';
import UserEditPage from './UserEditPage'; import UserEditPage from './UserEditPage';
import UserLibraryAccessPage from './UserLibraryAccessPage'; import UserLibraryAccessPage from './UserLibraryAccessPage';
import UserParentalControl from './UserParentalControl'; import UserParentalControl from './UserParentalControl';
import UserPasswordPage from './UserPasswordPage';
import UserProfilesPage from './UserProfilesPage'; import UserProfilesPage from './UserProfilesPage';
const AppRoutes = () => ( const AppRoutes = () => (
@ -60,6 +61,14 @@ const AppRoutes = () => (
</ConnectionRequired> </ConnectionRequired>
} }
/> />
<Route
path='userpassword.html'
element={
<ConnectionRequired>
<UserPasswordPage />
</ConnectionRequired>
}
/>
{/* Suppress warnings for unhandled routes */} {/* Suppress warnings for unhandled routes */}
<Route path='*' element={null} /> <Route path='*' element={null} />
</Route> </Route>

View file

@ -429,13 +429,6 @@ import { appRouter } from '../components/appRouter';
controller: 'shows/tvrecommended' controller: 'shows/tvrecommended'
}); });
defineRoute({
alias: '/userpassword.html',
path: 'dashboard/users/userpassword.html',
autoFocus: false,
pageComponent: 'UserPasswordPage'
});
defineRoute({ defineRoute({
alias: '/wizardremoteaccess.html', alias: '/wizardremoteaccess.html',
path: 'wizard/remote/index.html', path: 'wizard/remote/index.html',