fix(app): Enable window decorations and disable persistent_window_state
This commit is contained in:
7 files changed
+65
-3
No files matched your search
@@ -0,0 +1,46 @@
|
||||
import { MediaUrl } from "@jellyfin/sdk/lib/generated-client";
|
||||
import { Dialog, IconButton } from "@mui/material";
|
||||
import React, { useState } from "react";
|
||||
import ReactPlayer from "react-player";
|
||||
|
||||
type TrailerButtonType = {
|
||||
trailerItem: MediaUrl[];
|
||||
disabled: boolean;
|
||||
};
|
||||
|
||||
const TrailerButton = (props: TrailerButtonType) => {
|
||||
const [dialog, setDialog] = useState(false);
|
||||
return (
|
||||
<>
|
||||
<IconButton
|
||||
disabled={props.disabled ?? false}
|
||||
onClick={() => setDialog(true)}
|
||||
>
|
||||
<span className="material-symbols-rounded">theaters</span>
|
||||
</IconButton>
|
||||
<Dialog
|
||||
maxWidth="md"
|
||||
fullWidth
|
||||
open={dialog}
|
||||
PaperProps={{
|
||||
style: {
|
||||
overflow: "hidden",
|
||||
},
|
||||
}}
|
||||
onClose={() => setDialog(false)}
|
||||
>
|
||||
<ReactPlayer
|
||||
playing={false}
|
||||
url={props.trailerItem[0].Url}
|
||||
width="100%"
|
||||
height="auto"
|
||||
style={{
|
||||
aspectRatio: "16/9",
|
||||
}}
|
||||
/>
|
||||
</Dialog>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default TrailerButton;
|
||||
@@ -37,6 +37,7 @@ import Hero from "../../components/layouts/item/hero";
|
||||
import LikeButton from "../../components/buttons/likeButton";
|
||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||
import PlayButton from "../../components/buttons/playButton";
|
||||
import TrailerButton from "../../components/buttons/trailerButton";
|
||||
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||
import ShowMoreText from "../../components/showMoreText";
|
||||
import TextLink from "../../components/textLink";
|
||||
@@ -556,6 +557,10 @@ const EpisodeTitlePage = () => {
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||
<TrailerButton
|
||||
trailerItem={item.data.RemoteTrailers}
|
||||
disabled={item.data.RemoteTrailers?.length === 0}
|
||||
/>
|
||||
<LikeButton
|
||||
itemName={item.data.Name}
|
||||
itemId={item.data.Id}
|
||||
|
||||
@@ -41,6 +41,7 @@ import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||
import LikeButton from "../../components/buttons/likeButton";
|
||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||
import PlayButton from "../../components/buttons/playButton";
|
||||
import TrailerButton from "../../components/buttons/trailerButton";
|
||||
import ShowMoreText from "../../components/showMoreText";
|
||||
import TextLink from "../../components/textLink";
|
||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||
@@ -586,6 +587,10 @@ const ItemDetail = () => {
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||
<TrailerButton
|
||||
trailerItem={item.data.RemoteTrailers}
|
||||
disabled={item.data.RemoteTrailers?.length === 0}
|
||||
/>
|
||||
<LikeButton
|
||||
itemName={item.data.Name}
|
||||
itemId={item.data.Id}
|
||||
|
||||
@@ -932,6 +932,7 @@ const VideoPlayer = () => {
|
||||
};
|
||||
|
||||
const handleExitPlayer = () => {
|
||||
appWindow.setFullscreen(false);
|
||||
navigate(-1);
|
||||
usePlaybackStore.setState(usePlaybackStore.getInitialState());
|
||||
};
|
||||
|
||||
@@ -46,9 +46,11 @@ import "./series.module.scss";
|
||||
|
||||
import { Link } from "react-router-dom";
|
||||
import { NavLink } from "react-router-dom";
|
||||
|
||||
import LikeButton from "../../components/buttons/likeButton";
|
||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||
import PlayButton from "../../components/buttons/playButton";
|
||||
import TrailerButton from "../../components/buttons/trailerButton";
|
||||
import ShowMoreText from "../../components/showMoreText";
|
||||
import { SeasonSelectorSkeleton } from "../../components/skeleton/seasonSelector";
|
||||
import TextLink from "../../components/textLink";
|
||||
@@ -477,6 +479,10 @@ const SeriesTitlePage = () => {
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||
<TrailerButton
|
||||
trailerItem={item.data.RemoteTrailers}
|
||||
disabled={item.data.RemoteTrailers?.length === 0}
|
||||
/>
|
||||
<LikeButton
|
||||
itemName={item.data.Name}
|
||||
itemId={item.data.Id}
|
||||
|
||||
Reference in new issue
Block a user