require auth to log in (lock screen), remove auth-on-logout, remove welcome card from multicoin dashboard, relocate login buttons to root welcome page
- login('multi') no longer silently loads seed from keychain — shows locked screen with Touch ID/password
- Removed welcome card from EvmDashboard (multicoin route), root / handles account selection
- Root welcome page buttons call w.login() before navigating to respective routes
- Monero welcome page buttons also call w.login() before navigating
- logout now simply calls w.logout() + navigate('/') with no auth required
- Removed tab-bar logout buttons; logout moved to wallet card alongside refresh/settings/stop
This commit is contained in:
@@ -84,32 +84,7 @@
|
|||||||
|
|
||||||
{#if !w.ready}
|
{#if !w.ready}
|
||||||
<div class="mx-auto mt-16 max-w-md text-center text-muted-foreground text-sm">Loading...</div>
|
<div class="mx-auto mt-16 max-w-md text-center text-muted-foreground text-sm">Loading...</div>
|
||||||
{:else if !w.accountType}
|
{:else if !w.vaultExists}
|
||||||
<div class="mx-auto mt-24 max-w-sm">
|
|
||||||
<Card>
|
|
||||||
<CardHeader class="text-center">
|
|
||||||
<CardTitle>Welcome</CardTitle>
|
|
||||||
<CardDescription>Choose an account type to get started</CardDescription>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
<div class="flex flex-col gap-3">
|
|
||||||
<Button
|
|
||||||
onclick={() => w.login('multi')}
|
|
||||||
class="w-full">
|
|
||||||
Multi Coins (ETH / BSC / Polygon)
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
onclick={() => navigate('/monero')}
|
|
||||||
variant="outline"
|
|
||||||
class="w-full">
|
|
||||||
Monero
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
{:else if w.accountType === 'multi'}
|
|
||||||
{#if !w.vaultExists}
|
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle>Import Wallet</CardTitle>
|
<CardTitle>Import Wallet</CardTitle>
|
||||||
@@ -192,11 +167,6 @@
|
|||||||
{net.name}
|
{net.name}
|
||||||
</button>
|
</button>
|
||||||
{/each}
|
{/each}
|
||||||
<button
|
|
||||||
class="cursor-pointer rounded-md px-2.5 py-1 text-xs font-medium transition-colors bg-muted text-muted-foreground hover:bg-muted/80"
|
|
||||||
onclick={() => w.logout()}>
|
|
||||||
Logout
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Card>
|
<Card>
|
||||||
@@ -291,8 +261,8 @@
|
|||||||
<Button variant="outline" onclick={() => navigate('/settings')}>
|
<Button variant="outline" onclick={() => navigate('/settings')}>
|
||||||
<SettingsIcon size={16} />
|
<SettingsIcon size={16} />
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="outline" onclick={() => w.lock()}>
|
<Button variant="outline" onclick={() => { w.logout(); navigate('/') }}>
|
||||||
Lock
|
Logout
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
@@ -417,4 +387,3 @@
|
|||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
|
||||||
|
|||||||
@@ -132,9 +132,6 @@ export const Wallet = () => {
|
|||||||
const login = async (type: AccountType) => {
|
const login = async (type: AccountType) => {
|
||||||
accountType = type
|
accountType = type
|
||||||
if (type === 'multi') {
|
if (type === 'multi') {
|
||||||
if (!seed && vaultExists) {
|
|
||||||
await loadSeed()
|
|
||||||
}
|
|
||||||
if (seed) await switchNetwork(network)
|
if (seed) await switchNetwork(network)
|
||||||
} else if (type === 'monero') {
|
} else if (type === 'monero') {
|
||||||
if (moneroInstalled && !moneroRunning) {
|
if (moneroInstalled && !moneroRunning) {
|
||||||
|
|||||||
@@ -33,12 +33,12 @@
|
|||||||
<CardContent>
|
<CardContent>
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col gap-3">
|
||||||
<Button
|
<Button
|
||||||
onclick={() => navigate('/multicoin')}
|
onclick={async () => { await w.login('multi'); navigate('/multicoin') }}
|
||||||
class="w-full">
|
class="w-full">
|
||||||
Multi Coins (ETH / BSC / Polygon)
|
Multi Coins (ETH / BSC / Polygon)
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
onclick={() => navigate('/monero')}
|
onclick={async () => { await w.login('monero'); navigate('/monero') }}
|
||||||
variant="outline"
|
variant="outline"
|
||||||
class="w-full">
|
class="w-full">
|
||||||
Monero
|
Monero
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<CardContent>
|
<CardContent>
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col gap-3">
|
||||||
<Button
|
<Button
|
||||||
onclick={() => navigate('/multicoin')}
|
onclick={async () => { await w.login('multi'); navigate('/multicoin') }}
|
||||||
variant="outline"
|
variant="outline"
|
||||||
class="w-full">
|
class="w-full">
|
||||||
Multi Coins (ETH / BSC / Polygon)
|
Multi Coins (ETH / BSC / Polygon)
|
||||||
@@ -67,11 +67,6 @@
|
|||||||
class="cursor-pointer rounded-md px-2.5 py-1 text-xs font-medium transition-colors bg-primary text-primary-foreground">
|
class="cursor-pointer rounded-md px-2.5 py-1 text-xs font-medium transition-colors bg-primary text-primary-foreground">
|
||||||
Monero
|
Monero
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
class="cursor-pointer rounded-md px-2.5 py-1 text-xs font-medium transition-colors bg-muted text-muted-foreground hover:bg-muted/80"
|
|
||||||
onclick={() => w.logout()}>
|
|
||||||
Logout
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if w.moneroDownloading}
|
{#if w.moneroDownloading}
|
||||||
@@ -214,6 +209,9 @@
|
|||||||
<Button variant="outline" onclick={() => w.moneroStop()}>
|
<Button variant="outline" onclick={() => w.moneroStop()}>
|
||||||
Stop
|
Stop
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button variant="outline" onclick={() => { w.logout(); navigate('/') }}>
|
||||||
|
Logout
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
Reference in New Issue
Block a user