@*
*@
- @if (searchRecords != null && searchRecords.Count() > 0)
- {
-
-
-
-
-
-
-
-
- }
+
+
@if (showBtnCur)
@@ -53,6 +43,36 @@
+
+
+ @if (ListType != null)
+ {
+
+ }
+
+
+
+
+ @if (searchRecords != null && searchRecords.Count() > 0)
+ {
+
+
+
+
+
+ @* *@
+
+
+ }
+
+
+
@if (isLoading)
{
@@ -63,63 +83,72 @@ else if (files2Chk != null && files2Chk.Count() > 0)
| Type |
- Folder/File |
+ Folder/File |
Size |
|
Type |
- Folder/File |
+ Folder/File |
Size |
- @foreach (var item in files2Chk)
+ @if (isDrawing)
{
-
- @if (item.Value.status == Core.Enum.fileStatus.add || item.Value.status == Core.Enum.fileStatus.mod)
- {
- showDiff(item, item.Value.status)">
- @item.Key.Split("\\")[0]
+
+ }
+ else
+ {
+ @foreach (var item in files2Chk)
+ {
+ |
+ @if (item.Value.status == Core.Enum.fileStatus.add || item.Value.status == Core.Enum.fileStatus.mod)
+ {
+ showDiff(item, item.Value.status)">
+ @item.Key.Split("\\")[0]
+ |
+ showDiff(item, item.Value.status)">
+ @item.Key.Split("\\")[1]
+
+ @item.Value.FileRelPath
+ @* @item.Key.Split("\\")[2] *@
+
+ |
+ showDiff(item, item.Value.status)">
+ @($"{item.Value.FileDim / 1024} kb")
+ |
+ }
+ else
+ {
+ showDiff(item, item.Value.status)"> |
+ }
+
+
|
- showDiff(item, item.Value.status)">
- @item.Key.Split("\\")[1]
-
- @item.Key.Split("\\")[2]
-
- |
- showDiff(item, item.Value.status)">
- @($"{item.Value.FileDim / 1024} kb")
- |
- }
- else
- {
- showDiff(item, item.Value.status)"> |
- }
-
-
- |
- @if (item.Value.status == Core.Enum.fileStatus.rem || item.Value.status == Core.Enum.fileStatus.mod)
- {
- showDiff(item, item.Value.status)">
- @item.Key.Split("\\")[0]
- |
- showDiff(item, item.Value.status)">
- @item.Key.Split("\\")[1]
-
- @item.Key.Split("\\")[2]
-
- |
- showDiff(item, item.Value.status)">
- @($"{item.Value.FileDim / 1024} kb")
- |
- }
- else
- {
- showDiff(item, item.Value.status)"> |
- }
-
+ @if (item.Value.status == Core.Enum.fileStatus.rem || item.Value.status == Core.Enum.fileStatus.mod)
+ {
+ showDiff(item, item.Value.status)">
+ @item.Key.Split("\\")[0]
+ |
+ showDiff(item, item.Value.status)">
+ @item.Key.Split("\\")[1]
+
+ @item.Value.FileRelPath
+ @* @item.Key.Split("\\")[2] *@
+
+ |
+ showDiff(item, item.Value.status)">
+ @($"{item.Value.FileDim / 1024} kb")
+ |
+ }
+ else
+ {
+ showDiff(item, item.Value.status)"> |
+ }
+
+ }
}
diff --git a/WebDoorCreator.UI/Components/FilesMan/CompoCompare.razor.cs b/WebDoorCreator.UI/Components/FilesMan/CompoCompare.razor.cs
index 2771d96..937eeb5 100644
--- a/WebDoorCreator.UI/Components/FilesMan/CompoCompare.razor.cs
+++ b/WebDoorCreator.UI/Components/FilesMan/CompoCompare.razor.cs
@@ -43,6 +43,7 @@ namespace WebDoorCreator.UI.Components.FilesMan
protected double expTime { get; set; } = 6;
protected bool isLoading { get; set; } = false;
+ protected bool isDrawing { get; set; } = false;
protected int numSteps { get; set; } = 4;
@@ -209,6 +210,7 @@ namespace WebDoorCreator.UI.Components.FilesMan
{
files2Chk.Clear();
searchRecords.Clear();
+ ListType = new List
();
Log.Info($"Component scan started by user {WDCUService.userId}");
isLoading = true;
sendDataVal = 0;
@@ -236,12 +238,14 @@ namespace WebDoorCreator.UI.Components.FilesMan
if (curFiles[item.Key].FileMD5 != item.Value.FileMD5)
{
item.Value.status = Core.Enum.fileStatus.mod;
+ checkItemType(item);
}
curFiles.Remove(item.Key);
}
else
{
item.Value.status = Core.Enum.fileStatus.add;
+ checkItemType(item);
}
searchRecords.Add(item.Key, item.Value);
}
@@ -267,6 +271,34 @@ namespace WebDoorCreator.UI.Components.FilesMan
Log.Info($"Component scan COMPLETED");
}
+ private void checkItemType(KeyValuePair item)
+ {
+ string type = getType(item.Key);
+ if (!ListType.Contains(type))
+ {
+ ListType.Add(type);
+ }
+ }
+
+ public static string getType(string key)
+ {
+ string answ = "";
+ if (key.Contains("\\"))
+ {
+ answ = key.Split("\\")[0];
+ }
+ return answ;
+ }
+ public static string getFolder(string key)
+ {
+ string answ = "";
+ if (key.Contains("\\"))
+ {
+ answ = key.Split("\\")[1];
+ }
+ return answ;
+ }
+
protected string filtBtnAddCss()
{
string answ = "";
@@ -357,17 +389,38 @@ namespace WebDoorCreator.UI.Components.FilesMan
await ReloadData();
}
+ protected string TypeSel
+ {
+ get => _typeSel;
+ set
+ {
+ if (_typeSel != value)
+ {
+ _typeSel = value;
+ ReloadData().ConfigureAwait(false);
+ }
+ }
+ }
+ private string _typeSel { get; set; } = "";
+
+ protected List ListType { get; set; } = new List();
+
protected async Task ReloadData()
{
+ isDrawing = true;
await Task.Delay(1);
- totalCount = searchRecords.Count;
- files2Chk = searchRecords
- .Where(x => stats2show.Contains(x.Value.status))
- .Skip(numRecord * (currPage - 1))
- .Take(numRecord)
- .ToDictionary(x => x.Key, x => x.Value);
+ var filtData = searchRecords
+ .Where(x => stats2show.Contains(x.Value.status) && (TypeSel == "*" || x.Key.StartsWith(TypeSel)))
+ .ToList();
+ totalCount = filtData.Count;
+
+ files2Chk = filtData
+ .Skip(numRecord * (currPage - 1))
+ .Take(numRecord)
+ .ToDictionary(x => x.Key, x => x.Value);
//await InvokeAsync(() => StateHasChanged());
+ isDrawing = false;
}
protected void ReplaceFile(string FileToMoveAndDelete, string FileToReplace)
diff --git a/WebDoorCreator.UI/WebDoorCreator.UI.csproj b/WebDoorCreator.UI/WebDoorCreator.UI.csproj
index 37f8810..f5ffa05 100644
--- a/WebDoorCreator.UI/WebDoorCreator.UI.csproj
+++ b/WebDoorCreator.UI/WebDoorCreator.UI.csproj
@@ -3,7 +3,7 @@
net6.0
enable
- 0.9.2309.1110
+ 0.9.2309.1112
enable
aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608