diff --git a/WebDoorCreator.Data/Services/WebDoorCreatorService.cs b/WebDoorCreator.Data/Services/WebDoorCreatorService.cs index 9a83dce..ff47e0d 100644 --- a/WebDoorCreator.Data/Services/WebDoorCreatorService.cs +++ b/WebDoorCreator.Data/Services/WebDoorCreatorService.cs @@ -2578,7 +2578,9 @@ namespace WebDoorCreator.Data.Services Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); - fatto = await dbController.VocLemmaInsert(); + fatto = await dbController.VocLemmaInsert(); + RedisValue pattern = new RedisValue($"{Constants.rKeyVocLemma}"); + bool answ = await ExecFlushRedisPattern(pattern); stopWatch.Stop(); TimeSpan ts = stopWatch.Elapsed; Log.Debug($"VocLemmaInsert in: {ts.TotalMilliseconds} ms"); diff --git a/WebDoorCreator.UI/Components/FilesMan/FilesRefresh.razor b/WebDoorCreator.UI/Components/FilesMan/FilesRefresh.razor index 18a1361..52f8095 100644 --- a/WebDoorCreator.UI/Components/FilesMan/FilesRefresh.razor +++ b/WebDoorCreator.UI/Components/FilesMan/FilesRefresh.razor @@ -1,69 +1,80 @@  - +
+
- + - -@if (showList) -{ - - @if (vocLemmas2Dict != null && vocLemmasTEMP2Dict != null) + +
+ @if (vocLemmas2Dict.Count > 0 && vocLemmasTEMP2Dict.Count > 0) { - - - @result - - - - - - - - - - - - - @foreach (var item in vocLemmasTEMP2Dict) - { +
+ +
+ } + +@if (isLoading) +{ + +} +else +{ + @if (showList) + { + @if (vocLemmas2Dict != null && vocLemmasTEMP2Dict != null) + { +
Old textNew text
+ - - @if (!vocLemmas2Dict.ContainsKey(item.Key)) - { - - - - } - else if (item.Value != vocLemmas2Dict[item.Key]) - { - - - - } - + + + - } - -
- - @($"{item.Key} --> {vocLemmasTEMP2Dict[item.Key]}") - - - @($"{item.Key} --> {vocLemmas2Dict[item.Key]}") - - @($"{item.Key} --> {item.Value}") - -
- @if (isReady2Save(item.Key)) - { - - } - else - { - - } -
-
Old textNew text
+ + + + @foreach (var item in vocLemmasTEMP2Dict) + { + + + @if (!vocLemmas2Dict.ContainsKey(item.Key)) + { + + + + @($"{item.Key} --> {vocLemmasTEMP2Dict[item.Key]}") + + + + } + else if (item.Value != vocLemmas2Dict[item.Key]) + { + + @($"{item.Key} --> {vocLemmas2Dict[item.Key]}") + + + @($"{item.Key} --> {item.Value}") + + +
+ @if (isReady2Save(item.Key)) + { + + } + else + { + + } +
+ + } + + + } + + + } + } } diff --git a/WebDoorCreator.UI/Components/FilesMan/FilesRefresh.razor.cs b/WebDoorCreator.UI/Components/FilesMan/FilesRefresh.razor.cs index 3d2a813..c73aff4 100644 --- a/WebDoorCreator.UI/Components/FilesMan/FilesRefresh.razor.cs +++ b/WebDoorCreator.UI/Components/FilesMan/FilesRefresh.razor.cs @@ -19,6 +19,7 @@ namespace WebDoorCreator.UI.Components.FilesMan protected Dictionary vocLemmasTEMP2Dict { get; set; } = new Dictionary(); protected bool showList { get; set; } = false; + protected bool isLoading { get; set; } = false; protected async override Task OnParametersSetAsync() { var rawVoc = await WDCService.VocLemmaGetAll(); @@ -53,6 +54,7 @@ namespace WebDoorCreator.UI.Components.FilesMan Dictionary> listVocLemmaTemp = new Dictionary>(); protected async Task refreshVoc() { + isLoading = true; vocLemmasTEMP = null; await Task.Delay(1); list2Mod = await WDCService.VocLemmaInsertPrepare(@$"{defaultPath}"); @@ -75,6 +77,7 @@ namespace WebDoorCreator.UI.Components.FilesMan } } } + isLoading = false; showList = true; } List list2Mod = new List();