mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add SectionTitleContainer in UserProfilesPage
This commit is contained in:
parent
db5472b3bb
commit
2fc9741d57
7 changed files with 48 additions and 33 deletions
|
@ -1,21 +1,31 @@
|
||||||
import React, { FunctionComponent } from 'react';
|
import React, { FunctionComponent } from 'react';
|
||||||
|
import SectionTitleButtonElement from './SectionTitleButtonElement';
|
||||||
import SectionTitleLinkElement from './SectionTitleLinkElement';
|
import SectionTitleLinkElement from './SectionTitleLinkElement';
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
title: string;
|
title: string;
|
||||||
|
isBtnVisible?: boolean;
|
||||||
|
titleLink?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SectionTitleContainer: FunctionComponent<IProps> = ({title}: IProps) => {
|
const SectionTitleContainer: FunctionComponent<IProps> = ({title, isBtnVisible, titleLink}: IProps) => {
|
||||||
return (
|
return (
|
||||||
<div className='verticalSection'>
|
<div className='verticalSection'>
|
||||||
<div className='sectionTitleContainer flex align-items-center'>
|
<div className='sectionTitleContainer flex align-items-center'>
|
||||||
<h2 className='sectionTitle'>
|
<h2 className='sectionTitle'>
|
||||||
{title}
|
{title}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
{isBtnVisible && <SectionTitleButtonElement
|
||||||
|
className='fab btnAddUser submit sectionTitleButton'
|
||||||
|
title='ButtonAddUser'
|
||||||
|
icon='add'
|
||||||
|
/>}
|
||||||
|
|
||||||
<SectionTitleLinkElement
|
<SectionTitleLinkElement
|
||||||
className='raised button-alt headerHelpButton'
|
className='raised button-alt headerHelpButton'
|
||||||
title='Help'
|
title='Help'
|
||||||
url='https://docs.jellyfin.org/general/server/users/'
|
url={titleLink}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -177,7 +177,11 @@ const NewUserPage: FunctionComponent = () => {
|
||||||
return (
|
return (
|
||||||
<div ref={element}>
|
<div ref={element}>
|
||||||
<div className='content-primary'>
|
<div className='content-primary'>
|
||||||
<SectionTitleContainer title={globalize.translate('ButtonAddUser')}/>
|
<SectionTitleContainer
|
||||||
|
title={globalize.translate('HeaderAddUser')}
|
||||||
|
isBtnVisible={false}
|
||||||
|
titleLink='https://docs.jellyfin.org/general/server/users/'
|
||||||
|
/>
|
||||||
<form className='newUserProfileForm'>
|
<form className='newUserProfileForm'>
|
||||||
<div className='inputContainer'>
|
<div className='inputContainer'>
|
||||||
<InputElement
|
<InputElement
|
||||||
|
|
|
@ -278,7 +278,11 @@ const UserEditPage: FunctionComponent = () => {
|
||||||
return (
|
return (
|
||||||
<div ref={element}>
|
<div ref={element}>
|
||||||
<div className='content-primary'>
|
<div className='content-primary'>
|
||||||
<SectionTitleContainer title={userName}/>
|
<SectionTitleContainer
|
||||||
|
title={userName}
|
||||||
|
isBtnVisible={false}
|
||||||
|
titleLink='https://docs.jellyfin.org/general/server/users/'
|
||||||
|
/>
|
||||||
<SectionTabs activeTab='useredit'/>
|
<SectionTabs activeTab='useredit'/>
|
||||||
<div
|
<div
|
||||||
className='lnkEditUserPreferencesContainer'
|
className='lnkEditUserPreferencesContainer'
|
||||||
|
|
|
@ -228,7 +228,11 @@ const UserLibraryAccessPage: FunctionComponent = () => {
|
||||||
return (
|
return (
|
||||||
<div ref={element}>
|
<div ref={element}>
|
||||||
<div className='content-primary'>
|
<div className='content-primary'>
|
||||||
<SectionTitleContainer title={userName}/>
|
<SectionTitleContainer
|
||||||
|
title={userName}
|
||||||
|
isBtnVisible={false}
|
||||||
|
titleLink='https://docs.jellyfin.org/general/server/users/'
|
||||||
|
/>
|
||||||
<SectionTabs activeTab='userlibraryaccess'/>
|
<SectionTabs activeTab='userlibraryaccess'/>
|
||||||
<form className='userLibraryAccessForm'>
|
<form className='userLibraryAccessForm'>
|
||||||
<AccessContainer
|
<AccessContainer
|
||||||
|
|
|
@ -319,7 +319,11 @@ const UserParentalControl: FunctionComponent = () => {
|
||||||
return (
|
return (
|
||||||
<div ref={element}>
|
<div ref={element}>
|
||||||
<div className='content-primary'>
|
<div className='content-primary'>
|
||||||
<SectionTitleContainer title={userName}/>
|
<SectionTitleContainer
|
||||||
|
title={userName}
|
||||||
|
isBtnVisible={false}
|
||||||
|
titleLink='https://docs.jellyfin.org/general/server/users/'
|
||||||
|
/>
|
||||||
<SectionTabs activeTab='userparentalcontrol'/>
|
<SectionTabs activeTab='userparentalcontrol'/>
|
||||||
<form className='userParentalControlForm'>
|
<form className='userParentalControlForm'>
|
||||||
<div className='selectContainer'>
|
<div className='selectContainer'>
|
||||||
|
|
|
@ -23,7 +23,11 @@ const UserPasswordPage: FunctionComponent = () => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className='content-primary'>
|
<div className='content-primary'>
|
||||||
<SectionTitleContainer title={userName}/>
|
<SectionTitleContainer
|
||||||
|
title={userName}
|
||||||
|
isBtnVisible={false}
|
||||||
|
titleLink='https://docs.jellyfin.org/general/server/users/'
|
||||||
|
/>
|
||||||
<SectionTabs activeTab='userpassword'/>
|
<SectionTabs activeTab='userpassword'/>
|
||||||
<div className='readOnlyContent'>
|
<div className='readOnlyContent'>
|
||||||
<UserPasswordForm
|
<UserPasswordForm
|
||||||
|
|
|
@ -6,8 +6,7 @@ import loading from '../loading/loading';
|
||||||
import dom from '../../scripts/dom';
|
import dom from '../../scripts/dom';
|
||||||
import confirm from '../../components/confirm/confirm';
|
import confirm from '../../components/confirm/confirm';
|
||||||
import UserCardBox from '../dashboard/users/UserCardBox';
|
import UserCardBox from '../dashboard/users/UserCardBox';
|
||||||
import SectionTitleButtonElement from '../dashboard/users/SectionTitleButtonElement';
|
import SectionTitleContainer from '../dashboard/users/SectionTitleContainer';
|
||||||
import SectionTitleLinkElement from '../dashboard/users/SectionTitleLinkElement';
|
|
||||||
import '../../elements/emby-button/emby-button';
|
import '../../elements/emby-button/emby-button';
|
||||||
import '../../elements/emby-button/paper-icon-button-light';
|
import '../../elements/emby-button/paper-icon-button-light';
|
||||||
import '../../components/cardbuilder/card.scss';
|
import '../../components/cardbuilder/card.scss';
|
||||||
|
@ -133,30 +132,16 @@ const UserProfilesPage: FunctionComponent = () => {
|
||||||
return (
|
return (
|
||||||
<div ref={element}>
|
<div ref={element}>
|
||||||
<div className='content-primary'>
|
<div className='content-primary'>
|
||||||
<div className='verticalSection verticalSection-extrabottompadding'>
|
<SectionTitleContainer
|
||||||
<div
|
title={globalize.translate('HeaderUsers')}
|
||||||
className='sectionTitleContainer sectionTitleContainer-cards'
|
isBtnVisible={true}
|
||||||
style={{display: 'flex', alignItems: 'center', paddingBottom: '1em'}}
|
titleLink='https://docs.jellyfin.org/general/server/users/adding-managing-users.html'
|
||||||
>
|
/>
|
||||||
<h2 className='sectionTitle sectionTitle-cards'>
|
|
||||||
{globalize.translate('HeaderUsers')}
|
<div className='localUsers itemsContainer vertical-wrap'>
|
||||||
</h2>
|
{users.map(user => {
|
||||||
<SectionTitleButtonElement
|
return <UserCardBox key={user.Id} user={user} />;
|
||||||
className='fab btnAddUser submit sectionTitleButton'
|
})}
|
||||||
title='ButtonAddUser'
|
|
||||||
icon='add'
|
|
||||||
/>
|
|
||||||
<SectionTitleLinkElement
|
|
||||||
className='raised button-alt headerHelpButton'
|
|
||||||
title='Help'
|
|
||||||
url='https://docs.jellyfin.org/general/server/users/adding-managing-users.html'
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className='localUsers itemsContainer vertical-wrap'>
|
|
||||||
{users.map(user => {
|
|
||||||
return <UserCardBox key={user.Id} user={user} />;
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue