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: kickoff implicit account creation flow #7815

Merged
merged 8 commits into from
Jan 10, 2024
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
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
Loading