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
@@ -39,7 +39,7 @@ fn main() {
|
|||||||
.build(),
|
.build(),
|
||||||
)
|
)
|
||||||
.plugin(tauri_plugin_store::Builder::default().build())
|
.plugin(tauri_plugin_store::Builder::default().build())
|
||||||
.plugin(tauri_plugin_window_state::Builder::default().build())
|
// .plugin(tauri_plugin_window_state::Builder::default().build())
|
||||||
.run(context)
|
.run(context)
|
||||||
.expect("error while running JellyPlayer");
|
.expect("error while running JellyPlayer");
|
||||||
}
|
}
|
||||||
@@ -108,8 +108,7 @@
|
|||||||
"title": "JellyPlayer",
|
"title": "JellyPlayer",
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"center": true,
|
"center": true,
|
||||||
"label": "main",
|
"label": "main"
|
||||||
"decorations": false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 LikeButton from "../../components/buttons/likeButton";
|
||||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||||
import PlayButton from "../../components/buttons/playButton";
|
import PlayButton from "../../components/buttons/playButton";
|
||||||
|
import TrailerButton from "../../components/buttons/trailerButton";
|
||||||
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
import ShowMoreText from "../../components/showMoreText";
|
import ShowMoreText from "../../components/showMoreText";
|
||||||
import TextLink from "../../components/textLink";
|
import TextLink from "../../components/textLink";
|
||||||
@@ -556,6 +557,10 @@ const EpisodeTitlePage = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-row" style={{ gap: "1em" }}>
|
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||||
|
<TrailerButton
|
||||||
|
trailerItem={item.data.RemoteTrailers}
|
||||||
|
disabled={item.data.RemoteTrailers?.length === 0}
|
||||||
|
/>
|
||||||
<LikeButton
|
<LikeButton
|
||||||
itemName={item.data.Name}
|
itemName={item.data.Name}
|
||||||
itemId={item.data.Id}
|
itemId={item.data.Id}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
|||||||
import LikeButton from "../../components/buttons/likeButton";
|
import LikeButton from "../../components/buttons/likeButton";
|
||||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||||
import PlayButton from "../../components/buttons/playButton";
|
import PlayButton from "../../components/buttons/playButton";
|
||||||
|
import TrailerButton from "../../components/buttons/trailerButton";
|
||||||
import ShowMoreText from "../../components/showMoreText";
|
import ShowMoreText from "../../components/showMoreText";
|
||||||
import TextLink from "../../components/textLink";
|
import TextLink from "../../components/textLink";
|
||||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||||
@@ -586,6 +587,10 @@ const ItemDetail = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-row" style={{ gap: "1em" }}>
|
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||||
|
<TrailerButton
|
||||||
|
trailerItem={item.data.RemoteTrailers}
|
||||||
|
disabled={item.data.RemoteTrailers?.length === 0}
|
||||||
|
/>
|
||||||
<LikeButton
|
<LikeButton
|
||||||
itemName={item.data.Name}
|
itemName={item.data.Name}
|
||||||
itemId={item.data.Id}
|
itemId={item.data.Id}
|
||||||
|
|||||||
@@ -932,6 +932,7 @@ const VideoPlayer = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleExitPlayer = () => {
|
const handleExitPlayer = () => {
|
||||||
|
appWindow.setFullscreen(false);
|
||||||
navigate(-1);
|
navigate(-1);
|
||||||
usePlaybackStore.setState(usePlaybackStore.getInitialState());
|
usePlaybackStore.setState(usePlaybackStore.getInitialState());
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -46,9 +46,11 @@ import "./series.module.scss";
|
|||||||
|
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { NavLink } from "react-router-dom";
|
import { NavLink } from "react-router-dom";
|
||||||
|
|
||||||
import LikeButton from "../../components/buttons/likeButton";
|
import LikeButton from "../../components/buttons/likeButton";
|
||||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||||
import PlayButton from "../../components/buttons/playButton";
|
import PlayButton from "../../components/buttons/playButton";
|
||||||
|
import TrailerButton from "../../components/buttons/trailerButton";
|
||||||
import ShowMoreText from "../../components/showMoreText";
|
import ShowMoreText from "../../components/showMoreText";
|
||||||
import { SeasonSelectorSkeleton } from "../../components/skeleton/seasonSelector";
|
import { SeasonSelectorSkeleton } from "../../components/skeleton/seasonSelector";
|
||||||
import TextLink from "../../components/textLink";
|
import TextLink from "../../components/textLink";
|
||||||
@@ -477,6 +479,10 @@ const SeriesTitlePage = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-row" style={{ gap: "1em" }}>
|
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||||
|
<TrailerButton
|
||||||
|
trailerItem={item.data.RemoteTrailers}
|
||||||
|
disabled={item.data.RemoteTrailers?.length === 0}
|
||||||
|
/>
|
||||||
<LikeButton
|
<LikeButton
|
||||||
itemName={item.data.Name}
|
itemName={item.data.Name}
|
||||||
itemId={item.data.Id}
|
itemId={item.data.Id}
|
||||||
|
|||||||
Reference in new issue
Block a user