feat: new connect wallet modal - some fix after feedback
This commit is contained in:
@@ -412,9 +412,7 @@ const CustomUrlInput = ({
|
||||
return urlInputExpanded ? (
|
||||
<>
|
||||
<div className="flex justify-between mb-1.5">
|
||||
<p className="text-sm text-vega-clight-100 dark:text-vega-cdark-100">
|
||||
{t('Custom wallet location')}
|
||||
</p>
|
||||
<p className="text-sm text-secondary">{t('Custom wallet location')}</p>
|
||||
<button
|
||||
className="text-sm underline"
|
||||
onClick={() => setUrlInputExpanded(false)}
|
||||
|
||||
@@ -51,50 +51,48 @@ export function ViewConnectorForm({
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<form onSubmit={handleSubmit(onSubmit)} data-testid="view-connector-form">
|
||||
<h1 className="text-2xl uppercase mb-6 font-alpha calt">
|
||||
{t('VIEW AS VEGA USER')}
|
||||
</h1>
|
||||
<p className="mb-4">
|
||||
{t(
|
||||
'Browse from the perspective of another Vega user in read-only mode.'
|
||||
)}
|
||||
</p>
|
||||
<FormGroup label={t('Vega Pubkey')} labelFor="address">
|
||||
<Input
|
||||
{...register('address', {
|
||||
required: t('Required'),
|
||||
validate: validatePubkey,
|
||||
})}
|
||||
id="address"
|
||||
data-testid="address"
|
||||
type="text"
|
||||
/>
|
||||
{errors.address?.message && (
|
||||
<InputError intent="danger">{errors.address.message}</InputError>
|
||||
)}
|
||||
</FormGroup>
|
||||
<TradingButton
|
||||
data-testid="connect"
|
||||
intent={Intent.Info}
|
||||
type="submit"
|
||||
className="w-full"
|
||||
>
|
||||
{t('Browse network')}
|
||||
</TradingButton>
|
||||
{reset && (
|
||||
<div className="flex justify-end">
|
||||
<button
|
||||
onClick={reset}
|
||||
className="p-2 text-sm underline"
|
||||
data-testid="back-button"
|
||||
>
|
||||
<VegaIcon name={VegaIconNames.ARROW_LEFT} /> {t('Go back')}
|
||||
</button>
|
||||
</div>
|
||||
<form onSubmit={handleSubmit(onSubmit)} data-testid="view-connector-form">
|
||||
<h1 className="text-2xl uppercase mb-6 font-alpha calt">
|
||||
{t('VIEW AS VEGA USER')}
|
||||
</h1>
|
||||
<p className="mb-4">
|
||||
{t(
|
||||
'Browse from the perspective of another Vega user in read-only mode.'
|
||||
)}
|
||||
</form>
|
||||
</>
|
||||
</p>
|
||||
<FormGroup label={t('Vega Pubkey')} labelFor="address">
|
||||
<Input
|
||||
{...register('address', {
|
||||
required: t('Required'),
|
||||
validate: validatePubkey,
|
||||
})}
|
||||
id="address"
|
||||
data-testid="address"
|
||||
type="text"
|
||||
/>
|
||||
{errors.address?.message && (
|
||||
<InputError intent="danger">{errors.address.message}</InputError>
|
||||
)}
|
||||
</FormGroup>
|
||||
<TradingButton
|
||||
data-testid="connect"
|
||||
intent={Intent.Info}
|
||||
type="submit"
|
||||
className="w-full"
|
||||
>
|
||||
{t('Browse network')}
|
||||
</TradingButton>
|
||||
{reset && (
|
||||
<div className="flex justify-end">
|
||||
<button
|
||||
onClick={reset}
|
||||
className="p-2 text-sm underline"
|
||||
data-testid="back-button"
|
||||
>
|
||||
<VegaIcon name={VegaIconNames.ARROW_LEFT} /> {t('Go back')}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user