diff --git a/.gitignore b/.gitignore index 0cee943..a22d3c4 100644 --- a/.gitignore +++ b/.gitignore @@ -363,4 +363,6 @@ MigrationBackup/ FodyWeavers.xsd TrainData -prometheus-2.45.0-rc.0.windows-amd64 \ No newline at end of file +prometheus-2.45.0-rc.0.windows-amd64 +mongodb-windows-x86_64-6.0.6 +*.patch diff --git a/DeepTrace/Data/DataSourceDefinition.cs b/DeepTrace/Data/DataSourceDefinition.cs index a5ff797..3f45a2e 100644 --- a/DeepTrace/Data/DataSourceDefinition.cs +++ b/DeepTrace/Data/DataSourceDefinition.cs @@ -11,7 +11,8 @@ public class DataSourceQuery public string Query { get; set; } public string Color { get; set; } - + + public override string ToString() => Query; } public class DataSourceDefinition @@ -26,4 +27,6 @@ public class DataSourceDefinition public string Name { get; set; } public List Queries { get; set; } = new(); public string Description { get; set; } = string.Empty; + + public override string ToString() => Name; } diff --git a/DeepTrace/Pages/DataSources.razor b/DeepTrace/Pages/DataSources.razor index a7a9a19..9959a36 100644 --- a/DeepTrace/Pages/DataSources.razor +++ b/DeepTrace/Pages/DataSources.razor @@ -30,7 +30,7 @@ - + @foreach (var source in _dataSources) { @source.Name @@ -43,9 +43,9 @@ } - - - + + + @@ -53,27 +53,32 @@ - @for ( var i = 0; i < _queryForm.Source.Queries.Count; i++ ) + @for (var i = 0; i < _queryForm.Source.Queries.Count; i++) { int pos = i; - var def = _queryForm.Source.Queries[pos]; - + - + @if (_queryForm.Source.Queries.Count > 1) { - + } - + } - + + + Submit + + + + Clear @@ -88,11 +93,11 @@ +

Remove thus button!

Train - Submit
-
-
+ + diff --git a/DeepTrace/Shared/MainLayout.razor b/DeepTrace/Shared/MainLayout.razor index 0efa148..b3ba4aa 100644 --- a/DeepTrace/Shared/MainLayout.razor +++ b/DeepTrace/Shared/MainLayout.razor @@ -38,7 +38,14 @@ if (firstRender) { IsDarkMode = await _mudThemeProvider!.GetSystemPreference(); + await _mudThemeProvider.WatchSystemPreference(OnSystemPreferenceChanged); StateHasChanged(); } } + + private async Task OnSystemPreferenceChanged(bool newValue) + { + IsDarkMode = newValue; + await InvokeAsync(StateHasChanged); + } } \ No newline at end of file