diff --git a/src/CloudStoage.Domain/Etos/UploadingEto.cs b/src/CloudStoage.Domain/Etos/UploadingEto.cs index 48d6749574fa90817fa8427c295e718d9011152c..9aa05a3bdee32427037b649ca1c8c60fdfa59865 100644 --- a/src/CloudStoage.Domain/Etos/UploadingEto.cs +++ b/src/CloudStoage.Domain/Etos/UploadingEto.cs @@ -22,5 +22,5 @@ public class UploadingEto /// /// Stream /// - public Stream Stream { get; set; } + public string FilePath { get; set; } } diff --git a/src/CloudStoage.Domain/HttpModule/Result/UserInfoDto.cs b/src/CloudStoage.Domain/HttpModule/Result/UserInfoDto.cs index 3ffa7e1e404e0f1087b73879be5b39d6b1bd90a0..c95a78edfb095738c9579457479107646d247b6d 100644 --- a/src/CloudStoage.Domain/HttpModule/Result/UserInfoDto.cs +++ b/src/CloudStoage.Domain/HttpModule/Result/UserInfoDto.cs @@ -70,11 +70,12 @@ public class UserInfoDto { get { - if(UsedSize!=0 && TotalSize != 0) + if (UsedSize == 0 || TotalSize == 0) { - return (int)((UsedSize / TotalSize) * 100); + return 0; } - return 0; + var percentage = (UsedSize / (decimal)TotalSize) *100; + return (int)percentage; } } } diff --git a/src/CloudStoage.Domain/UploadingDto.cs b/src/CloudStoage.Domain/UploadingDto.cs index 1d5c52cc6f35f9f2d5b679c101c07f87fcae9504..82a8d4ddf7abe35a0cac0775c28f630b0a93a8e1 100644 --- a/src/CloudStoage.Domain/UploadingDto.cs +++ b/src/CloudStoage.Domain/UploadingDto.cs @@ -21,6 +21,10 @@ public class UploadingDto /// public long UploadingSize { get; set; } = 0; + /// + /// 上传速率(上一秒上传大小) + /// + public int Rate { get; set; } /// /// 上传状态 @@ -30,7 +34,7 @@ public class UploadingDto /// /// 上传进度 /// - public int Progress + public double Progress { get { @@ -39,7 +43,7 @@ public class UploadingDto return 0; } - return (int)((decimal)UploadingSize / (decimal)Length * 100m); + return Math.Round((double)(UploadingSize / (decimal)Length) * 100,2); } } } diff --git a/src/CloudStorage.Applications/CloudStorage.Applications.csproj b/src/CloudStorage.Applications/CloudStorage.Applications.csproj index 054a334fb6d08eb73ebe6d03d0838857ffc78fab..33b74c6c0db1c798892cd8ffef73eab1dece8e95 100644 --- a/src/CloudStorage.Applications/CloudStorage.Applications.csproj +++ b/src/CloudStorage.Applications/CloudStorage.Applications.csproj @@ -33,4 +33,8 @@ + + + + diff --git a/src/CloudStorage.Applications/EventHandle/UploadingEventBus.cs b/src/CloudStorage.Applications/EventHandle/UploadingEventBus.cs index e7203b8c7a0305143d3c18561fafb42905f8f704..06987cfdeba198fbe3878bb63a9178f4a2b437fe 100644 --- a/src/CloudStorage.Applications/EventHandle/UploadingEventBus.cs +++ b/src/CloudStorage.Applications/EventHandle/UploadingEventBus.cs @@ -1,12 +1,11 @@ using CloudStoage.Domain; using CloudStoage.Domain.Etos; -using CloudStorage.Applications.Helpers; using CloudStorage.Domain.Shared; -using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.SignalR.Client; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using System.Collections.Concurrent; +using System.Diagnostics; using System.Threading.Channels; using Token.EventBus; using Token.EventBus.Handlers; @@ -22,7 +21,7 @@ public class UploadingEventBus : ILocalEventHandler>, ISingle private readonly IKeyLocalEventBus DistributedEventBus; private readonly IConfiguration _configuration; private readonly TokenManage token; - + private bool succee = false; private HubConnection connection; public UploadingEventBus(IKeyLocalEventBus keyLocalEventBus, TokenManage token, IKeyLocalEventBus distributedEventBus, IConfiguration configuration) @@ -50,51 +49,100 @@ public class UploadingEventBus : ILocalEventHandler>, ISingle eventData.ForEach(x => { + var file = File.OpenRead(x.FilePath); UploadingList.Add(new UploadingDto { Id = x.Id, FileName = x.FileName, - Length = x.Length ?? 0, + Length = file.Length, Stats = UpdateStats.BeUploading }); + file.Close(); }); - int size = (1024 * 10); - foreach (var item in eventData) + // 接受服务器文件上传指令 + connection.On("file", (x) => { - int length = (int)(item.Length / size); - var channel = Channel.CreateBounded(length + 1); + succee = true; + }); - // 建立传输通道 - await connection.SendAsync("FileStreamSaveAsync", channel.Reader, JsonConvert.SerializeObject(new + int size = (1024 * 30); + foreach (var item in eventData) + { + FileStream fileStream = null; + try { - item.StorageId, - item.FileName, - item.Length - })); + fileStream = File.OpenRead(item.FilePath); - var bytesTransferred = 0; + item.Length = fileStream.Length; - // 定义下载缓存 - var b = new byte[size > item.Length ? item.Length ?? 0 : size]; - int len; - while ((len = await item.Stream.ReadAsync(b)) != 0) - { + int length = (int)(item.Length / size); + var channel = Channel.CreateBounded(length + 1); - await channel.Writer.WriteAsync(b); - bytesTransferred += len; - await UploadingSizeEvent(item.Id, bytesTransferred); - } + // 建立传输通道 + await connection.SendAsync("FileStreamSave", channel.Reader, JsonConvert.SerializeObject(new + { + item.StorageId, + item.FileName, + item.Length + })); + + var bytesTransferred = 0; - // 传输完成结束通道 - channel.Writer.Complete(); - await DistributedEventBus.PublishAsync("Storages", "上传文件成功"); + // 定义下载缓存 + var b = new byte[size > item.Length ? item.Length ?? 0 : size]; + int len; + var sw = Stopwatch.StartNew(); - await UploadingSizeEvent(item.Id, succeed: true); + // 保存上一次计算上传速率时间 + var now = DateTime.Now; + // 保存上次计算上传速率大小 + int rate = 0; + + while ((len = await fileStream.ReadAsync(b)) != 0) + { + await channel.Writer.WriteAsync(b); + await channel.Writer.WaitToWriteAsync(); + bytesTransferred += len; + for (int i = 0; i < 2; i++) + { + if (succee) + { + succee = false; + break; + } + else + { + await Task.Delay(1); + } + } + rate += len; + // 固定计算每秒上传速率 + if (DateTime.Now > now.AddSeconds(1)) + { + await UploadingSizeEvent(item.Id, bytesTransferred, rate); + rate = 0; + now = DateTime.Now; + } + } + + await UploadingSizeEvent(item.Id, bytesTransferred, rate); + sw.Stop(); + + // 传输完成结束通道 + channel.Writer.Complete(); + await DistributedEventBus.PublishAsync("Storages", "上传文件成功"); + + await UploadingSizeEvent(item.Id, succeed: true); + } + finally + { + fileStream?.Close(); + } } } - private async Task UploadingSizeEvent(Guid id, int BytesTransferred = 0, bool succeed = false) + private async Task UploadingSizeEvent(Guid id, int BytesTransferred = 0, int rate = 0, bool succeed = false) { foreach (var d in UploadingList) { @@ -103,10 +151,12 @@ public class UploadingEventBus : ILocalEventHandler>, ISingle if (succeed) { d.Stats = UpdateStats.Succeed; + d.Rate = rate; await KeyLocalEventBus.PublishAsync(KeyLoadNames.UploadingListName, d); return; } d.UploadingSize = BytesTransferred; + d.Rate = rate; await KeyLocalEventBus.PublishAsync(KeyLoadNames.UploadingListName, d); return; } diff --git a/src/CloudStorage.Applications/Helpers/CommonHelper.cs b/src/CloudStorage.Applications/Helpers/CommonHelper.cs index 6b1ef146d17a978bd95a4cabbc23a777e0204470..fb8c4bbed57620a9ff9bbf14c4e1cbc15314c53e 100644 --- a/src/CloudStorage.Applications/Helpers/CommonHelper.cs +++ b/src/CloudStorage.Applications/Helpers/CommonHelper.cs @@ -1,9 +1,24 @@ -using Token.Module.Dependencys; +using CloudStoage.Domain.Etos; +using Token.EventBus.EventBus; +using Token.Module.Dependencys; namespace CloudStorage.Applications.Helpers; public class CommonHelper : IScopedDependency { + + private readonly ILocalEventBus LocalEventBus; + + public CommonHelper(ILocalEventBus localEventBus) + { + LocalEventBus = localEventBus; + } + + /// + /// b转换格式 + /// + /// + /// public string GetFileSize(long? size) { if (size == null) @@ -14,12 +29,43 @@ public class CommonHelper : IScopedDependency if (size < num) return size + "B"; if (size < Math.Pow(num, 2)) - return ((long)size / num).ToString("f2") + "K"; //kb + return ((long)size / num).ToString("f2") + "KB"; //kb if (size < Math.Pow(num, 3)) - return ((long)size / Math.Pow(num, 2)).ToString("f2") + "M"; //M + return ((long)size / Math.Pow(num, 2)).ToString("f2") + "MB"; //M if (size < Math.Pow(num, 4)) - return ((long)size / Math.Pow(num, 3)).ToString("f2") + "G"; //G + return ((long)size / Math.Pow(num, 3)).ToString("f2") + "GB"; //G + + return ((long)size / Math.Pow(num, 4)).ToString("f2") + "TB"; //T + } + + public async Task PickAndShow(Guid? storageId) + { + PickOptions options = new() + { + PickerTitle = "请选择需要上传的文件", + }; + + try + { + var result = await FilePicker.Default.PickMultipleAsync(options); + if (result != null) + { + + var uploadings = result.Select(x => new UploadingEto + { + Id = Guid.NewGuid(), + FileName = x.FileName, + FilePath = x.FullPath, + StorageId = storageId, + }).ToList(); + + _ = LocalEventBus.PublishAsync(uploadings, false); + } + + } + catch (Exception ex) + { + } - return ((long)size / Math.Pow(num, 4)).ToString("f2") + "T"; //T } } diff --git a/src/CloudStorage.Applications/Helpers/HtttpClientHelper.cs b/src/CloudStorage.Applications/Helpers/HtttpClientHelper.cs deleted file mode 100644 index 31609b8dc05b29b43218a5d1df342327571761a6..0000000000000000000000000000000000000000 --- a/src/CloudStorage.Applications/Helpers/HtttpClientHelper.cs +++ /dev/null @@ -1,43 +0,0 @@ -using CloudStoage.Domain; -using CloudStoage.Domain.Etos; -using Microsoft.AspNetCore.Components.Forms; -using System.Net.Http.Handlers; -using Token.Module.Dependencys; - -namespace CloudStorage.Applications.Helpers; - -public class HtttpClientHelper : IScopedDependency -{ - private const string Name = "api/storage"; - - private readonly IHttpClientFactory httpClientFactory; - - public HtttpClientHelper(IHttpClientFactory httpClientFactory) - { - this.httpClientFactory = httpClientFactory; - } - - public async Task UpdateRand(UploadingEto files, EventHandler eventHandler = null) - { - var http = httpClientFactory.CreateClient(string.Empty); - HttpClientHandler handler = new(); - ProgressMessageHandler progressMessageHandler = new(handler); - progressMessageHandler.HttpSendProgress += eventHandler; - - using HttpClient httpClient = new(progressMessageHandler); - - httpClient.BaseAddress = new Uri(Constant.Api); - httpClient.DefaultRequestHeaders - .Add(Constant.Authorization, http.DefaultRequestHeaders.FirstOrDefault(x => x.Key == Constant.Authorization).Value); - httpClient.DefaultRequestHeaders.Add("id", files.Id.ToString()); - - using var multipartFormData = new MultipartFormDataContent - { - { new StreamContent(files.Stream), "file", files.FileName } - }; - - var response = await httpClient.PostAsync(Name + "/upload-file?storageId=" + files.StorageId, multipartFormData); - - } - -} diff --git a/src/CloudStorage.Domain.Shared/FileNameSuffix.cs b/src/CloudStorage.Domain.Shared/FileNameSuffix.cs new file mode 100644 index 0000000000000000000000000000000000000000..dbd4972bd959702b50322af618b447fda48d5f87 --- /dev/null +++ b/src/CloudStorage.Domain.Shared/FileNameSuffix.cs @@ -0,0 +1,10 @@ +namespace CloudStorage.Domain.Shared; + +public class FileNameSuffix +{ + public static string[] Img = new[] { ".png", ".jpg", ".gif", ".bmp" }; + + public static string[] Video = new[] { ".mp4" }; + + public static string[] Word = new[] { ".pdf" }; +} diff --git a/src/CloudStorage.Layou/Components/CreateFolder.razor b/src/CloudStorage.Layou/Components/CreateFolder.razor index 046100550e71700eef8aac429dff35bb66f4b588..2f7ded8a4b70da52e5cecc4d61198e6c299ac1fa 100644 --- a/src/CloudStorage.Layou/Components/CreateFolder.razor +++ b/src/CloudStorage.Layou/Components/CreateFolder.razor @@ -1,5 +1,6 @@ - @@ -18,7 +19,7 @@ + OnClick="() => DialogChanged.InvokeAsync(false)"> 取消 /// 是否显示 /// [Parameter] - public bool Dialog - { - get { return dialog; } - set - { - OnChange?.Invoke(value); - dialog = value; - } - } + public bool Dialog { get; set; } public string? Name = string.Empty; [Parameter] - public Action OnChange { get; set; } + public EventCallback DialogChanged { get; set; } [Parameter] public Guid? StorageId { get; set; } @@ -43,9 +33,9 @@ partial class CreateFolder await StorageApi.CreateDirectoryAsync(new CloudStoage.Domain.HttpModule.Input.CreateDirectoryInput { Path = Name, - StorageId=StorageId, - }) ; - Dialog = false; - await DistributedEventBus.PublishAsync(nameof(Storages),"创建文件夹成功"); + StorageId = StorageId, + }); + await DialogChanged.InvokeAsync(false); + await DistributedEventBus.PublishAsync(nameof(Storages), "创建文件夹成功"); } } diff --git a/src/CloudStorage.Layou/Components/Dialogs/DialogImages.razor b/src/CloudStorage.Layou/Components/Dialogs/DialogImages.razor new file mode 100644 index 0000000000000000000000000000000000000000..26ba9302c6187cb2b62bbe6f1b04343b25b57192 --- /dev/null +++ b/src/CloudStorage.Layou/Components/Dialogs/DialogImages.razor @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/src/CloudStorage.Layou/Components/Dialogs/DialogImages.razor.cs b/src/CloudStorage.Layou/Components/Dialogs/DialogImages.razor.cs new file mode 100644 index 0000000000000000000000000000000000000000..4428024d3e9668b117f082a9b8e74b7235536ddf --- /dev/null +++ b/src/CloudStorage.Layou/Components/Dialogs/DialogImages.razor.cs @@ -0,0 +1,23 @@ +namespace CloudStorage.Layou.Components.Dialogs; + +partial class DialogImages +{ + [Parameter] + public bool Show { get; set; } + + [Parameter] + public EventCallback ShowChanged { get; set; } + + + [Parameter] + public string? Src + { + get; + set; + } + + [Parameter] + public EventCallback SrcChanged { get; set; } + + +} diff --git a/src/CloudStorage.Layou/Components/FileFunction.razor b/src/CloudStorage.Layou/Components/FileFunction.razor index b8458d5e874662f3bb8683d0d05fcc503085c805..6033ded2a8222d6fe2693c040e4bf67056c369da 100644 --- a/src/CloudStorage.Layou/Components/FileFunction.razor +++ b/src/CloudStorage.Layou/Components/FileFunction.razor @@ -12,16 +12,19 @@ - - - - + @if(Storage.Type==StorageType.File) + { + + + + - - 下载文件 - - - + + 下载文件 + + + + } diff --git a/src/CloudStorage.Layou/Components/FileFunction.razor.cs b/src/CloudStorage.Layou/Components/FileFunction.razor.cs index 9410290c37bcba7874177738aa52b302a96560d0..56c854e5ce63d7133031f00f7e5abaebe56a3be1 100644 --- a/src/CloudStorage.Layou/Components/FileFunction.razor.cs +++ b/src/CloudStorage.Layou/Components/FileFunction.razor.cs @@ -1,4 +1,5 @@ +using CloudStoage.Domain.HttpModule.Result; using Token.EventBus; namespace CloudStorage.Layou.Components; @@ -9,7 +10,7 @@ partial class FileFunction /// 文件Id /// [Parameter] - public Guid StorageId { get; set; } + public StorageDto Storage { get; set; } [Inject] public StorageApi StorageApi { get; set; } @@ -19,7 +20,7 @@ partial class FileFunction private async void DeleteFileAsync() { - await StorageApi.DeleteStorageAsync(StorageId); + await StorageApi.DeleteStorageAsync(Storage.Id); await DistributedEventBus.PublishAsync("HasFybctuib", false); } diff --git a/src/CloudStorage.Layou/Components/Layous/HandlerLayou.razor b/src/CloudStorage.Layou/Components/Layous/HandlerLayou.razor new file mode 100644 index 0000000000000000000000000000000000000000..9ea01d88cc8423ec89311a7dc6b3c72381c7f9a2 --- /dev/null +++ b/src/CloudStorage.Layou/Components/Layous/HandlerLayou.razor @@ -0,0 +1,11 @@ +@page "/Handler/{Name?}" + +@layout EmptyLayou + + + + mdi-arrow-left + + + diff --git a/src/CloudStorage.Layou/Components/Layous/HandlerLayou.razor.cs b/src/CloudStorage.Layou/Components/Layous/HandlerLayou.razor.cs new file mode 100644 index 0000000000000000000000000000000000000000..66b4075f8268b38305d2a74535d5d2683dbbf7fb --- /dev/null +++ b/src/CloudStorage.Layou/Components/Layous/HandlerLayou.razor.cs @@ -0,0 +1,7 @@ +namespace CloudStorage.Layou.Components.Layous; + +partial class HandlerLayou +{ + [Parameter] + public string? Name { get; set; } +} diff --git a/src/CloudStorage.Layou/Components/Storagefile.razor b/src/CloudStorage.Layou/Components/Storagefile.razor index a1b9555f3540e30e61d2a2e27dd06e41c819ee3c..d1c7c6c2652d68906a4b918eeeba1e29f1723ec6 100644 --- a/src/CloudStorage.Layou/Components/Storagefile.razor +++ b/src/CloudStorage.Layou/Components/Storagefile.razor @@ -1,25 +1,25 @@ - + - - @Storageo.Path + @Storage.Path - @Storageo.CreationTime + @Storage.CreationTime - + diff --git a/src/CloudStorage.Layou/Components/Storagefile.razor.cs b/src/CloudStorage.Layou/Components/Storagefile.razor.cs index b589825aaf3b1a29980a3b55c05f7604c9dcb085..c9d4fb2b0a30a5598c82af41c9193e796888f2dd 100644 --- a/src/CloudStorage.Layou/Components/Storagefile.razor.cs +++ b/src/CloudStorage.Layou/Components/Storagefile.razor.cs @@ -7,27 +7,17 @@ namespace CloudStorage.Layou.Components; partial class Storagefile { - private bool hasFybctuib; - [Parameter] - public bool HasFybctuib - { - get { return hasFybctuib; } - set - { - hasFybctuib = value; - ValueChange.InvokeAsync(value); - } - } + public bool HasFybctuib { get; set; } [Parameter] - public EventCallback ValueChange { get; set; } + public EventCallback HasFybctuibChanged { get; set; } /// /// ļorļid /// [Parameter] - public Guid? StorageId { get; set; } + public StorageDto Storage { get; set; } [Inject] public StorageApi StorageApi { get; set; } @@ -38,17 +28,15 @@ partial class Storagefile [Inject] public IKeyLocalEventBus StringDstributedEventBus { get; set; } - /// - /// Ϣ - /// - public StorageDto Storageo { get; set; } public override async Task SetParametersAsync(ParameterView parameters) { - parameters.TryGetValue(nameof(StorageId), out Guid? storageId); - if (storageId == null) + parameters.TryGetValue("Storage", out StorageDto storage); + if (storage == null) return; + Storage = storage; + parameters.TryGetValue(nameof(HasFybctuib), out bool hasFybctuib); if (hasFybctuib == HasFybctuib) @@ -57,11 +45,10 @@ partial class Storagefile } HasFybctuib = hasFybctuib; - parameters.TryGetValue(nameof(ValueChange), out EventCallback valueChange); + parameters.TryGetValue(nameof(HasFybctuibChanged), out EventCallback valueChange); - ValueChange = valueChange; + HasFybctuibChanged = valueChange; - await GetStorageAsync(storageId); await HasFybctuibAsync(); @@ -75,21 +62,11 @@ partial class Storagefile var result = data as bool?; if (result != null) { - HasFybctuib = (bool)result; + await HasFybctuibChanged.InvokeAsync(result ?? false); StateHasChanged(); - await StringDstributedEventBus.PublishAsync(nameof(Storages),"ɾļɹ"); + await StringDstributedEventBus.PublishAsync(nameof(Storages), "ɾļɹ"); } }); } - private async Task GetStorageAsync(Guid? id) - { - if (StorageId == id && Storageo != null) - { - return; - } - Storageo = await StorageApi.GetStorageAsync(id); - - StorageId = id; - } } \ No newline at end of file diff --git a/src/CloudStorage.Layou/Components/Uploads/UploadTheList.razor b/src/CloudStorage.Layou/Components/Uploads/UploadTheList.razor index 45cf692c2577fd97e2ed666e5a6270927e68c2ec..161f0fe3f81f4f3c00289ae69edd8d9a375d3488 100644 --- a/src/CloudStorage.Layou/Components/Uploads/UploadTheList.razor +++ b/src/CloudStorage.Layou/Components/Uploads/UploadTheList.razor @@ -7,8 +7,12 @@ { + + @(CommonHelper.GetFileSize(d.UploadingSize)+"/"+CommonHelper.GetFileSize(d.Length)) + @(CommonHelper.GetFileSize(d.Rate) + "/s") + - @(d.Progress)% + @(d.Progress)% } diff --git a/src/CloudStorage.Layou/Components/Uploads/UploadTheList.razor.cs b/src/CloudStorage.Layou/Components/Uploads/UploadTheList.razor.cs index b4cd4acc9ad4accba5d4eb75664a9a5b37abc481..f5c5387a709816ce8d6af3b4a231fe66104fb416 100644 --- a/src/CloudStorage.Layou/Components/Uploads/UploadTheList.razor.cs +++ b/src/CloudStorage.Layou/Components/Uploads/UploadTheList.razor.cs @@ -1,5 +1,6 @@ using CloudStoage.Domain; using CloudStorage.Applications.EventHandle; +using CloudStorage.Applications.Helpers; using CloudStorage.Domain.Shared; using System.Collections.Concurrent; using System.Drawing; @@ -15,20 +16,24 @@ namespace CloudStorage.Layou.Components.Uploads [Inject] public IKeyLocalEventBus UploadTheListEventBus { get; set; } + [Inject] + public CommonHelper CommonHelper { get; set; } + public static BlockingCollection UploadingList { get; set; } protected override async void OnInitialized() { - UploadingList = UploadingEventBus.UploadingList; - - await UploadTheListEventBus.Subscribe(KeyLoadNames.UploadingListName, a => + await UploadTheListEventBus.Subscribe(KeyLoadNames.UploadingListName, a => { foreach (var d in UploadingList) { if (d.Id == a.Id) { - d.Stats = a.Stats; + if (d.Stats != a.Stats) + { + d.Stats = a.Stats; + } d.UploadingSize = a.UploadingSize; StateHasChanged(); return; diff --git a/src/CloudStorage.Layou/Pages/PersonalCenter.razor.cs b/src/CloudStorage.Layou/Pages/PersonalCenter.razor.cs index 0dfb2c6e6ea77779b057dc85d338b6ff80f4e301..0bf776e8ed28a51211baa272647d619c7024df46 100644 --- a/src/CloudStorage.Layou/Pages/PersonalCenter.razor.cs +++ b/src/CloudStorage.Layou/Pages/PersonalCenter.razor.cs @@ -28,5 +28,6 @@ partial class PersonalCenter private async Task GetUserInfoAsync() { UserInfo = await UserInfoApi.GetAsync(); + var p= UserInfo.Percentage; } } diff --git a/src/CloudStorage.Layou/Pages/Storages.razor b/src/CloudStorage.Layou/Pages/Storages.razor index b7dada0eb29f02103e24cd16b1243887dea52478..92f27f234399bb34189afd394157647b222a669f 100644 --- a/src/CloudStorage.Layou/Pages/Storages.razor +++ b/src/CloudStorage.Layou/Pages/Storages.razor @@ -1,4 +1,5 @@ @page "/Storages" +@using CloudStorage.Layou.Components.Dialogs @using Microsoft.AspNetCore.Components.Forms @@ -40,8 +41,9 @@ @foreach (var item in StorageList?.Items) { - OnFunctionClickAsync(item)"> + await GetStorageAsync(item)" MaxHeight="85" MaxWidth="70" Height="85" @@ -50,24 +52,21 @@ @item.Path - ··· + OnFunctionClickAsync(item)">··· } - - - + + - - - +
···