fix: resolve dashboard bugs (percentage precision, wrong title, and reading resumption)

This commit is contained in:
2026-05-10 19:09:14 +02:00
parent 2950e15633
commit 65e188b323
12 changed files with 33 additions and 12 deletions
@@ -6,6 +6,8 @@
@inject IQuizStateService QuizState
@inject IFocusModeService FocusMode
@inject IJSRuntime JS
@inject NavigationManager NavManager
@inject IReaderNavigationService NavService
<PageTitle>Nexus E-Reader</PageTitle>
<div class="home-reader-container">
@@ -26,6 +28,16 @@
QuizState.OnQuizRequested += HandleQuizRequestedAsync;
FocusMode.OnFocusModeChanged += HandleUpdate;
await FocusMode.InitializeAsync();
// Handle deep-linking to a specific chapter
var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
if (Microsoft.AspNetCore.WebUtilities.QueryHelpers.ParseQuery(uri.Query).TryGetValue("chapter", out var chapterValue))
{
if (int.TryParse(chapterValue, out var chapterIndex))
{
await NavService.GoToChapter(chapterIndex);
}
}
}
protected override async Task OnAfterRenderAsync(bool firstRender)