on master help sign in
Merge pull request #444 from urbit/lf/activate-code-inputs

ActivateCode: hide ticket input if it's implied

commit7a3cdd151bfbf6603648b56ec050fca413f80bc4 authorFang <git@fang.io> dateFri 10 Apr 2020, 11:53 (7 years ago) parent5927c5e3962f38
1 file changed+20−16
src/views/Activate/ActivateCode.js+20−16
src/views/Activate/ActivateCode.js+20−16
@@ -157,7 +157,7 @@ export default function ActivateCode() {
157157 </Grid.Item>
158158 <Grid.Item full as={P} className="mb2">
159159 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.'}
161161 </Grid.Item>
162162 <BridgeForm
163163 validate={validate}
@@ -166,21 +166,25 @@ export default function ActivateCode() {
166166 initialValues={initialValues}>
167167 {({ validating, values, submitting, handleSubmit }) => (
168168 <>
169− <Grid.Item
170− full
171− as={TicketInput}
172− type={values.showTicket ? 'text' : 'password'}
173− name="ticket"
174− label="Activation Code"
175− disabled={!activationAllowed}
176− />
177−
178− <Grid.Item
179− full
180− as={CheckboxInput}
181− name="showTicket"
182− label="Show"
183− />
169+ {!impliedTicket && (
170+ <>
171+ <Grid.Item
172+ full
173+ as={TicketInput}
174+ type={values.showTicket ? 'text' : 'password'}
175+ name="ticket"
176+ label="Activation Code"
177+ disabled={!activationAllowed}
178+ />
179+
180+ <Grid.Item
181+ full
182+ as={CheckboxInput}
183+ name="showTicket"
184+ label="Show"
185+ />
186+ </>
187+ )}
184188
185189 <Grid.Item full as={FormError} />
186190