style: Improve titlePage styling
This commit is contained in:
34 files changed
+905
-885
No files matched your search
@@ -36,6 +36,7 @@ import {
|
||||
} from "../../utils/store/playback";
|
||||
|
||||
import type { SxProps } from "@mui/material";
|
||||
import { getRuntimeCompact } from "../../utils/date/time";
|
||||
|
||||
const PlayButton = ({
|
||||
item,
|
||||
@@ -294,56 +295,85 @@ const PlayButton = ({
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Button
|
||||
className={className}
|
||||
variant="contained"
|
||||
onClick={handleClick}
|
||||
startIcon={
|
||||
<div
|
||||
className="material-symbols-rounded fill"
|
||||
style={{
|
||||
fontSize: "2em",
|
||||
}}
|
||||
>
|
||||
play_arrow
|
||||
</div>
|
||||
}
|
||||
{...buttonProps}
|
||||
sx={{
|
||||
<div
|
||||
className="play-button"
|
||||
style={{
|
||||
width: "auto",
|
||||
position: "relative",
|
||||
overflow: "hidden",
|
||||
}}
|
||||
size={size}
|
||||
>
|
||||
<LinearProgress
|
||||
variant="determinate"
|
||||
value={
|
||||
100 > itemUserData.PlayedPercentage > 0
|
||||
? itemUserData.PlayedPercentage
|
||||
: 0
|
||||
<Button
|
||||
className={className ?? "play-button"}
|
||||
variant="contained"
|
||||
onClick={handleClick}
|
||||
startIcon={
|
||||
<div
|
||||
className="material-symbols-rounded fill"
|
||||
style={{
|
||||
zIndex: 1,
|
||||
fontSize: "2em",
|
||||
}}
|
||||
>
|
||||
play_arrow
|
||||
</div>
|
||||
}
|
||||
{...buttonProps}
|
||||
sx={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
height: "100%",
|
||||
background: "transparent",
|
||||
opacity: 0.2,
|
||||
zIndex: 0,
|
||||
position: "relative",
|
||||
overflow: "hidden",
|
||||
}}
|
||||
color="white"
|
||||
/>
|
||||
{itemUserData.PlaybackPositionTicks > 0
|
||||
? "Continue Watching"
|
||||
: item?.Type === "MusicAlbum" ||
|
||||
item?.Type === "Audio" ||
|
||||
item?.Type === "AudioBook" ||
|
||||
item?.Type === "Playlist"
|
||||
? "Play Now"
|
||||
: "Watch Now"}
|
||||
</Button>
|
||||
size={size}
|
||||
>
|
||||
{itemUserData.PlaybackPositionTicks > 0
|
||||
? "Continue Watching"
|
||||
: item?.Type === "MusicAlbum" ||
|
||||
item?.Type === "Audio" ||
|
||||
item?.Type === "AudioBook" ||
|
||||
item?.Type === "Playlist" ||
|
||||
audio
|
||||
? "Play Now"
|
||||
: "Watch Now"}
|
||||
<LinearProgress
|
||||
variant="determinate"
|
||||
value={
|
||||
100 > itemUserData.PlayedPercentage > 0
|
||||
? itemUserData.PlayedPercentage
|
||||
: 0
|
||||
}
|
||||
sx={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
height: "100%",
|
||||
background: "transparent",
|
||||
opacity: 0.2,
|
||||
zIndex: 0,
|
||||
mixBlendMode: "difference",
|
||||
}}
|
||||
color="white"
|
||||
/>
|
||||
</Button>
|
||||
{itemUserData.PlaybackPositionTicks > 0 && (
|
||||
<Typography
|
||||
sx={{
|
||||
opacity: 0.8,
|
||||
position: "absolute",
|
||||
bottom: "-1.8em",
|
||||
left: "50%",
|
||||
transform: "translate(-50%)",
|
||||
}}
|
||||
variant="caption"
|
||||
>
|
||||
{getRuntimeCompact(
|
||||
item.RunTimeTicks - itemUserData.PlaybackPositionTicks,
|
||||
)}{" "}
|
||||
left
|
||||
</Typography>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
border: 1px solid rgb(255 255 255 / 0.2);
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
&-header{
|
||||
background: rgb(0 0 0 / 0.4) !important;
|
||||
|
||||
@@ -205,6 +205,8 @@ const AudioPlayer = () => {
|
||||
setShowWaveform(false);
|
||||
};
|
||||
|
||||
console.log(tracks);
|
||||
|
||||
const info = useMemo(
|
||||
() => (
|
||||
<div
|
||||
@@ -221,10 +223,10 @@ const AudioPlayer = () => {
|
||||
>
|
||||
<div className="audio-player-image-container">
|
||||
<img
|
||||
alt={tracks[currentTrack].Name}
|
||||
alt={tracks[currentTrack]?.Name}
|
||||
className="audio-player-image"
|
||||
src={api.getItemImageUrl(
|
||||
Object.keys(tracks[currentTrack].ImageTags).length === 0
|
||||
Object.keys(tracks[currentTrack]?.ImageTags).length === 0
|
||||
? item.AlbumId
|
||||
: item.Id,
|
||||
"Primary",
|
||||
|
||||
@@ -10,12 +10,7 @@ const ItemSkeleton = () => {
|
||||
width: "100vw",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
className="item-hero flex flex-row"
|
||||
style={{
|
||||
height: "50vh",
|
||||
}}
|
||||
>
|
||||
<div className="item-hero">
|
||||
<div
|
||||
className="item-hero-image-container"
|
||||
style={{
|
||||
@@ -89,7 +84,6 @@ const ItemSkeleton = () => {
|
||||
<Skeleton variant="text" />
|
||||
<Skeleton variant="text" />
|
||||
</div>
|
||||
<Divider flexItem orientation="vertical" />
|
||||
<div
|
||||
style={{
|
||||
width: "100%",
|
||||
|
||||
Reference in new issue
Block a user