Skip to content

Commit

Permalink
refactor: OnAfterHandle
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh425 committed Jul 12, 2024
1 parent add956c commit 1a4cfa0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="Masa.BuildingBlocks.Authentication.Identity" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.Data.Mapping.Mapster" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.SearchEngine.AutoComplete.ElasticSearch" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Stack.Components" Version="0.0.464" />
<PackageReference Include="Masa.Stack.Components" Version="0.0.466" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.15" />
<PackageReference Include="Quartz.AspNetCore" Version="3.6.2" />
<PackageReference Include="Masa.Contrib.StackSdks.Alert" Version="$(MasaStackSdksPackageVersion)" />
Expand Down
5 changes: 2 additions & 3 deletions src/Web/Masa.Scheduler.Web.Admin/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@inject NavigationManager Navigation
@inject IMasaStackConfig MasaStackConfig

<SLayout OnSignOut="SignOut" OnErrorAsync="OnError" WhiteUris="_whiteUris" IsShowEnvironmentSwitch Class="full-height"
<SLayout OnSignOut="SignOut" OnErrorAfterHandle="OnErrorAfterHandle" WhiteUris="_whiteUris" IsShowEnvironmentSwitch Class="fill-height"
Logo="https://cdn.masastack.com/stack/images/logo/MASAStack/logo-h-en.png"
MiniLogo="/_content/Masa.Scheduler.Web.Admin/img/mainLayout/logo.svg">
@Body
Expand All @@ -18,9 +18,8 @@

private readonly List<string> _whiteUris = new() { "/job/task/*" };

private Task OnError(Exception exception)
private Task OnErrorAfterHandle(Exception exception)
{
PopupService.EnqueueSnackbarAsync(exception.Message, AlertTypes.Error);
GlobalConfig.Loading = false;
return Task.CompletedTask;
}
Expand Down

0 comments on commit 1a4cfa0

Please sign in to comment.