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

feat: prepare UI for implicit account creation STEP 1 #7878

Merged
merged 34 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e7fb493
feat: add account to routes
evavirseda Dec 22, 2023
f59e885
feat: add to analytics featureflag
evavirseda Dec 22, 2023
d8318ab
feat: add account view and multistep
evavirseda Dec 26, 2023
ba6be6b
style: refinements
evavirseda Dec 26, 2023
9de9319
feat: rename files and add locale
evavirseda Dec 26, 2023
8cea0a2
feat: prepare UI step 1
evavirseda Dec 27, 2023
4a19372
feat: add locales
evavirseda Dec 27, 2023
0705215
fix: update naming
evavirseda Jan 4, 2024
30a4b81
Merge branch 'feat/add-implicit-account-router' into feat/add-implici…
evavirseda Jan 4, 2024
af504e3
feat: update naming and improve code
evavirseda Jan 4, 2024
8bf649d
Merge branch 'feat/add-implicit-account-creation-view' into feat/prep…
evavirseda Jan 4, 2024
45b0306
fix: move comment
evavirseda Jan 4, 2024
3390dc2
fix import
evavirseda Jan 4, 2024
ab1919a
Merge branch 'feat/add-implicit-account-router' into feat/add-implici…
evavirseda Jan 4, 2024
bf15770
fix: remove accountImplicit route and add to wallet tab
evavirseda Jan 10, 2024
2d7273d
fix: improve naming
evavirseda Jan 10, 2024
45a5ce6
Merge branch 'feat/add-implicit-account-router' into feat/add-implici…
evavirseda Jan 10, 2024
607a1ac
Merge branch 'feat/add-implicit-account-creation-view' into feat/prep…
evavirseda Jan 10, 2024
784014c
Update packages/desktop/views/dashboard/wallet/Wallet.svelte
begonaalvarezd Jan 10, 2024
3f0ab3c
Update packages/desktop/views/dashboard/wallet/Wallet.svelte
begonaalvarezd Jan 10, 2024
1347de2
Merge branch 'feat/add-implicit-account-router' into feat/add-implici…
evavirseda Jan 10, 2024
669d0af
Merge branch 'develop-iota2.0' into feat/add-implicit-account-creatio…
evavirseda Jan 11, 2024
1970e9e
fix: add router
evavirseda Jan 11, 2024
057c9f5
minor fixes
evavirseda Jan 11, 2024
ff906bf
Merge branch 'feat/add-implicit-account-creation-view' into feat/prep…
evavirseda Jan 11, 2024
e0e09c8
ix: add missing dots
evavirseda Jan 11, 2024
cba69c8
Merge branch 'feat/add-implicit-account-creation-view' into feat/prep…
evavirseda Jan 11, 2024
84a527c
fix: colors
evavirseda Jan 11, 2024
1016b96
fix: remove unnecessary function
evavirseda Jan 11, 2024
3171553
fix: rename files
evavirseda Jan 11, 2024
f4a90f5
fix: move if/else and key block
evavirseda Jan 11, 2024
9272310
fix: reset after finish
evavirseda Jan 11, 2024
e71e891
Merge branch 'feat/add-implicit-account-creation-view' into feat/prep…
evavirseda Jan 11, 2024
98e9435
Merge branch 'develop-iota2.0' into feat/prepare-ui-step1
evavirseda Jan 11, 2024
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
15 changes: 5 additions & 10 deletions packages/desktop/views/dashboard/wallet/Wallet.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,10 @@

{#if $selectedWallet}
{#key $selectedWallet?.index}
<wallet-container
class="w-full h-full flex flex-nowrap p-8 relative flex-1
bg-gray-50 dark:bg-gray-900 justify-center items-center"
>
{#if hasAccount}
<WalletView />
{:else}
<ImplicitAccountCreationView />
{/if}
</wallet-container>
{#if hasAccount}
<WalletView />
{:else}
<ImplicitAccountCreationView />
{/if}
{/key}
{/if}
48 changes: 26 additions & 22 deletions packages/desktop/views/dashboard/wallet/views/WalletView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,34 @@
import features from '@features/features'
</script>

<div class="h-full grid grid-cols-3 gap-x-4 min-h-0 min-w-0 max-w-7xl">
<div class="flex flex-col space-y-4">
<Pane overflow={Overflow.Visible}>
{#if features?.wallet?.accountSummary?.enabled}
<AccountSummary />
<wallet-container
class="w-full h-full flex flex-nowrap p-8 relative flex-1 bg-gray-50 dark:bg-gray-900 justify-center items-center"
>
<div class="h-full grid grid-cols-3 gap-x-4 min-h-0 min-w-0 max-w-7xl">
<div class="flex flex-col space-y-4">
<Pane overflow={Overflow.Visible}>
{#if features?.wallet?.accountSummary?.enabled}
<AccountSummary />
{/if}
</Pane>
<Pane>
<div class="flex flex-col space-y-6">
{#if features?.wallet?.sendAndReceive?.enabled}
<SendButton />
<ReceiveAddressButton />
{/if}
</div>
</Pane>
</div>
<Pane>
{#if features?.wallet?.assets?.enabled}
<AssetList assets={$selectedWalletAssets} />
{/if}
</Pane>
<Pane>
<div class="flex flex-col space-y-6">
{#if features?.wallet?.sendAndReceive?.enabled}
<SendButton />
<ReceiveAddressButton />
{/if}
</div>
{#if features?.wallet?.activityHistory?.enabled}
<AccountActivity />
{/if}
</Pane>
</div>
<Pane>
{#if features?.wallet?.assets?.enabled}
<AssetList assets={$selectedWalletAssets} />
{/if}
</Pane>
<Pane>
{#if features?.wallet?.activityHistory?.enabled}
<AccountActivity />
{/if}
</Pane>
</div>
</wallet-container>
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>
16 changes: 15 additions & 1 deletion packages/shared/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,21 @@
"steps" : {
"step1": {
"title": "Step 1",
"body": "One-time deposit"
"body": "One-time deposit",
"view": {
"title": "One-time deposit",
"subtitle": "3$ - 15$ recommended",
"body": "Send enough funds to using your one-time address so the account can be generated with low waiting times. The funds are your to use after the account has been created.",
"hiddenAddress": {
"description": "Do not send funds to the address more than once",
"action": "Show Address"
},
"oneTimeAddress": {
"title": "One-time Address",
"action": "Copy",
"tip": "Do not sent fund to this address more than once"
}
}
},
"step2": {
"title": "Step 2",
Expand Down
Loading