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
+13 -8
View File
@@ -1,12 +1,16 @@
@layout PageLayout
@inject INoteService noteService
@inherits BasePage
@inject INoteService NoteService
@implements IDisposable
@inject IDataCollectionService DataCollectionService
@page "/notes/{href1}/{href2?}/{href3?}/{href4?}/{href5?}"
@if (!noteService.IsLoaded())
@if (!NoteService.IsLoaded())
{
<LoadingComponent/>
}
@@ -15,12 +19,12 @@ else
<LayoutWithSidebarComponent>
<Sidebar>
<NoteNavComponent
Connections="noteService.NoteConnectionModels"
Notes="noteService.NoteContentModels"/>
Connections="NoteService.NoteConnectionModels"
Notes="NoteService.NoteContentModels"/>
</Sidebar>
<Content>
<PaperComponent>
@foreach (var note in noteService.NoteContentModels)
@foreach (var note in NoteService.NoteContentModels)
{
if (!note.Href.Equals(Href))
{
@@ -107,14 +111,15 @@ 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);
}
}