feat: implement dynamic knowledge graph updates and state management services
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
@using NexusReader.UI.Shared.Components.Organisms
|
||||
@inject IPlatformService PlatformService
|
||||
@inject IFocusModeService FocusMode
|
||||
@inject IQuizStateService QuizService
|
||||
@implements IDisposable
|
||||
|
||||
<div class="app-container @_platformClass @(FocusMode.IsFocusModeActive ? "focus-mode-active" : "")">
|
||||
<div class="reader-pane">
|
||||
@@ -18,7 +20,7 @@
|
||||
<IntelligenceToolbar />
|
||||
<div class="intelligence-content">
|
||||
<div class="intelligence-header">
|
||||
<NexusIcon Name="robot" Size="20" Class="neon-glow" />
|
||||
<NexusIcon Name="robot" Size="20" Class="@($"neon-glow {(QuizService.HasNewQuiz ? "quiz-available" : "")}")" />
|
||||
<span>Asystent AI i Interaktywna Mapa</span>
|
||||
<button class="close-btn">×</button>
|
||||
</div>
|
||||
@@ -43,6 +45,7 @@
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
FocusMode.OnFocusModeChanged += StateHasChanged;
|
||||
QuizService.OnQuizUpdated += StateHasChanged;
|
||||
|
||||
var context = PlatformService.GetDeviceContext();
|
||||
if (context.IsSuccess)
|
||||
@@ -58,6 +61,7 @@
|
||||
public void Dispose()
|
||||
{
|
||||
FocusMode.OnFocusModeChanged -= StateHasChanged;
|
||||
QuizService.OnQuizUpdated -= StateHasChanged;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user