Files
Nexus.Reader/src/NexusReader.Domain/Entities/NexusUser.cs
T
Antigravity 9291bde531 style: complete Light Sepia theme overrides for user dashboard (#78)
Resolves #79

This Pull Request completes the visual implementation of the premium **"Warm Paper / Soft Sepia"** light theme across all user dashboard sub-modules and components.

### 🎨 Styling Refactoring & Light Sepia Layout
We refactored isolated component styles (`.razor.css`) to ensure proper contrast, remove hardcoded dark tokens, and fix text visibility under the `.theme-light` environment:

1. **Dashboard & Sidebar Layouts:**
   * **MainHubLayout.razor.css** & **Dashboard.razor.css**: Replaced hardcoded dark backgrounds with `var(--bg-surface)` and `var(--bg-base)`. Overrode user name brackets, progress bar elements, active quiz cards, graph nodes, and buttons.
2. **Catalog & Library Pages:**
   * **Catalog.razor.css** & **MyBooks.razor.css**: Adjusted cover hover actions, overlay transparency, and progress tracks. Fixed course tile background gradients to use a warm, elegant `#e4e1d9` layer and `var(--text-main)` code text.
3. **Profile & Settings Views:**
   * **Profile.razor.css** & **Settings.razor.css**: Overrode token usage progress tracks, page title gradient transparency, section descriptions, and diagnostic button styling.
4. **Concepts Dashboard & Interactive Widgets:**
   * **ConceptsDashboard.razor.css** & **ConceptsMap.razor.css**: Transitioned node headers, unlocked/locked badges, warning blocks, and term pills to semantic colors. Removed neon glow animations for locked nodes.
5. **Intelligence Workspace & AI Responses:**
   * **Intelligence.razor.css** & **AiResponseRenderer.razor.css**: Refactored empty state welcome messages, placeholder styles, input fields, and robot avatar borders. Refined the linear-gradient mask fade effect to blend correctly into the light sepia surface environment rather than dropping into dark transparent channels.
6. **Dashboard Sidebar Widgets:**
   * **CurrentReadingWidget.razor.css** & **ContextualRecommendationsWidget.razor.css**: Replaced hardcoded `#1a1a1e` card containers and light text colors with semantic variables (`var(--bg-surface)`, `var(--border)`, `var(--text-main)`, and `var(--text-muted)`).

### 🛠️ Blazor CSS Isolation Compiler Compliance
* Avoided the use of `:global(.theme-light)` selector overrides within isolated CSS rules because they are unsupported by Blazor's CSS isolation compiler and cause the compiled stylesheet to ignore them.
* Replaced them with the correct standard selector format `.theme-light .some-class` which properly compiles to `.theme-light .some-class[b-xxxx]`, applying correct theme styles recursively to child scoped markup.

### 🧪 Verification
* Checked that the solution builds cleanly with 0 compiler errors: `dotnet build NexusReader.slnx --no-restore`
* Ran all unit tests successfully: `dotnet test NexusReader.slnx --no-restore`

---------

Co-authored-by: Marek Jasiński <jasins.marek@gmail.com>
Reviewed-on: #78
Co-authored-by: Antigravity <antigravity@google.com>
Co-committed-by: Antigravity <antigravity@google.com>
2026-06-07 16:56:36 +00:00

75 lines
2.0 KiB
C#

using Microsoft.AspNetCore.Identity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using NexusReader.Domain.Enums;
namespace NexusReader.Domain.Entities;
public class NexusUser : IdentityUser
{
/// <summary>
/// User's display name or full name.
/// </summary>
[MaxLength(100)]
public string? DisplayName { get; set; }
/// <summary>
/// Total AI tokens available for the user (depends on subscription).
/// </summary>
public int AITokenLimit { get; set; }
/// <summary>
/// AI tokens consumed by the user in the current billing period.
/// </summary>
public int AITokensUsed { get; set; }
/// <summary>
/// Date when the user last performed an AI-related action.
/// </summary>
public DateTime? LastAiActionDate { get; set; }
/// <summary>
/// Multi-tenant identifier.
/// </summary>
[Required]
[MaxLength(128)]
public string TenantId { get; set; } = "global";
/// <summary>
/// Foreign key for the current subscription plan.
/// </summary>
[Required]
public int SubscriptionPlanId { get; set; }
/// <summary>
/// Navigation property for the current subscription plan.
/// </summary>
public SubscriptionPlan? SubscriptionPlan { get; set; }
/// <summary>
/// Collection of e-books owned by the user.
/// </summary>
public ICollection<Ebook> Ebooks { get; set; } = new List<Ebook>();
/// <summary>
/// Collection of quiz results completed by the user.
/// </summary>
public ICollection<QuizResult> QuizResults { get; set; } = new List<QuizResult>();
/// <summary>
/// ID of the last page read by the user.
/// </summary>
[MaxLength(255)]
public string? LastReadPageId { get; set; }
/// <summary>
/// Last read timestamp.
/// </summary>
public DateTime? LastReadAt { get; set; }
/// <summary>
/// User's visual theme preference.
/// </summary>
public ThemeMode ThemePreference { get; set; } = ThemeMode.System;
}