Skip to content

Commit

Permalink
feat: kickoff implicit account creation flow (#7815)
Browse files Browse the repository at this point in the history
* feat: add account to routes

* feat: add to analytics featureflag

* fix: update naming

* 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

---------

Co-authored-by: Begoña Álvarez de la Cruz <[email protected]>
  • Loading branch information
evavirseda and begonaalvarezd authored Jan 10, 2024
1 parent da4c6aa commit c7bc757
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 44 deletions.
3 changes: 1 addition & 2 deletions packages/desktop/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import { getLocalisedMenuItems } from './lib/helpers'
import { NotificationManager, Transition } from '@ui'
import { TitleBar, Popup } from '@components'
import { Dashboard, LoginRouter, Settings, Splash } from '@views'
import { Dashboard, LoginRouter, Settings, Splash, OnboardingRouterView } from '@views'
import {
getAppRouter,
getRouterForAppContext,
Expand All @@ -41,7 +41,6 @@
} from '@desktop/routers'
import { downloadNextNftInQueue, nftDownloadQueue } from '@core/nfts'
import features from '@features/features'
import { OnboardingRouterView } from '@views/onboarding'
appStage.set(AppStage[process.env.STAGE.toUpperCase()] ?? AppStage.ALPHA)
Expand Down
49 changes: 9 additions & 40 deletions packages/desktop/views/dashboard/wallet/Wallet.svelte
Original file line number Diff line number Diff line change
@@ -1,44 +1,13 @@
<script lang="ts">
import { AssetList, Overflow, Pane, ReceiveAddressButton } from '@ui'
import { AccountSummary, AccountActivity, SendButton } from '@components'
import { selectedWalletAssets } from '@core/wallet'
import { selectedWallet } from '@core/wallet/stores'
import features from '@features/features'
import { WalletMainView } from './views'
const hasAccount: boolean = false
</script>

{#if $selectedWallet}
<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"
>
{#key $selectedWallet?.index}
<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>
{#if features?.wallet?.activityHistory?.enabled}
<AccountActivity />
{/if}
</Pane>
</div>
{/key}
</wallet-container>
{#if hasAccount}
<WalletMainView />
{:else}
<div class="flex w-full h-full p-12">
<h1>IMPLICIT ACCOUNT</h1>
</div>
{/if}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<script lang="ts">
import { AssetList, Overflow, Pane, ReceiveAddressButton } from '@ui'
import { AccountSummary, AccountActivity, SendButton } from '@components'
import { selectedWalletAssets } from '@core/wallet'
import { selectedWallet } from '@core/wallet/stores'
import features from '@features/features'
</script>

{#if $selectedWallet}
<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"
>
{#key $selectedWallet?.index}
<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>
{#if features?.wallet?.activityHistory?.enabled}
<AccountActivity />
{/if}
</Pane>
</div>
{/key}
</wallet-container>
{/if}
1 change: 1 addition & 0 deletions packages/desktop/views/dashboard/wallet/views/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as WalletMainView } from './WalletMainView.svelte'
1 change: 1 addition & 0 deletions packages/desktop/views/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export { default as Splash } from './Splash.svelte'
export * from './dashboard'
export * from './login'
export * from './update-stronghold'
export * from './onboarding'
2 changes: 0 additions & 2 deletions packages/shared/lib/core/router/routers/app-router.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { get, writable } from 'svelte/store'

import { profiles } from '@core/profile'

import { Router } from '../classes'
import { AppRoute, LoginRoute } from '../enums'
import { IRouterEvent } from '../interfaces'
Expand Down

0 comments on commit c7bc757

Please sign in to comment.