1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
This commit is contained in:
grafixeyehero 2021-10-19 19:19:28 +03:00
parent 84e8bbceb1
commit 9db5773cb9
8 changed files with 16 additions and 50 deletions

View file

@ -1,34 +0,0 @@
import React, { FunctionComponent } from 'react';
import globalize from '../../../../scripts/globalize';
const createLinkElement = ({ className, title, href }) => ({
__html: `<a
is="emby-linkbutton"
rel="noopener noreferrer"
class="${className}"
target="_blank"
href="${href}"
>
${title}
</a>`
});
type IProps = {
title?: string;
className?: string;
url?: string
}
const SectionTitleLinkElement: FunctionComponent<IProps> = ({ className, title, url }: IProps) => {
return (
<div
dangerouslySetInnerHTML={createLinkElement({
className: className,
title: globalize.translate(title),
href: url
})}
/>
);
};
export default SectionTitleLinkElement;

View file

@ -1,5 +1,5 @@
import React, { FunctionComponent } from 'react';
import globalize from '../../../../scripts/globalize';
import globalize from '../../../scripts/globalize';
const createButtonElement = ({ type, className, title }) => ({
__html: `<button

View file

@ -1,5 +1,5 @@
import React, { FunctionComponent } from 'react';
import globalize from '../../../../scripts/globalize';
import globalize from '../../../scripts/globalize';
const createCheckBoxElement = ({ type, className, title }) => ({
__html: `<label>

View file

@ -1,5 +1,5 @@
import React, { FunctionComponent } from 'react';
import globalize from '../../../../scripts/globalize';
import globalize from '../../../scripts/globalize';
const createInputElement = ({ type, id, label, options }) => ({
__html: `<input

View file

@ -17,7 +17,7 @@ type IProps = {
Id?: string;
}
const ChannelAccess: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
const NewUserChannelAccessList: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
return (
<div
dangerouslySetInnerHTML={createCheckBoxElement({
@ -28,5 +28,5 @@ const ChannelAccess: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
);
};
export default ChannelAccess;
export default NewUserChannelAccessList;

View file

@ -17,7 +17,7 @@ type IProps = {
Id?: string;
}
const FolderAccess: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
const NewUserFolderAccessList: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
return (
<div
dangerouslySetInnerHTML={createCheckBoxElement({
@ -28,5 +28,5 @@ const FolderAccess: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
);
};
export default FolderAccess;
export default NewUserFolderAccessList;

View file

@ -1,7 +1,7 @@
import React, { FunctionComponent } from 'react';
import globalize from '../../../scripts/globalize';
const createLinkElement = ({ className, href, title }) => ({
const createLinkElement = ({ className, title, href }) => ({
__html: `<a
is="emby-linkbutton"
rel="noopener noreferrer"

View file

@ -5,12 +5,12 @@ import globalize from '../../scripts/globalize';
import loading from '../loading/loading';
import toast from '../toast/toast';
import SectionTitleLinkElement from '../DashboardComponent/users/ElementComponent/SectionTitleLinkElement';
import InputElement from '../DashboardComponent/users/ElementComponent/InputElement';
import CheckBoxElement from '../DashboardComponent/users/ElementComponent/CheckBoxElement';
import FolderAccess from '../DashboardComponent/users/NewUserPage/FolderAccess';
import ChannelAccess from '../DashboardComponent/users/NewUserPage/ChannelAccess';
import ButtonElement from '../DashboardComponent/users/ElementComponent/ButtonElement';
import SectionTitleLinkElement from '../dashboard/users/SectionTitleLinkElement';
import InputElement from '../dashboard/users/InputElement';
import CheckBoxElement from '../dashboard/users/CheckBoxElement';
import NewUserFolderAccessList from '../dashboard/users/NewUserFolderAccessList';
import NewUserChannelAccessList from '../dashboard/users/NewUserChannelAccessList';
import ButtonElement from '../dashboard/users/ButtonElement';
type userInput = {
Name?: string;
@ -180,7 +180,7 @@ const NewUserPage: FunctionComponent = () => {
</h3>
<div className='checkboxList paperList' style={{padding: '.5em 1em'}}>
{mediaFoldersResult.map(folder => (
<FolderAccess
<NewUserFolderAccessList
key={folder.Id}
Id={folder.Id}
Name={folder.Name}
@ -207,7 +207,7 @@ const NewUserPage: FunctionComponent = () => {
</h3>
<div className='checkboxList paperList' style={{padding: '.5em 1em'}}>
{channelsResult.map(folder => (
<ChannelAccess
<NewUserChannelAccessList
key={folder.Id}
Id={folder.Id}
Name={folder.Name}