feat: implement epub service, navigation service, and global error boundary with updated reader UI layouts
This commit is contained in:
@@ -1,6 +1,34 @@
|
||||
<Router AppAssembly="@typeof(Routes).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)" />
|
||||
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
||||
</Found>
|
||||
</Router>
|
||||
<ErrorBoundary @ref="_errorBoundary">
|
||||
<ChildContent>
|
||||
<Router AppAssembly="@typeof(Routes).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)" />
|
||||
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
||||
</Found>
|
||||
</Router>
|
||||
</ChildContent>
|
||||
<ErrorContent Context="ex">
|
||||
<div class="nexus-error-boundary">
|
||||
<div class="error-card">
|
||||
<div class="error-icon">
|
||||
<NexusIcon Name="alert-triangle" Size="48" Color="#ff4444" />
|
||||
</div>
|
||||
<h3>Nexus System Error</h3>
|
||||
<p>Wystąpił nieoczekiwany błąd podczas renderowania komponentu.</p>
|
||||
|
||||
<div class="error-details">
|
||||
<code>@ex.Message</code>
|
||||
</div>
|
||||
|
||||
<button class="retry-btn" @onclick="() => _errorBoundary?.Recover()">
|
||||
<NexusIcon Name="refresh-cw" Size="16" />
|
||||
Spróbuj ponownie
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</ErrorContent>
|
||||
</ErrorBoundary>
|
||||
|
||||
@code {
|
||||
private ErrorBoundary? _errorBoundary;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user