Show the PosePicker, even if there are no standard poses labeled
This is because I'm gonna put alt styles in here too, and I figure it's reasonable to just explain what's going on.
This commit is contained in:
parent
4fff8d88f2
commit
32f5d6d4a0
1 changed files with 15 additions and 22 deletions
|
@ -139,15 +139,9 @@ function PosePicker({
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there's only one pose anyway, don't bother showing a picker!
|
const numStandardPoses = Object.values(poseInfos).filter(
|
||||||
// (Unless we're Support, in which case we want the ability to pop it open to
|
(p) => p.isAvailable && STANDARD_POSES.includes(p.pose),
|
||||||
// inspect and label the Unknown poses!)
|
|
||||||
const numAvailablePoses = Object.values(poseInfos).filter(
|
|
||||||
(p) => p.isAvailable,
|
|
||||||
).length;
|
).length;
|
||||||
if (numAvailablePoses <= 1 && !isSupportUser) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const onChange = (e) => {
|
const onChange = (e) => {
|
||||||
dispatchToOutfit({ type: "setPose", pose: e.target.value });
|
dispatchToOutfit({ type: "setPose", pose: e.target.value });
|
||||||
|
@ -218,8 +212,7 @@ function PosePicker({
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
initialFocusRef={initialFocusRef}
|
initialFocusRef={initialFocusRef}
|
||||||
/>
|
/>
|
||||||
{numAvailablePoses <= 1 && (
|
{numStandardPoses == 0 && (
|
||||||
<SupportOnly>
|
|
||||||
<Box
|
<Box
|
||||||
fontSize="xs"
|
fontSize="xs"
|
||||||
fontStyle="italic"
|
fontStyle="italic"
|
||||||
|
@ -227,11 +220,9 @@ function PosePicker({
|
||||||
opacity="0.7"
|
opacity="0.7"
|
||||||
marginTop="2"
|
marginTop="2"
|
||||||
>
|
>
|
||||||
The empty picker is hidden for most users!
|
We're still working on labeling these! For now,
|
||||||
<br />
|
we're just giving you one of the poses we have.
|
||||||
You can see it because you're a Support user.
|
|
||||||
</Box>
|
</Box>
|
||||||
</SupportOnly>
|
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@ -371,6 +362,8 @@ const GENDER_PRESENTATION_STRINGS = {
|
||||||
SICK_FEM: "Feminine",
|
SICK_FEM: "Feminine",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const STANDARD_POSES = Object.keys(EMOTION_STRINGS);
|
||||||
|
|
||||||
function PoseOption({
|
function PoseOption({
|
||||||
poseInfo,
|
poseInfo,
|
||||||
onChange,
|
onChange,
|
||||||
|
|
Loading…
Reference in a new issue