[MIRROR] Traitor UI only shows Unlock/Failsafe Code if you have it [MDB IGNORE] (#18253)

* Traitor UI only shows Unlock/Failsafe Code if you have it (#72114)

## About The Pull Request

There are cases in which you don't have an unlock code (if the uplink is
implanted in you from the start) and you obviously don't always start
with with a failsafe code (need to buy it). So, let's only fill in this
fields in the UI should they exist.

There might be something to be said about wanting to ensure that people
remember that they can check this UI screen to find the failsafe code
should they lose it later, and I wouldn't mind changing the string to be
something like "Failsafe: None" in that case. However, I just think that
keeping it as:

```txt
Code:
Failsafe:
```

is silly and should be changed somehow.
## Why It's Good For The Game

![image](https://user-images.githubusercontent.com/34697715/208604758-d7ff3ae9-e552-4dd2-998d-81715cd06ffc.png)

Note: That white box isn't part of the UI, that's a part of the edit I
did to the screenshot in the area where the stuff... isn't? What was i
thinking

I think the UI looks a lot cleaner for those cases when you just don't
have anything.
## Changelog
🆑
qol: The Traitor's Antagonist Panel's Unlock and Failsafe entries will
only appear if there is an Unlock/Failsafe Code to display.
/🆑

* Traitor UI only shows Unlock/Failsafe Code if you have it

Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
SkyratBot
2022-12-24 21:58:48 -08:00
committed by GitHub
co-authored by san7890
parent 5c1c28cef3
commit dada99ff3f
@@ -136,9 +136,11 @@ const UplinkSection = (props, context) => {
<Stack.Item bold>
{uplink_intro}
<br />
<span style={goalstyle}>Code: {code}</span>
{code && <span style={goalstyle}>Code: {code}</span>}
<br />
<span style={badstyle}>Failsafe: {failsafe_code}</span>
{failsafe_code && (
<span style={badstyle}>Failsafe: {failsafe_code}</span>
)}
</Stack.Item>
<Stack.Divider />
<Stack.Item mt="1%">