Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontend: fix enable/disable lightning checkbox misalignment #3073

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions frontends/web/src/routes/lightning/activate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { useNavigate } from 'react-router-dom';
import { Header, Main } from '../../components/layout';
import { View, ViewButtons, ViewContent, ViewHeader } from '../../components/view/view';
import { MultilineMarkup, SimpleMarkup } from '../../utils/markup';
import { Button, Checkbox, Label } from '../../components/forms';
import { Button, Checkbox } from '../../components/forms';
import { PointToBitBox02 } from '../../components/icon';
import { TKeystores, getKeystores, subscribeKeystores } from '../../api/keystores';
import { unsubscribe } from '../../utils/subscriptions';
Expand Down Expand Up @@ -112,9 +112,12 @@ export const LightningActivate = () => {
tagName="p"
markup={t('lightning.activate.disclaimer.content')}
/>
<Label htmlFor="confirm">
<Checkbox id="confirm" onChange={() => setAgree(!agree)} checked={agree} />I have read the information above
</Label>
<Checkbox
id="confirm"
onChange={() => setAgree(!agree)}
checked={agree}>
I have read the information above
</Checkbox>
</ViewContent>
<ViewButtons>
<Button primary disabled={!agree} onClick={() => waitForConnect()}>
Expand Down
11 changes: 7 additions & 4 deletions frontends/web/src/routes/lightning/deactivate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { useNavigate } from 'react-router-dom';
import { Header, Main } from '../../components/layout';
import { View, ViewButtons, ViewContent } from '../../components/view/view';
import { MultilineMarkup } from '../../utils/markup';
import { Button, Checkbox, Label } from '../../components/forms';
import { Button, Checkbox } from '../../components/forms';
import { postDeactivateNode } from '../../api/lightning';
import { Status } from '../../components/status/status';
import { Spinner } from '../../components/spinner/Spinner';
Expand Down Expand Up @@ -60,9 +60,12 @@ export const LightningDeactivate = () => {
markup={`Shutting down your lightning wallet will disconnect you from the Greenlight server and you will no longer be able to use your lightning wallet to send and receive.
Funds on your lightning wallet are not affected, you can still access them again by enabling lightning in the settings and connecting the BitBox02 wallet used to make that wallet.`}
/>
<Label htmlFor="confirm">
<Checkbox id="confirm" onChange={() => setAgree(!agree)} checked={agree} />I have read the information above
</Label>
<Checkbox
id="confirm"
onChange={() => setAgree(!agree)}
checked={agree}>
I have read the information above
</Checkbox>
</ViewContent>
<ViewButtons>
<Button danger disabled={!agree} onClick={() => dectivateNode()}>
Expand Down
Loading