feat(web): Add new icons to itemDetail page
This commit is contained in:
21 files changed
+182
-83
No files matched your search
@@ -46,6 +46,8 @@ import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
import "./album.module.scss";
|
||||
|
||||
import IconLink from "../../components/iconLink";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -358,14 +360,7 @@ const MusicAlbumTitlePage = () => {
|
||||
}}
|
||||
>
|
||||
{item.data.ExternalUrls.map((url) => (
|
||||
<Link
|
||||
key={url.Url}
|
||||
target="_blank"
|
||||
to={url.Url}
|
||||
className="item-detail-link"
|
||||
>
|
||||
<Typography>{url.Name}</Typography>
|
||||
</Link>
|
||||
<IconLink url={url.Url} name={url.Name} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,6 +37,8 @@ import { useApi } from "../../utils/store/api";
|
||||
import { setBackdrop, useBackdropStore } from "../../utils/store/backdrop";
|
||||
import "./artist.module.scss";
|
||||
|
||||
import IconLink from "../../components/iconLink";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -306,14 +308,7 @@ const ArtistTitlePage = () => {
|
||||
}}
|
||||
>
|
||||
{item.data.ExternalUrls.map((url) => (
|
||||
<Link
|
||||
key={url.Url}
|
||||
target="_blank"
|
||||
to={url.Url}
|
||||
className="item-detail-link"
|
||||
>
|
||||
<Typography>{url.Name}</Typography>
|
||||
</Link>
|
||||
<IconLink url={url.Url} name={url.Name} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -40,6 +40,9 @@ import PlayButton from "../../components/buttons/playButton";
|
||||
|
||||
import meshBg from "../../assets/herobg.png";
|
||||
import "./boxset.module.scss";
|
||||
|
||||
import IconLink from "../../components/iconLink";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -411,14 +414,7 @@ const BoxSetTitlePage = () => {
|
||||
}}
|
||||
>
|
||||
{item.data.ExternalUrls.map((url) => (
|
||||
<Link
|
||||
key={url.Url}
|
||||
target="_blank"
|
||||
to={url.Url}
|
||||
className="item-detail-link"
|
||||
>
|
||||
<Typography>{url.Name}</Typography>
|
||||
</Link>
|
||||
<IconLink url={url.Url} name={url.Name} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -46,6 +46,9 @@ import { useApi } from "../../utils/store/api";
|
||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
import "./episode.module.scss";
|
||||
|
||||
import dolbyIcon from "../../assets/icons/dolby.svg";
|
||||
import IconLink from "../../components/iconLink";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -218,10 +221,10 @@ const EpisodeTitlePage = () => {
|
||||
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("ddp") ||
|
||||
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("digital+")
|
||||
) {
|
||||
return "Dolby Digital+";
|
||||
return "Digital+";
|
||||
}
|
||||
if (audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("dd")) {
|
||||
return "Dolby Digital";
|
||||
return "Digital";
|
||||
}
|
||||
return "";
|
||||
};
|
||||
@@ -406,6 +409,13 @@ const EpisodeTitlePage = () => {
|
||||
variant="filled"
|
||||
label={
|
||||
<Typography variant="caption" fontWeight={600}>
|
||||
<img
|
||||
alt="Dolby"
|
||||
src={dolbyIcon}
|
||||
style={{
|
||||
height: "1.6em",
|
||||
}}
|
||||
/>
|
||||
{atmosLabel()}
|
||||
</Typography>
|
||||
}
|
||||
@@ -742,14 +752,7 @@ const EpisodeTitlePage = () => {
|
||||
}}
|
||||
>
|
||||
{item.data.ExternalUrls.map((url) => (
|
||||
<Link
|
||||
key={url.Url}
|
||||
target="_blank"
|
||||
to={url.Url}
|
||||
className="item-detail-link"
|
||||
>
|
||||
<Typography>{url.Name}</Typography>
|
||||
</Link>
|
||||
<IconLink url={url.Url} name={url.Name} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+34
-23
@@ -50,6 +50,11 @@ import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
|
||||
import ItemSkeleton from "../../components/skeleton/item";
|
||||
|
||||
import dolbyAtmosIcon from "../../assets/icons/dolby-atmos.svg";
|
||||
import dolbyIcon from "../../assets/icons/dolby.svg";
|
||||
|
||||
import IconLink from "../../components/iconLink";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -218,15 +223,15 @@ const ItemDetail = () => {
|
||||
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("2160p") ||
|
||||
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("4k")
|
||||
) {
|
||||
return <span className="material-symbols-rounded">4k</span>;
|
||||
return <span className="material-symbols-rounded fill">4k</span>;
|
||||
}
|
||||
if (
|
||||
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("1080p") ||
|
||||
videoTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("hd")
|
||||
) {
|
||||
return <span className="material-symbols-rounded">full_hd</span>;
|
||||
return <span className="material-symbols-rounded fill">full_hd</span>;
|
||||
}
|
||||
return <span className="material-symbols-rounded">hd</span>;
|
||||
return <span className="material-symbols-rounded fill">hd</span>;
|
||||
};
|
||||
|
||||
const atmosLabel = () => {
|
||||
@@ -246,10 +251,10 @@ const ItemDetail = () => {
|
||||
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("ddp") ||
|
||||
audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("digital+")
|
||||
) {
|
||||
return "Dolby Digital+";
|
||||
return "Digital+";
|
||||
}
|
||||
if (audioTracks[0]?.DisplayTitle.toLocaleLowerCase().includes("dd")) {
|
||||
return "Dolby Digital";
|
||||
return "Digital";
|
||||
}
|
||||
return "";
|
||||
};
|
||||
@@ -359,13 +364,14 @@ const ItemDetail = () => {
|
||||
)}
|
||||
</div>
|
||||
<div className="item-hero-detail flex flex-column">
|
||||
{Object.keys(item.data.ImageTags).includes("Logo") ? (
|
||||
{item.data.ImageTags?.Logo ? (
|
||||
<img
|
||||
alt={item.data.Name}
|
||||
src={api.getItemImageUrl(item.data.Id, "Logo", {
|
||||
quality: 90,
|
||||
fillWidth: 592,
|
||||
fillHeight: 592,
|
||||
tag: item.data.ImageTags.Logo,
|
||||
})}
|
||||
onLoad={(e) => {
|
||||
e.currentTarget.style.opacity = 1;
|
||||
@@ -424,7 +430,23 @@ const ItemDetail = () => {
|
||||
<Chip
|
||||
variant="filled"
|
||||
label={
|
||||
<Typography variant="caption" fontWeight={600}>
|
||||
<Typography
|
||||
variant="caption"
|
||||
fontWeight={600}
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
gap: "0.5em",
|
||||
}}
|
||||
>
|
||||
<img
|
||||
alt="Dolby"
|
||||
src={dolbyIcon}
|
||||
style={{
|
||||
height: "1.6em",
|
||||
}}
|
||||
/>
|
||||
{atmosLabel()}
|
||||
</Typography>
|
||||
}
|
||||
@@ -447,8 +469,8 @@ const ItemDetail = () => {
|
||||
// >
|
||||
// CC
|
||||
// </Typography>
|
||||
<span className="material-symbols-rounded">
|
||||
closed_caption
|
||||
<span className="material-symbols-rounded fill">
|
||||
subtitles
|
||||
</span>
|
||||
}
|
||||
sx={{
|
||||
@@ -483,12 +505,10 @@ const ItemDetail = () => {
|
||||
className="hero-carousel-info-rating"
|
||||
>
|
||||
<div
|
||||
className="material-symbols-rounded "
|
||||
className="material-symbols-rounded fill"
|
||||
style={{
|
||||
// fontSize: "2.2em",
|
||||
color: yellow[400],
|
||||
fontVariationSettings:
|
||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||
}}
|
||||
>
|
||||
star
|
||||
@@ -513,12 +533,10 @@ const ItemDetail = () => {
|
||||
className="hero-carousel-info-rating"
|
||||
>
|
||||
<div
|
||||
className="material-symbols-rounded "
|
||||
className="material-symbols-rounded fill"
|
||||
style={{
|
||||
color:
|
||||
item.data.CriticRating > 50 ? green[400] : red[400],
|
||||
fontVariationSettings:
|
||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||
}}
|
||||
>
|
||||
{item.data.CriticRating > 50 ? "thumb_up" : "thumb_down"}
|
||||
@@ -769,14 +787,7 @@ const ItemDetail = () => {
|
||||
}}
|
||||
>
|
||||
{item.data.ExternalUrls.map((url) => (
|
||||
<Link
|
||||
key={url.Url}
|
||||
target="_blank"
|
||||
to={url.Url}
|
||||
className="item-detail-link"
|
||||
>
|
||||
<Typography>{url.Name}</Typography>
|
||||
</Link>
|
||||
<IconLink url={url.Url} name={url.Name} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -65,21 +65,21 @@
|
||||
z-index: -1;
|
||||
mask-image: linear-gradient(to top, transparent, black);
|
||||
-webkit-mask-image: linear-gradient(
|
||||
to top,
|
||||
transparent,
|
||||
black
|
||||
to top,
|
||||
transparent,
|
||||
black
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.item-detail {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 5px 35%;
|
||||
justify-items: center;
|
||||
align-items: start;
|
||||
gap: 1em;
|
||||
|
||||
|
||||
&-cast {
|
||||
&-container {
|
||||
display: flex;
|
||||
@@ -135,3 +135,16 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Global item-detail
|
||||
.item-detail-link{
|
||||
&:hover > img{
|
||||
filter: grayscale(0);
|
||||
}
|
||||
& > img {
|
||||
width: 2.5em;
|
||||
aspect-ratio: 1;
|
||||
filter: grayscale(1);
|
||||
transition: filter $transition-time-default;
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,8 @@ import meshBg from "../../assets/herobg.png";
|
||||
import ShowMoreText from "../../components/showMoreText";
|
||||
import "./person.module.scss";
|
||||
|
||||
import IconLink from "../../components/iconLink";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -356,14 +358,7 @@ const PersonTitlePage = () => {
|
||||
}}
|
||||
>
|
||||
{item.data.ExternalUrls.map((url) => (
|
||||
<Link
|
||||
key={url.Url}
|
||||
target="_blank"
|
||||
to={url.Url}
|
||||
className="item-detail-link"
|
||||
>
|
||||
<Typography>{url.Name}</Typography>
|
||||
</Link>
|
||||
<IconLink url={url.Url} name={url.Name} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -55,6 +55,9 @@ import TextLink from "../../components/textLink";
|
||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
|
||||
import IconLink from "../../components/iconLink";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -598,14 +601,7 @@ const SeriesTitlePage = () => {
|
||||
}}
|
||||
>
|
||||
{item.data.ExternalUrls.map((url) => (
|
||||
<Link
|
||||
key={url.Url}
|
||||
target="_blank"
|
||||
to={url.Url}
|
||||
className="item-detail-link"
|
||||
>
|
||||
<Typography>{url.Name}</Typography>
|
||||
</Link>
|
||||
<IconLink url={url.Url} name={url.Name} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user