Skip to content

Commit

Permalink
Merge pull request #6330 from abpframework/stsrki-rel-4.0-blazorise-0…
Browse files Browse the repository at this point in the history
….9.3-p2

Stsrki rel 4.0 blazorise 0.9.3 p2
  • Loading branch information
hikalkan committed Nov 24, 2020
2 parents 05a1a89 + 747107e commit 869bc26
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 24 deletions.
@@ -1 +1 @@
<SnackbarStack @ref="SnackbarStack" Location="SnackbarStackLocation.Right" Multiline="true" Closed="@OnSnackbarClosed" />
<SnackbarStack @ref="SnackbarStack" Location="SnackbarStackLocation.Right" Multiline="true" DelayCloseOnClick="true" DelayCloseOnClickInterval="10000" Closed="@OnSnackbarClosed" />
@@ -1,5 +1,6 @@
using System;
using System.Threading.Tasks;
using Blazorise;
using Blazorise.Snackbar;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Localization;
Expand Down Expand Up @@ -47,7 +48,7 @@ protected override void OnInitialized()
UiNotificationService.NotificationReceived += OnNotificationReceived;
}

protected virtual void OnNotificationReceived(object sender, UiNotificationEventArgs e)
protected virtual async void OnNotificationReceived(object sender, UiNotificationEventArgs e)
{
NotificationType = e.NotificationType;
Message = e.Message;
Expand All @@ -56,7 +57,11 @@ protected virtual void OnNotificationReceived(object sender, UiNotificationEvent

var okButtonText = Options?.OkButtonText?.Localize(StringLocalizerFactory);

SnackbarStack.Push(Message, GetSnackbarColor( e.NotificationType ), okButtonText);
await SnackbarStack.PushAsync(Message, Title, GetSnackbarColor( e.NotificationType ), (options) =>
{
options.CloseButtonIcon = IconName.Times;
options.ActionButtonText = okButtonText;
});
}

public virtual void Dispose()
Expand Down
Expand Up @@ -12,9 +12,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Blazorise" Version="0.9.2-rc4" />
<PackageReference Include="Blazorise.DataGrid" Version="0.9.2-rc4" />
<PackageReference Include="Blazorise.Snackbar" Version="0.9.2-rc4" />
<PackageReference Include="Blazorise" Version="0.9.3-preview2" />
<PackageReference Include="Blazorise.DataGrid" Version="0.9.3-preview2" />
<PackageReference Include="Blazorise.Snackbar" Version="0.9.3-preview2" />
</ItemGroup>

</Project>
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.2-rc4" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.2-rc4" />
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.3-preview2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.3-preview2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0" />
</ItemGroup>
Expand Down
Expand Up @@ -100,12 +100,5 @@ private void ConfigureAutoMapper(ServiceConfigurationContext context)
options.AddMaps<MyProjectNameBlazorModule>();
});
}

public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
context.ServiceProvider
.UseBootstrapProviders()
.UseFontAwesomeIcons();
}
}
}
Expand Up @@ -8,8 +8,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.2-rc4" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.2-rc4" />
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.3-preview2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.3-preview2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0" />
</ItemGroup>
Expand Down
Expand Up @@ -95,12 +95,5 @@ private void ConfigureAutoMapper(ServiceConfigurationContext context)
options.AddMaps<MyProjectNameBlazorHostModule>();
});
}

public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
context.ServiceProvider
.UseBootstrapProviders()
.UseFontAwesomeIcons();
}
}
}

0 comments on commit 869bc26

Please sign in to comment.