Browse Source

Merge pull request #25487 from abpframework/auto-merge/rel-10-4/4585

Merge branch dev with rel-10.4
pull/25495/head
Volosoft Agent 2 months ago
committed by GitHub
parent
commit
3e0191add2
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 40
      framework/src/Volo.Abp.MudBlazorUI/MudBlazorUiPageProgressService.cs
  2. 1
      modules/identity/src/Volo.Abp.Identity.Blazor.MudBlazor/Pages/Identity/UserManagement.razor
  3. 1
      modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor.MudBlazor/Components/PermissionManagementModal.razor
  4. 4
      modules/setting-management/src/Volo.Abp.SettingManagement.Blazor.MudBlazor/Pages/SettingManagement/SettingManagement.razor
  5. 4
      modules/setting-management/src/Volo.Abp.SettingManagement.Blazor.MudBlazor/Pages/SettingManagement/SettingManagement.razor.cs

40
framework/src/Volo.Abp.MudBlazorUI/MudBlazorUiPageProgressService.cs

@ -17,33 +17,57 @@ public class MudBlazorUiPageProgressService : IUiPageProgressService, IScopedDep
protected virtual int HideDelayMs => 250;
private int _activeCount;
private UiPageProgressOptions _lastOptions = new();
private bool _visible;
private UiPageProgressOptions _lastOptions;
private readonly Timer _hideTimer;
public MudBlazorUiPageProgressService()
{
_hideTimer = new Timer(_ => ProgressChanged?.Invoke(this, new UiPageProgressEventArgs(-1, _lastOptions)));
_lastOptions = CreateDefaultOptions();
_hideTimer = new Timer(_ =>
{
_visible = false;
ProgressChanged?.Invoke(this, new UiPageProgressEventArgs(-1, _lastOptions));
});
}
public Task Go(int? percentage, Action<UiPageProgressOptions>? options = null)
{
var opt = new UiPageProgressOptions();
var opt = CreateDefaultOptions();
options?.Invoke(opt);
_lastOptions = opt;
if (percentage == -1 && Interlocked.Decrement(ref _activeCount) <= 0)
if (percentage == -1)
{
Interlocked.Exchange(ref _activeCount, 0);
_hideTimer.Change(HideDelayMs, Timeout.Infinite);
_activeCount--;
if (_activeCount <= 0)
{
_activeCount = 0;
_hideTimer.Change(HideDelayMs, Timeout.Infinite);
}
}
else if (percentage == null && Interlocked.Increment(ref _activeCount) == 1)
else if (percentage == null)
{
_activeCount++;
_hideTimer.Change(Timeout.Infinite, Timeout.Infinite);
ProgressChanged?.Invoke(this, new UiPageProgressEventArgs(null, opt));
if (!_visible)
{
_visible = true;
ProgressChanged?.Invoke(this, new UiPageProgressEventArgs(null, opt));
}
}
else
{
ProgressChanged?.Invoke(this, new UiPageProgressEventArgs(percentage, opt));
}
return Task.CompletedTask;
}
protected virtual UiPageProgressOptions CreateDefaultOptions()
{
return new UiPageProgressOptions();
}
public void Dispose() => _hideTimer.Dispose();
}

1
modules/identity/src/Volo.Abp.Identity.Blazor.MudBlazor/Pages/Identity/UserManagement.razor

@ -24,6 +24,7 @@
<MudItem xs="12" sm="4">
<MudTextField Margin="Margin.Dense" @bind-Value="GetListInput.Filter"
Placeholder="@L["Search"]"
UserAttributes="@(new Dictionary<string, object> { { "aria-label", L["Search"].Value } })"
Adornment="Adornment.Start"
AdornmentIcon="@Icons.Material.Filled.Search"
Immediate="true"

1
modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor.MudBlazor/Components/PermissionManagementModal.razor

@ -13,6 +13,7 @@
<MudTextField Margin="Margin.Dense" Value="@_permissionGroupSearchText"
ValueChanged="@(async ([CanBeNull] string b) => await OnPermissionGroupSearchTextChangedAsync(b))"
Placeholder="@L["Search"]"
UserAttributes="@(new Dictionary<string, object> { { "aria-label", L["Search"].Value } })"
Adornment="Adornment.Start"
AdornmentIcon="@Icons.Material.Filled.Search"
Immediate="true" />

4
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor.MudBlazor/Pages/SettingManagement/SettingManagement.razor

@ -15,13 +15,13 @@
<MudCard Style="min-height: 400px;">
<MudCardContent Class="pt-3">
@if (string.IsNullOrEmpty(SelectedGroup))
@if (_loading)
{
<div class="d-flex justify-center align-center" style="min-height: 360px;">
<MudProgressCircular Indeterminate="true" Color="Color.Primary" />
</div>
}
else
else if (SettingComponentCreationContext != null && SettingComponentCreationContext.Groups.Any())
{
<MudTabs @bind-ActivePanelIndex="@_activeTabIndex"
Variant="Variant.Pills"

4
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor.MudBlazor/Pages/SettingManagement/SettingManagement.razor.cs

@ -36,6 +36,8 @@ public partial class SettingManagement
protected int _activeTabIndex = 0;
protected bool _loading = true;
protected async override Task OnInitializedAsync()
{
BreadcrumbItems.Add(new BreadcrumbItem(LUiNavigation["Menu:Administration"].Value, null, disabled: true));
@ -55,6 +57,8 @@ public partial class SettingManagement
SelectedGroup = GetNormalizedString(SettingComponentCreationContext.Groups.First().Id);
_activeTabIndex = 0;
}
_loading = false;
}
protected virtual string GetNormalizedString(string value)

Loading…
Cancel
Save