-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: prepare UI for implicit account creation STEP 1 (#7878)
* feat: add account to routes * feat: add to analytics featureflag * feat: add account view and multistep * style: refinements * feat: rename files and add locale * feat: prepare UI step 1 * feat: add locales * fix: update naming * feat: update naming and improve code * fix: move comment * fix import * fix: remove accountImplicit route and add to wallet tab * fix: improve naming * Update packages/desktop/views/dashboard/wallet/Wallet.svelte * Update packages/desktop/views/dashboard/wallet/Wallet.svelte * fix: add router * minor fixes * ix: add missing dots * fix: colors * fix: remove unnecessary function * fix: rename files * fix: move if/else and key block * fix: reset after finish --------- Co-authored-by: Begoña Álvarez de la Cruz <balvarez@boxfish.studio>
- Loading branch information
1 parent
f49e87e
commit d9236db
Showing
4 changed files
with
121 additions
and
34 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
76 changes: 75 additions & 1 deletion
76
...iews/dashboard/wallet/views/implicit-account-creation-multistep/OneTimeDepositView.svelte
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 |
---|---|---|
@@ -1 +1,75 @@ | ||
<h1>OneTimeDeposit</h1> | ||
<script lang="ts"> | ||
import { Button, FontWeight, Text, TextType } from 'shared/components' | ||
import { localize } from '@core/i18n' | ||
import { setClipboard } from '@core/utils' | ||
let isVisibleAddress: boolean = false | ||
// TODO: Replace with proper address | ||
const DUMMY_ADDRESS = 'iota1q9f0mlq8yxpx2nck8a0slxnzr4ef2ek8f5gqxlzd0wasgp73utryjtzcp98' | ||
function showAddress() { | ||
isVisibleAddress = true | ||
} | ||
function onCopyClick(): void { | ||
setClipboard(DUMMY_ADDRESS) | ||
} | ||
</script> | ||
|
||
<step-content class="flex flex-col items-center justify-between h-full pt-12"> | ||
<div class="flex flex-col text-center px-4 space-y-4 max-w-md"> | ||
<div class="flex items-center justify-center"> | ||
<img | ||
src="assets/illustrations/implicit-account/show-one-time-address.svg" | ||
alt={localize('views.implicit-account-creation.steps.step1.title')} | ||
/> | ||
</div> | ||
<Text type={TextType.h3} fontWeight={FontWeight.semibold} | ||
>{localize('views.implicit-account-creation.steps.step1.view.title')}</Text | ||
> | ||
<Text type={TextType.h5} fontSize="15" color="blue-700" darkColor="blue-700" fontWeight={FontWeight.semibold} | ||
>{localize('views.implicit-account-creation.steps.step1.view.subtitle')}</Text | ||
> | ||
<Text type={TextType.h5} fontWeight={FontWeight.normal} color="gray-700" darkColor="gray-500" | ||
>{localize('views.implicit-account-creation.steps.step1.view.body')}</Text | ||
> | ||
</div> | ||
{#if !isVisibleAddress} | ||
<div class="pb-5"> | ||
<div class="flex flex-row items-center space-x-24 bg-yellow-200 rounded-lg px-6 py-7 max-w-lg"> | ||
<Text type={TextType.h4} fontWeight={FontWeight.medium} color="yellow-900" darkColor="yellow-900" | ||
>{localize('views.implicit-account-creation.steps.step1.view.hiddenAddress.description')}</Text | ||
> | ||
<Button onClick={showAddress} classes="shrink-0" | ||
>{localize('views.implicit-account-creation.steps.step1.view.hiddenAddress.action')}</Button | ||
> | ||
</div> | ||
</div> | ||
{:else} | ||
<div class="flex flex-col justify-center items-center space-y-3"> | ||
<div | ||
class="flex flex-row items-center space-x-20 bg-gray-100 dark:bg-gray-800 rounded-lg px-6 py-4 max-w-lg" | ||
> | ||
<div class="flex flex-col space-y-1"> | ||
<Text type={TextType.h5} fontWeight={FontWeight.normal} darkColor="gray-400" | ||
>{localize('views.implicit-account-creation.steps.step1.view.oneTimeAddress.title')}</Text | ||
> | ||
<Text | ||
type={TextType.pre} | ||
fontSize="14" | ||
fontWeight={FontWeight.medium} | ||
color="gray-900" | ||
darkColor="white">{DUMMY_ADDRESS}</Text | ||
> | ||
</div> | ||
<Button outline onClick={onCopyClick} classes="shrink-0" | ||
>{localize('views.implicit-account-creation.steps.step1.view.oneTimeAddress.action')}</Button | ||
> | ||
</div> | ||
<Text type={TextType.h5} fontWeight={FontWeight.normal} color="red-600" darkColor="red-600" | ||
>{localize('views.implicit-account-creation.steps.step1.view.oneTimeAddress.tip')}</Text | ||
> | ||
</div> | ||
{/if} | ||
</step-content> |
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