mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
rebase
This commit is contained in:
parent
84e8bbceb1
commit
9db5773cb9
8 changed files with 16 additions and 50 deletions
|
@ -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;
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { FunctionComponent } from 'react';
|
import React, { FunctionComponent } from 'react';
|
||||||
import globalize from '../../../../scripts/globalize';
|
import globalize from '../../../scripts/globalize';
|
||||||
|
|
||||||
const createButtonElement = ({ type, className, title }) => ({
|
const createButtonElement = ({ type, className, title }) => ({
|
||||||
__html: `<button
|
__html: `<button
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { FunctionComponent } from 'react';
|
import React, { FunctionComponent } from 'react';
|
||||||
import globalize from '../../../../scripts/globalize';
|
import globalize from '../../../scripts/globalize';
|
||||||
|
|
||||||
const createCheckBoxElement = ({ type, className, title }) => ({
|
const createCheckBoxElement = ({ type, className, title }) => ({
|
||||||
__html: `<label>
|
__html: `<label>
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { FunctionComponent } from 'react';
|
import React, { FunctionComponent } from 'react';
|
||||||
import globalize from '../../../../scripts/globalize';
|
import globalize from '../../../scripts/globalize';
|
||||||
|
|
||||||
const createInputElement = ({ type, id, label, options }) => ({
|
const createInputElement = ({ type, id, label, options }) => ({
|
||||||
__html: `<input
|
__html: `<input
|
|
@ -17,7 +17,7 @@ type IProps = {
|
||||||
Id?: string;
|
Id?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ChannelAccess: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
|
const NewUserChannelAccessList: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
dangerouslySetInnerHTML={createCheckBoxElement({
|
dangerouslySetInnerHTML={createCheckBoxElement({
|
||||||
|
@ -28,5 +28,5 @@ const ChannelAccess: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ChannelAccess;
|
export default NewUserChannelAccessList;
|
||||||
|
|
|
@ -17,7 +17,7 @@ type IProps = {
|
||||||
Id?: string;
|
Id?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const FolderAccess: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
|
const NewUserFolderAccessList: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
dangerouslySetInnerHTML={createCheckBoxElement({
|
dangerouslySetInnerHTML={createCheckBoxElement({
|
||||||
|
@ -28,5 +28,5 @@ const FolderAccess: FunctionComponent<IProps> = ({Name, Id}: IProps) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default FolderAccess;
|
export default NewUserFolderAccessList;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { FunctionComponent } from 'react';
|
import React, { FunctionComponent } from 'react';
|
||||||
import globalize from '../../../scripts/globalize';
|
import globalize from '../../../scripts/globalize';
|
||||||
|
|
||||||
const createLinkElement = ({ className, href, title }) => ({
|
const createLinkElement = ({ className, title, href }) => ({
|
||||||
__html: `<a
|
__html: `<a
|
||||||
is="emby-linkbutton"
|
is="emby-linkbutton"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
|
|
|
@ -5,12 +5,12 @@ import globalize from '../../scripts/globalize';
|
||||||
import loading from '../loading/loading';
|
import loading from '../loading/loading';
|
||||||
import toast from '../toast/toast';
|
import toast from '../toast/toast';
|
||||||
|
|
||||||
import SectionTitleLinkElement from '../DashboardComponent/users/ElementComponent/SectionTitleLinkElement';
|
import SectionTitleLinkElement from '../dashboard/users/SectionTitleLinkElement';
|
||||||
import InputElement from '../DashboardComponent/users/ElementComponent/InputElement';
|
import InputElement from '../dashboard/users/InputElement';
|
||||||
import CheckBoxElement from '../DashboardComponent/users/ElementComponent/CheckBoxElement';
|
import CheckBoxElement from '../dashboard/users/CheckBoxElement';
|
||||||
import FolderAccess from '../DashboardComponent/users/NewUserPage/FolderAccess';
|
import NewUserFolderAccessList from '../dashboard/users/NewUserFolderAccessList';
|
||||||
import ChannelAccess from '../DashboardComponent/users/NewUserPage/ChannelAccess';
|
import NewUserChannelAccessList from '../dashboard/users/NewUserChannelAccessList';
|
||||||
import ButtonElement from '../DashboardComponent/users/ElementComponent/ButtonElement';
|
import ButtonElement from '../dashboard/users/ButtonElement';
|
||||||
|
|
||||||
type userInput = {
|
type userInput = {
|
||||||
Name?: string;
|
Name?: string;
|
||||||
|
@ -180,7 +180,7 @@ const NewUserPage: FunctionComponent = () => {
|
||||||
</h3>
|
</h3>
|
||||||
<div className='checkboxList paperList' style={{padding: '.5em 1em'}}>
|
<div className='checkboxList paperList' style={{padding: '.5em 1em'}}>
|
||||||
{mediaFoldersResult.map(folder => (
|
{mediaFoldersResult.map(folder => (
|
||||||
<FolderAccess
|
<NewUserFolderAccessList
|
||||||
key={folder.Id}
|
key={folder.Id}
|
||||||
Id={folder.Id}
|
Id={folder.Id}
|
||||||
Name={folder.Name}
|
Name={folder.Name}
|
||||||
|
@ -207,7 +207,7 @@ const NewUserPage: FunctionComponent = () => {
|
||||||
</h3>
|
</h3>
|
||||||
<div className='checkboxList paperList' style={{padding: '.5em 1em'}}>
|
<div className='checkboxList paperList' style={{padding: '.5em 1em'}}>
|
||||||
{channelsResult.map(folder => (
|
{channelsResult.map(folder => (
|
||||||
<ChannelAccess
|
<NewUserChannelAccessList
|
||||||
key={folder.Id}
|
key={folder.Id}
|
||||||
Id={folder.Id}
|
Id={folder.Id}
|
||||||
Name={folder.Name}
|
Name={folder.Name}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue