mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Backport pull request #5517 from jellyfin-web/release-10.9.z
Fix video osd not hiding in experimental layout
Original-merge: ea1d069e90
Merged-by: thornbill <thornbill@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
cb01afce02
commit
017734a0bb
7 changed files with 117 additions and 29 deletions
|
@ -18,17 +18,30 @@ interface AppToolbarProps {
|
|||
onDrawerButtonClick: (event: React.MouseEvent<HTMLElement>) => void
|
||||
}
|
||||
|
||||
const PUBLIC_PATHS = [
|
||||
'/addserver.html',
|
||||
'/selectserver.html',
|
||||
'/login.html',
|
||||
'/forgotpassword.html',
|
||||
'/forgotpasswordpin.html'
|
||||
];
|
||||
|
||||
const ExperimentalAppToolbar: FC<AppToolbarProps> = ({
|
||||
isDrawerAvailable,
|
||||
isDrawerOpen,
|
||||
onDrawerButtonClick
|
||||
}) => {
|
||||
const location = useLocation();
|
||||
|
||||
// The video osd does not show the standard toolbar
|
||||
if (location.pathname === '/video') return null;
|
||||
|
||||
const isTabsAvailable = isTabPath(location.pathname);
|
||||
const isPublicPath = PUBLIC_PATHS.includes(location.pathname);
|
||||
|
||||
return (
|
||||
<AppToolbar
|
||||
buttons={
|
||||
buttons={!isPublicPath && (
|
||||
<>
|
||||
<SyncPlayButton />
|
||||
<RemotePlayButton />
|
||||
|
@ -45,10 +58,11 @@ const ExperimentalAppToolbar: FC<AppToolbarProps> = ({
|
|||
</IconButton>
|
||||
</Tooltip>
|
||||
</>
|
||||
}
|
||||
)}
|
||||
isDrawerAvailable={isDrawerAvailable}
|
||||
isDrawerOpen={isDrawerOpen}
|
||||
onDrawerButtonClick={onDrawerButtonClick}
|
||||
isUserMenuAvailable={!isPublicPath}
|
||||
>
|
||||
{isTabsAvailable && (<AppTabs isDrawerOpen={isDrawerOpen} />)}
|
||||
</AppToolbar>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue