@@ -3,7 +3,7 @@ import { Just } from 'folktale/maybe';
3import cn from 'classnames';
3import cn from 'classnames';
4import * as azimuth from 'azimuth-js';
4import * as azimuth from 'azimuth-js';
5import * as kg from 'urbit-key-generation/dist/index';
5import * as kg from 'urbit-key-generation/dist/index';
6−import { Grid, CheckboxInput } from 'indigo-react';
6+import { Grid, CheckboxInput, Flex, ToggleInput } from 'indigo-react';
7import { FORM_ERROR } from 'final-form';
7import { FORM_ERROR } from 'final-form';
9import { useNetwork } from 'store/network';
9import { useNetwork } from 'store/network';
@@ -135,6 +135,8 @@ export default function Ticket({ className, goHome }) {
135 point: impliedPoint || '',
135 point: impliedPoint || '',
136 usePasshrase: false,
136 usePasshrase: false,
137 useShards: false,
137 useShards: false,
139 [impliedPoint]
141 [impliedPoint]
@@ -146,7 +148,7 @@ export default function Ticket({ className, goHome }) {
146 onSubmit={onSubmit}
148 onSubmit={onSubmit}
147 afterSubmit={goHome}
149 afterSubmit={goHome}
148 initialValues={initialValues}>
150 initialValues={initialValues}>
149− {({ handleSubmit, submitting }) => (
151+ {({ handleSubmit, values, submitting }) => (
151 <Grid.Item full as={PointInput} name="point" />
153 <Grid.Item full as={PointInput} name="point" />
@@ -156,15 +158,36 @@ export default function Ticket({ className, goHome }) {
156 as={TicketInput}
158 as={TicketInput}
157 name="ticket"
159 name="ticket"
158 label="Master Ticket"
160 label="Master Ticket"
161+ type={values.showTicket ? 'text' : 'password'}
160 </Condition>
163 </Condition>
162 <Condition when="useShards" is={true}>
165 <Condition when="useShards" is={true}>
163− <Grid.Item full as={TicketInput} name="shard1" label="Shard 1" />
168+ as={TicketInput}
171+ type={values.showTicket ? 'text' : 'password'}
164− <Grid.Item full as={TicketInput} name="shard2" label="Shard 2" />
175+ as={TicketInput}
178+ type={values.showTicket ? 'text' : 'password'}
165− <Grid.Item full as={TicketInput} name="shard3" label="Shard 3" />
182+ as={TicketInput}
185+ type={values.showTicket ? 'text' : 'password'}
166 </Condition>
187 </Condition>
189+ <Grid.Item full as={CheckboxInput} name="showTicket" label="Show" />
168 <Condition when="usePassphrase" is={true}>
191 <Condition when="usePassphrase" is={true}>
169 <Grid.Item
192 <Grid.Item
@@ -174,19 +197,6 @@ export default function Ticket({ className, goHome }) {
175 </Condition>
198 </Condition>
180− name="usePassphrase"
190 <Grid.Item full as={FormError} />
200 <Grid.Item full as={FormError} />
192 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
202 <Grid.Item full as={SubmitButton} handleSubmit={handleSubmit}>
@@ -198,6 +208,29 @@ export default function Ticket({ className, goHome }) {
198 : 'Continue'
208 : 'Continue'
200 </Grid.Item>
210 </Grid.Item>
212+ <Grid.Item full as={Flex} justify="between">
219+ <Condition when="useAdvanced" is={true}>
220+ <Flex.Item as={Flex}>
223+ name="usePassphrase"
203 </BridgeForm>
236 </BridgeForm>