feat(lint): use biome instead
This commit is contained in:
1 parent
dca2a31639
commit
8d68eb546d
129 files changed
+2352
-4366
No files matched your search
@@ -10,8 +10,8 @@ import { Blurhash } from "react-blurhash";
|
||||
|
||||
import { MdiAccountTie } from "../icons/mdiAccountTie";
|
||||
|
||||
import "./card.module.scss";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import "./card.module.scss";
|
||||
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
@@ -70,9 +70,7 @@ export const ActorCard = ({
|
||||
/>
|
||||
)}
|
||||
<div className="card-image-icon-container">
|
||||
<div className="material-symbols-rounded">
|
||||
person
|
||||
</div>
|
||||
<div className="material-symbols-rounded">person</div>
|
||||
</div>
|
||||
<img
|
||||
src={api.getItemImageUrl(
|
||||
|
||||
@@ -3,17 +3,17 @@ import React from "react";
|
||||
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
import { getTypeIcon } from "../utils/iconsCollection";
|
||||
import "./card.module.scss";
|
||||
|
||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import LikeButton from "../buttons/likeButton";
|
||||
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||
import PlayButton from "../buttons/playButton";
|
||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import ErrorBoundary from "../errorBoundary";
|
||||
|
||||
const cardImageAspectRatios = {
|
||||
@@ -73,9 +73,9 @@ export const Card = ({
|
||||
const defaultOnClick = () => {
|
||||
if (availableSpecialRoutes.includes(item.Type)) {
|
||||
navigate(`/${item.Type.toLocaleLowerCase()}/${item.Id}`);
|
||||
} else if (!!item.Role || item.Type == BaseItemKind.Person) {
|
||||
} else if (!!item.Role || item.Type === BaseItemKind.Person) {
|
||||
navigate(`/person/${item.Id}`);
|
||||
} else if (item.Type == BaseItemKind.MusicArtist) {
|
||||
} else if (item.Type === BaseItemKind.MusicArtist) {
|
||||
navigate(`/artist/${item.Id}`);
|
||||
} else {
|
||||
navigate(`/item/${item.Id}`);
|
||||
@@ -85,7 +85,6 @@ export const Card = ({
|
||||
<div
|
||||
className="card"
|
||||
elevation={0}
|
||||
tabIndex={0}
|
||||
onClick={onClick ? onClick : defaultOnClick}
|
||||
>
|
||||
<div
|
||||
@@ -94,23 +93,19 @@ export const Card = ({
|
||||
aspectRatio: cardImageAspectRatios[cardType],
|
||||
}}
|
||||
>
|
||||
<ErrorBoundary fallback={<></>}>
|
||||
<ErrorBoundary fallback=>
|
||||
<div
|
||||
className="card-indicator check"
|
||||
style={{
|
||||
opacity: item.UserData?.Played ? 1 : 0,
|
||||
}}
|
||||
>
|
||||
<div className="material-symbols-rounded">
|
||||
done
|
||||
</div>
|
||||
<div className="material-symbols-rounded">done</div>
|
||||
</div>
|
||||
<div
|
||||
className={`card-indicator text`}
|
||||
className={"card-indicator text"}
|
||||
style={{
|
||||
opacity: item.UserData?.UnplayedItemCount
|
||||
? 1
|
||||
: 0,
|
||||
opacity: item.UserData?.UnplayedItemCount ? 1 : 0,
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
@@ -133,29 +128,24 @@ export const Card = ({
|
||||
/>
|
||||
)} */}
|
||||
<div className="card-image-icon-container">
|
||||
{overrideIcon
|
||||
? getTypeIcon(overrideIcon)
|
||||
: getTypeIcon(item.Type)}
|
||||
{overrideIcon ? getTypeIcon(overrideIcon) : getTypeIcon(item.Type)}
|
||||
</div>
|
||||
<img
|
||||
src={
|
||||
overrideIcon == "User"
|
||||
overrideIcon === "User"
|
||||
? `${api.basePath}/Users/${item.Id}/Images/Primary`
|
||||
: api.getItemImageUrl(
|
||||
seriesId
|
||||
? item.SeriesId
|
||||
: item.AlbumId
|
||||
? item.AlbumId
|
||||
: item.Id,
|
||||
? item.AlbumId
|
||||
: item.Id,
|
||||
imageType,
|
||||
{
|
||||
quality: 90,
|
||||
fillHeight: 226,
|
||||
fillWidth: Math.floor(
|
||||
226 /
|
||||
cardImageAspectRatios[
|
||||
cardType
|
||||
],
|
||||
226 / cardImageAspectRatios[cardType],
|
||||
),
|
||||
},
|
||||
)
|
||||
@@ -185,16 +175,12 @@ export const Card = ({
|
||||
}}
|
||||
iconOnly
|
||||
audio={
|
||||
item.Type ==
|
||||
BaseItemKind.MusicAlbum ||
|
||||
item.Type == BaseItemKind.Audio ||
|
||||
item.Type ==
|
||||
BaseItemKind.AudioBook ||
|
||||
item.Type == BaseItemKind.Playlist
|
||||
}
|
||||
playlistItem={
|
||||
item.Type == BaseItemKind.Playlist
|
||||
item.Type === BaseItemKind.MusicAlbum ||
|
||||
item.Type === BaseItemKind.Audio ||
|
||||
item.Type === BaseItemKind.AudioBook ||
|
||||
item.Type === BaseItemKind.Playlist
|
||||
}
|
||||
playlistItem={item.Type === BaseItemKind.Playlist}
|
||||
playlistItemId={item.Id}
|
||||
/>
|
||||
<LikeButton
|
||||
|
||||
@@ -4,20 +4,20 @@ import { useNavigate } from "react-router-dom";
|
||||
|
||||
import MuiCard from "@mui/material/Card";
|
||||
import CardActionArea from "@mui/material/CardActionArea";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
import { Blurhash } from "react-blurhash";
|
||||
|
||||
import "./card.module.scss";
|
||||
import { MdiCheck } from "../icons/mdiCheck";
|
||||
import "./card.module.scss";
|
||||
|
||||
import { getRuntimeCompact } from "../../utils/date/time";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import LikeButton from "../buttons/likeButton";
|
||||
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||
import PlayButton from "../buttons/playButton";
|
||||
import { MdiTelevisionClassic } from "../icons/mdiTelevisionClassic";
|
||||
import { getRuntimeCompact } from "../../utils/date/time";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
@@ -70,9 +70,7 @@ export const EpisodeCard = ({
|
||||
opacity: item.UserData?.Played ? 1 : 0,
|
||||
}}
|
||||
>
|
||||
<div className="material-symbols-rounded">
|
||||
done
|
||||
</div>
|
||||
<div className="material-symbols-rounded">done</div>
|
||||
</div>
|
||||
)}
|
||||
{!!imageBlurhash && (
|
||||
@@ -86,9 +84,7 @@ export const EpisodeCard = ({
|
||||
/>
|
||||
)}
|
||||
<div className="card-image-icon-container">
|
||||
<div className="material-symbols-rounded">
|
||||
tv_gen
|
||||
</div>
|
||||
<div className="material-symbols-rounded">tv_gen</div>
|
||||
</div>
|
||||
<img
|
||||
src={api.getItemImageUrl(item.Id, "Primary", {
|
||||
@@ -146,8 +142,7 @@ export const EpisodeCard = ({
|
||||
bottom: 0,
|
||||
zIndex: 2,
|
||||
height: "6px",
|
||||
background:
|
||||
"rgb(5 5 5 / 0.5) !important",
|
||||
background: "rgb(5 5 5 / 0.5) !important",
|
||||
backdropFilter: "blur(5px)",
|
||||
}}
|
||||
color="primary"
|
||||
|
||||
Reference in new issue
Block a user