fe5ff81c98
## Overview This PR completes the architectural consolidation of the web project and stabilizes the Identity-based authentication flow for the NexusReader application. It also refines the UI aesthetic for the Book Ingestion Modal as requested in #33. ## Key Changes - **Project Consolidation**: Fully merged `NexusReader.Web.New` into `NexusReader.Web`. This includes updating all namespace references, VS Code launch/task configurations, and CI/CD (`Dockerfile`). - **Identity Stabilization**: - Implemented `IIdentityService` on the server using `SignInManager<NexusUser>` and `UserManager<NexusUser>`. - Fixed registration logic to include mandatory fields (`SubscriptionPlanId`, `TenantId`). - Updated `Login.razor` to force a page reload on successful login, ensuring proper synchronization of authentication cookies between SignalR and the browser. - **UI/UX Refinement**: - Updated `BookIngestionModal` styling to follow the **Nexus Neon** design system. - Added premium button styles with hover effects and glows. - Improved modal layout and interaction feedback (shimmer effects, spinner colors). - **Cleanup**: Removed obsolete interfaces and constants that were superseded by newer Application layer implementations. ## Verification - Successfully built the solution: `dotnet build NexusReader.slnx --no-restore` - Verified project structure and file moves. - Validated server-side authentication logic. Fixes #33 --------- Co-authored-by: Marek Jasiński <jasins.marek@gmail.com> Reviewed-on: #40 Co-authored-by: Antigravity <antigravity@google.com> Co-committed-by: Antigravity <antigravity@google.com>
77 lines
2.6 KiB
Plaintext
77 lines
2.6 KiB
Plaintext
@using NexusReader.UI.Shared.Services
|
|
@using NexusReader.Application.Abstractions.Services
|
|
@inject IFocusModeService FocusMode
|
|
@inject IKnowledgeService KnowledgeService
|
|
@inject IIdentityService IdentityService
|
|
@inject NavigationManager NavigationManager
|
|
|
|
<aside class="intelligence-toolbar">
|
|
<div class="toolbar-top">
|
|
<button class="toolbar-item" @onclick='() => NavigationManager.NavigateTo("/")' title="Back to Dashboard">
|
|
<NexusIcon Name="arrow-left" Size="20" />
|
|
</button>
|
|
<button class="toolbar-item active" title="Chat">
|
|
<NexusIcon Name="message-square" Size="20" />
|
|
</button>
|
|
</div>
|
|
|
|
<div class="toolbar-middle">
|
|
<button class="toolbar-item" title="Settings">
|
|
<NexusIcon Name="settings" Size="20" />
|
|
</button>
|
|
<button class="toolbar-item" title="Bookmarks">
|
|
<NexusIcon Name="bookmark" Size="20" />
|
|
</button>
|
|
<button class="toolbar-item" title="Search">
|
|
<NexusIcon Name="search" Size="20" />
|
|
</button>
|
|
<button class="toolbar-item danger" @onclick="HandleClearCache" title="Clear AI Cache">
|
|
<NexusIcon Name="trash" Size="20" />
|
|
</button>
|
|
</div>
|
|
|
|
<div class="toolbar-bottom">
|
|
<button class="toolbar-item @(FocusMode.IsFocusModeActive ? "active focus-active" : "")"
|
|
@onclick="FocusMode.ToggleAsync" title="Focus Mode (F)">
|
|
<NexusIcon Name="target" Size="20" />
|
|
</button>
|
|
<button class="toolbar-item" @onclick='() => NavigationManager.NavigateTo("/")' title="Global Hub">
|
|
<NexusIcon Name="layers" Size="20" />
|
|
</button>
|
|
<button class="toolbar-item logout-item" @onclick="HandleLogout" title="Exit">
|
|
<NexusIcon Name="log-out" Size="20" />
|
|
</button>
|
|
</div>
|
|
</aside>
|
|
|
|
@code {
|
|
protected override void OnInitialized()
|
|
{
|
|
FocusMode.OnFocusModeChanged += HandleUpdate;
|
|
}
|
|
|
|
private async Task HandleClearCache()
|
|
{
|
|
// For now, a simple console log confirm or just do it
|
|
Console.WriteLine("[IntelligenceToolbar] Requesting cache clear...");
|
|
var result = await KnowledgeService.ClearCacheAsync();
|
|
if (result.IsSuccess)
|
|
{
|
|
Console.WriteLine("[IntelligenceToolbar] Cache cleared successfully!");
|
|
}
|
|
}
|
|
|
|
private async Task HandleLogout()
|
|
{
|
|
await IdentityService.LogoutAsync();
|
|
NavigationManager.NavigateTo("/account/logout-form", true);
|
|
}
|
|
|
|
private Task HandleUpdate() => InvokeAsync(StateHasChanged);
|
|
|
|
public void Dispose()
|
|
{
|
|
FocusMode.OnFocusModeChanged -= HandleUpdate;
|
|
}
|
|
}
|