feat(DataCollection) Added opt-in data collection

This commit is contained in:
2022-04-25 12:43:23 -04:00
parent 5e9ed4c2f5
commit 43d7391df2
79 changed files with 798 additions and 283 deletions
+11 -6
View File
@@ -1,12 +1,16 @@
@layout PageLayout
@inject INoteService noteService
@inherits BasePage
@inject INoteService NoteService
@implements IDisposable
@inject IDataCollectionService DataCollectionService
@page "/notes"
@if (!noteService.IsLoaded())
@if (!NoteService.IsLoaded())
{
<LoadingComponent/>
}
@@ -15,7 +19,7 @@ else
<LayoutMediumContentComponent>
<PaperComponent>
@foreach (var noteSection in noteService.NoteSectionModels)
@foreach (var noteSection in NoteService.NoteSectionModels)
{
<div class="noteSectionContainer">
<div class="noteSectionTitle">@noteSection.Name</div>
@@ -119,15 +123,16 @@ else
protected override void OnInitialized()
{
noteService.Subscribe(StateHasChanged);
base.OnInitialized();
NoteService.Subscribe(StateHasChanged);
noteService.Load();
NoteService.Load();
}
void IDisposable.Dispose()
{
noteService.Unsubscribe(StateHasChanged);
NoteService.Unsubscribe(StateHasChanged);
}