feat(intelligence): implement Global AI Q&A screen and paywall blocker
- Implemented standard empty and active chat conversation states for the `/intelligence` page - Created interactive `AiResponseRenderer` with AOT-compliant sentence splitting and payment gateway simulation - Added scoped `LibraryStateService` to synchronize book ownership and updates across the application - Obfuscated paywalled content in DOM to prevent inspection bypass - Fixed local port connection mismatch by updating API configurations to use port 5104
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
@page "/my-books"
|
||||
@attribute [Authorize]
|
||||
@implements IDisposable
|
||||
@using NexusReader.UI.Shared.Components.Organisms
|
||||
@using NexusReader.Application.DTOs.User
|
||||
@using NexusReader.UI.Shared.Services
|
||||
@using System.Net.Http.Json
|
||||
@inject HttpClient Http
|
||||
@inject IReaderNavigationService ReaderNavigation
|
||||
@inject ILibraryStateService LibraryStateService
|
||||
|
||||
<div class="my-books-page">
|
||||
<header class="my-books-header">
|
||||
@@ -108,6 +110,11 @@
|
||||
private bool _isLoading = true;
|
||||
private List<LastReadBookDto>? _books;
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
LibraryStateService.OnBooksChanged += HandleBooksChanged;
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
@@ -116,6 +123,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleBooksChanged()
|
||||
{
|
||||
_ = InvokeAsync(LoadBooksAsync);
|
||||
}
|
||||
|
||||
private async Task LoadBooksAsync()
|
||||
{
|
||||
_isLoading = true;
|
||||
@@ -149,4 +161,9 @@
|
||||
{
|
||||
ReaderNavigation.NavigateToBook(bookId);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
LibraryStateService.OnBooksChanged -= HandleBooksChanged;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user