on master help sign in
ActivateCode: hide ticket input if it's implied
3962f38Liam Fitzgerald
src/views/Activate/ActivateCode.js+20−16
@@ -157,7 +157,7 @@ export default function ActivateCode() {
157 </Grid.Item>
157 </Grid.Item>
158 <Grid.Item full as={P} className="mb2">
158 <Grid.Item full as={P} className="mb2">
159 Someone has invited you to claim your Urbit identity and join the
159 Someone has invited you to claim your Urbit identity and join the
160− network. Enter your activation code to continue.
160+ network. {!impliedTicket && 'Enter your activation code to continue.'}
161 </Grid.Item>
161 </Grid.Item>
162 <BridgeForm
162 <BridgeForm
163 validate={validate}
163 validate={validate}
@@ -166,21 +166,25 @@ export default function ActivateCode() {
166 initialValues={initialValues}>
166 initialValues={initialValues}>
167 {({ validating, values, submitting, handleSubmit }) => (
167 {({ validating, values, submitting, handleSubmit }) => (
168 <>
168 <>
169+ {!impliedTicket && (
170+ <>
169− <Grid.Item
171+ <Grid.Item
170− full
172+ full
171− as={TicketInput}
173+ as={TicketInput}
172− type={values.showTicket ? 'text' : 'password'}
174+ type={values.showTicket ? 'text' : 'password'}
173− name="ticket"
175+ name="ticket"
174− label="Activation Code"
176+ label="Activation Code"
175− disabled={!activationAllowed}
177+ disabled={!activationAllowed}
176− />
178+ />
177−
179+
178− <Grid.Item
180+ <Grid.Item
179− full
181+ full
180− as={CheckboxInput}
182+ as={CheckboxInput}
181− name="showTicket"
183+ name="showTicket"
182− label="Show"
184+ label="Show"
183− />
185+ />
186+ </>
187+ )}
184
188
185 <Grid.Item full as={FormError} />
189 <Grid.Item full as={FormError} />
186
190