Only show SVG glitch message in hi-res mode
If you're not in hi-res mode, then you don't care about broken SVGs, because you wouldn't have seen them anyway! We also update the message to reference Hi-Res Mode.
This commit is contained in:
parent
bed525d3ff
commit
2375669cdf
1 changed files with 17 additions and 12 deletions
|
@ -4,6 +4,7 @@ import { WarningTwoIcon } from "@chakra-ui/icons";
|
|||
import { FaBug } from "react-icons/fa";
|
||||
import { GlitchBadgeLayout, layerUsesHTML5 } from "../components/HTML5Badge";
|
||||
import getVisibleLayers from "../../shared/getVisibleLayers";
|
||||
import { useLocalStorage } from "../util";
|
||||
|
||||
function OutfitKnownGlitchesBadge({ appearance }) {
|
||||
const glitchMessages = [];
|
||||
|
@ -99,7 +100,10 @@ function OutfitKnownGlitchesBadge({ appearance }) {
|
|||
}
|
||||
}
|
||||
|
||||
// Look for items with the OFFICIAL_SVG_IS_INCORRECT glitch.
|
||||
// Look for items with the OFFICIAL_SVG_IS_INCORRECT glitch. Only show this
|
||||
// if hi-res mode is on, because otherwise it doesn't affect the user anyway!
|
||||
const [hiResMode] = useLocalStorage("DTIHiResMode", false);
|
||||
if (hiResMode) {
|
||||
for (const item of items) {
|
||||
const itemHasOfficialSvgIsIncorrect = item.appearance.layers.some((l) =>
|
||||
(l.knownGlitches || []).includes("OFFICIAL_SVG_IS_INCORRECT")
|
||||
|
@ -108,12 +112,13 @@ function OutfitKnownGlitchesBadge({ appearance }) {
|
|||
glitchMessages.push(
|
||||
<Box key={`official-svg-is-incorrect-for-item-${item.id}`}>
|
||||
There's a glitch in the art for <i>{item.name}</i> that prevents us
|
||||
from showing the full-scale SVG version of the image. Instead, we're
|
||||
showing a PNG, which might look a bit blurry on larger screens.
|
||||
from showing the SVG image for Hi-Res Mode. Instead, we're showing a
|
||||
PNG, which might look a bit blurry on larger screens.
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Look for items with the DISPLAYS_INCORRECTLY_BUT_CAUSE_UNKNOWN glitch.
|
||||
for (const item of items) {
|
||||
|
|
Loading…
Reference in a new issue