Skip to content

Commit ccf16ef

Browse files
committed
added watchlist, light theme, vault restructure
- Watchlist page for monitoring addresses without owning seed - Light theme CSS variables for all navigation/UI elements - Theme persistence on app startup - Vault unlocked state restructured: Seeds card + Manage menu card - Watchlist link in More page
1 parent 763460f commit ccf16ef

File tree

5 files changed

+571
-117
lines changed

5 files changed

+571
-117
lines changed

Components/Layout/MobileLayout.razor

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
@inject VaultService Vault
55
@inject WalletStorageService WalletStorage
66
@inject TransactionTrackerService TxTracker
7+
@inject NavigationManager Nav
8+
@inject QubicSettingsService Settings
9+
@inject IJSRuntime JS
710
@implements IDisposable
811

912
<div class="qb-app">
@@ -60,14 +63,29 @@
6063

6164
<!-- Page Content -->
6265
<main class="qb-content" id="qb-content" @onclick="CloseWalletMenu">
63-
@Body
66+
<ErrorBoundary @ref="_errorBoundary">
67+
<ChildContent>
68+
@Body
69+
</ChildContent>
70+
<ErrorContent>
71+
<div class="d-flex flex-column align-items-center justify-content-center py-5">
72+
<i class="bi bi-exclamation-triangle-fill text-warning" style="font-size:3rem"></i>
73+
<h5 class="mt-3">Something went wrong</h5>
74+
<p class="text-muted small">An error occurred while rendering this page.</p>
75+
<button class="btn btn-primary" @onclick="RecoverFromError">
76+
<i class="bi bi-arrow-clockwise me-1"></i>Reload
77+
</button>
78+
</div>
79+
</ErrorContent>
80+
</ErrorBoundary>
6481
</main>
6582

6683
<!-- Bottom Tab Bar -->
6784
<TabBar />
6885
</div>
6986

7087
@code {
88+
ErrorBoundary? _errorBoundary;
7189
bool _showWalletMenu;
7290

7391
string WalletDisplayName
@@ -95,6 +113,12 @@
95113
if (_showWalletMenu) _showWalletMenu = false;
96114
}
97115

116+
void RecoverFromError()
117+
{
118+
_errorBoundary?.Recover();
119+
Nav.NavigateTo("/", forceLoad: false);
120+
}
121+
98122
void SwitchToEntry(VaultEntry entry)
99123
{
100124
_showWalletMenu = false;
@@ -114,6 +138,16 @@
114138
Vault.OnVaultChanged += OnStateChanged;
115139
}
116140

141+
protected override async Task OnAfterRenderAsync(bool firstRender)
142+
{
143+
if (firstRender)
144+
{
145+
var saved = Settings.GetCustom<string>("theme");
146+
if (!string.IsNullOrEmpty(saved) && saved != "dark")
147+
await JS.InvokeVoidAsync("setTheme", saved);
148+
}
149+
}
150+
117151
void OnStateChanged()
118152
{
119153
InvokeAsync(StateHasChanged);

Components/Pages/More.razor

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
<span class="qb-link-chevron"><i class="bi bi-chevron-right"></i></span>
1111
</a>
1212
</li>
13+
<li>
14+
<a href="/watchlist">
15+
<i class="bi bi-eye"></i>
16+
Watchlist
17+
<span class="qb-link-chevron"><i class="bi bi-chevron-right"></i></span>
18+
</a>
19+
</li>
1320
<li>
1421
<a href="/history">
1522
<i class="bi bi-clock-history"></i>

0 commit comments

Comments
 (0)