-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'jellyfin:master' into master
- Loading branch information
Showing
35 changed files
with
771 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { History } from '@remix-run/router'; | ||
import React from 'react'; | ||
|
||
import { HistoryRouter } from './components/HistoryRouter'; | ||
import { ApiProvider } from './hooks/useApi'; | ||
import AppRoutes from './routes/index'; | ||
|
||
const App = ({ history }: { history: History }) => { | ||
return ( | ||
<ApiProvider> | ||
<HistoryRouter history={history}> | ||
<AppRoutes /> | ||
</HistoryRouter> | ||
</ApiProvider> | ||
); | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import React, { ButtonHTMLAttributes, DetailedHTMLProps } from 'react'; | ||
import classNames from 'classnames'; | ||
import layoutManager from '../../components/layoutManager'; | ||
import './emby-button.scss'; | ||
|
||
enum IconPosition { | ||
RIGHT = 'RIGHT', | ||
LEFT = 'LEFT', | ||
} | ||
|
||
interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, | ||
HTMLButtonElement | ||
> { | ||
icon?: string; | ||
iconClassName?: string; | ||
iconPos?: string; | ||
} | ||
|
||
const Button: React.FC<ButtonProps> = ({ | ||
className, | ||
title, | ||
icon, | ||
iconClassName, | ||
iconPos, | ||
onClick, | ||
...rest | ||
}) => { | ||
const btnClass = classNames( | ||
'emby-button', | ||
className, | ||
{ 'show-focus': layoutManager.tv } | ||
); | ||
|
||
const iconClass = classNames( | ||
'material-icons', | ||
iconClassName, | ||
icon | ||
); | ||
|
||
return ( | ||
<button | ||
className={btnClass} | ||
onClick={onClick} | ||
{...rest} | ||
> | ||
{icon && iconPos === IconPosition.LEFT && <span className={iconClass} aria-hidden='true' />} | ||
<span>{title}</span> | ||
{icon && iconPos === IconPosition.RIGHT && <span className={iconClass} aria-hidden='true' />} | ||
</button> | ||
); | ||
}; | ||
|
||
export default Button; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React, { ButtonHTMLAttributes, DetailedHTMLProps } from 'react'; | ||
import classNames from 'classnames'; | ||
import layoutManager from '../../components/layoutManager'; | ||
import './emby-button.scss'; | ||
|
||
interface IconButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, | ||
HTMLButtonElement | ||
> { | ||
icon?: string; | ||
iconClassName?: string; | ||
} | ||
|
||
const IconButton: React.FC<IconButtonProps> = ({ | ||
className, | ||
title, | ||
icon, | ||
iconClassName, | ||
disabled = false, | ||
onClick, | ||
...rest | ||
}) => { | ||
const btnClass = classNames( | ||
'paper-icon-button-light', | ||
className, | ||
{ 'show-focus': layoutManager.tv } | ||
); | ||
|
||
const iconClass = classNames( | ||
'material-icons', | ||
iconClassName, | ||
icon | ||
); | ||
|
||
return ( | ||
<button | ||
className={btnClass} | ||
title={title} | ||
disabled={disabled} | ||
onClick={onClick} | ||
{...rest} | ||
> | ||
<span className={iconClass} aria-hidden='true' /> | ||
</button> | ||
); | ||
}; | ||
|
||
export default IconButton; |
Oops, something went wrong.