-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(wallet): add balance finder presentation view (#4891)
* feat: turn on feature flag * feat: fix styles in remove dialog * feat: add balance finder intro page * minor fixes * feat: disable feature in prod * feat: add intro for ledger
- Loading branch information
1 parent
0ac76d0
commit 45e6dc8
Showing
7 changed files
with
128 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
apps/wallet/src/ui/app/pages/accounts/manage/accounts-finder/AccountsFinderIntroPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { useNavigate } from 'react-router-dom'; | ||
import { Overlay } from '_components'; | ||
import { useActiveAccount } from '_hooks'; | ||
import { getKey } from '_helpers'; | ||
import { Theme, useTheme } from '@iota/core'; | ||
import { Button, ButtonType } from '@iota/apps-ui-kit'; | ||
import BalanceFinderIntroImage from '_assets/images/balance_finder_intro.svg'; | ||
import BalanceFinderIntroDarkImage from '_assets/images/balance_finder_intro_darkmode.svg'; | ||
import { isLedgerAccountSerializedUI } from '_src/background/accounts/ledgerAccount'; | ||
import { AllowedAccountSourceTypes } from '_src/ui/app/accounts-finder'; | ||
|
||
export function AccountsFinderIntroPage() { | ||
const { theme } = useTheme(); | ||
const navigate = useNavigate(); | ||
const activeAccount = useActiveAccount(); | ||
|
||
const isLedgerAccount = activeAccount && isLedgerAccountSerializedUI(activeAccount); | ||
const accountSourceId = activeAccount && getKey(activeAccount); | ||
|
||
const ledgerPath = `/accounts/manage/accounts-finder/${AllowedAccountSourceTypes.LedgerDerived}`; | ||
const accountPath = isLedgerAccount | ||
? ledgerPath | ||
: `/accounts/manage/accounts-finder/${accountSourceId}`; | ||
|
||
return ( | ||
<Overlay showModal> | ||
<div className="flex h-full flex-col items-center justify-between"> | ||
<div> | ||
{theme === Theme.Dark ? ( | ||
<BalanceFinderIntroDarkImage /> | ||
) : ( | ||
<BalanceFinderIntroImage /> | ||
)} | ||
</div> | ||
<div className="flex h-full flex-col items-center justify-between"> | ||
<div className="flex flex-col gap-y-sm p-md text-center"> | ||
<span className="text-label-lg text-neutral-40 dark:text-neutral-60"> | ||
Wallet Setup | ||
</span> | ||
<span className="text-headline-md text-neutral-10 dark:text-neutral-92"> | ||
Balance Finder | ||
</span> | ||
<span className="text-body-md text-neutral-40 dark:text-neutral-60"> | ||
Easily find and import all your accounts with balances, in one place. | ||
</span> | ||
</div> | ||
<div className="flex w-full flex-row gap-x-xs"> | ||
<Button | ||
type={ButtonType.Secondary} | ||
text="Skip" | ||
onClick={() => navigate('/')} | ||
fullWidth | ||
/> | ||
<Button | ||
type={ButtonType.Primary} | ||
text="Start" | ||
fullWidth | ||
onClick={() => navigate(accountPath)} | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</Overlay> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions
9
apps/wallet/src/ui/assets/images/balance_finder_intro_darkmode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.