Add a warning that UCs are retired now
I'm keeping it in the same place for now rather than trying to fold it into Styles, because I think that's net-less-confusing (since Styles work pretty differently, e.g. different color requirements), and certainly less work either way lol!
This commit is contained in:
parent
3a76dbb368
commit
e2d8a86f79
1 changed files with 51 additions and 9 deletions
|
@ -23,7 +23,7 @@ import {
|
||||||
useToast,
|
useToast,
|
||||||
useToken,
|
useToken,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import { ChevronDownIcon } from "@chakra-ui/icons";
|
import { ChevronDownIcon, WarningTwoIcon } from "@chakra-ui/icons";
|
||||||
import { loadable } from "../util";
|
import { loadable } from "../util";
|
||||||
|
|
||||||
import { petAppearanceFragment } from "../components/useOutfitAppearance";
|
import { petAppearanceFragment } from "../components/useOutfitAppearance";
|
||||||
|
@ -422,14 +422,22 @@ function PosePickerTable({ poseInfos, onChange, initialFocusRef }) {
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{poseInfos.unconverted.isAvailable && (
|
{poseInfos.unconverted.isAvailable && (
|
||||||
|
<Flex
|
||||||
|
align="center"
|
||||||
|
justify="center"
|
||||||
|
gap="1"
|
||||||
|
marginTop="2"
|
||||||
|
marginBottom="2"
|
||||||
|
>
|
||||||
<PoseOption
|
<PoseOption
|
||||||
poseInfo={poseInfos.unconverted}
|
poseInfo={poseInfos.unconverted}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
inputRef={poseInfos.unconverted.isSelected && initialFocusRef}
|
inputRef={poseInfos.unconverted.isSelected && initialFocusRef}
|
||||||
size="sm"
|
size="sm"
|
||||||
label="Unconverted"
|
label="Retired UC"
|
||||||
marginTop="2"
|
|
||||||
/>
|
/>
|
||||||
|
<RetiredUCWarning isSelected={poseInfos.unconverted.isSelected} />
|
||||||
|
</Flex>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@ -622,6 +630,40 @@ function PosePickerEmptyExplanation() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function RetiredUCWarning({ isSelected }) {
|
||||||
|
return (
|
||||||
|
<Popover placement="right" trigger="hover">
|
||||||
|
<PopoverTrigger>
|
||||||
|
<Box
|
||||||
|
as="button"
|
||||||
|
tabIndex="0"
|
||||||
|
aria-label="Warning"
|
||||||
|
cursor="help"
|
||||||
|
lineHeight="1"
|
||||||
|
opacity={isSelected ? "1" : "0.75"}
|
||||||
|
transform={isSelected ? "scale(1)" : "scale(0.8)"}
|
||||||
|
color={isSelected ? "yellow.500" : "inherit"}
|
||||||
|
transition="all 0.2s"
|
||||||
|
padding="1"
|
||||||
|
>
|
||||||
|
<WarningTwoIcon />
|
||||||
|
</Box>
|
||||||
|
</PopoverTrigger>
|
||||||
|
<PopoverContent
|
||||||
|
background="blackAlpha.800"
|
||||||
|
borderColor="blackAlpha.900"
|
||||||
|
color="white"
|
||||||
|
padding="2"
|
||||||
|
fontSize="sm"
|
||||||
|
>
|
||||||
|
"Unconverted" pets are no longer available on Neopets.com, and have been
|
||||||
|
replaced with the very similar Styles feature. We're just keeping this
|
||||||
|
as an archive!
|
||||||
|
</PopoverContent>
|
||||||
|
</Popover>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function StyleSelect({
|
function StyleSelect({
|
||||||
selectedStyleId,
|
selectedStyleId,
|
||||||
altStyles,
|
altStyles,
|
||||||
|
@ -897,7 +939,7 @@ function getLabel(pose) {
|
||||||
} else if (pose === "SICK_MASC" || pose === "SICK_FEM") {
|
} else if (pose === "SICK_MASC" || pose === "SICK_FEM") {
|
||||||
return "Sick";
|
return "Sick";
|
||||||
} else if (pose === "UNCONVERTED") {
|
} else if (pose === "UNCONVERTED") {
|
||||||
return "Classic UC";
|
return "Retired UC";
|
||||||
} else {
|
} else {
|
||||||
return "Default";
|
return "Default";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue