Fix toasts (#13)
This commit is contained in:
parent
d6f4628e1c
commit
9e9b519c25
|
@ -25,9 +25,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@if (InitToasts)
|
||||||
|
{
|
||||||
<BlazoredToasts Position="ToastPosition.BottomRight"
|
<BlazoredToasts Position="ToastPosition.BottomRight"
|
||||||
ShowProgressBar="true" />
|
ShowProgressBar="true" />
|
||||||
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
bool InitToasts = false;
|
||||||
async void PlayJobs() => await js.InvokeVoidAsync("Audio.play", "pelosijobs");
|
async void PlayJobs() => await js.InvokeVoidAsync("Audio.play", "pelosijobs");
|
||||||
|
|
||||||
|
protected override void OnAfterRender(bool firstRender)
|
||||||
|
{
|
||||||
|
base.OnAfterRender(firstRender);
|
||||||
|
if (!InitToasts) InitToasts = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
|
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
|
||||||
<link href="css/app.css" rel="stylesheet" />
|
<link href="css/app.css" rel="stylesheet" />
|
||||||
<link href="JobsJobsJobs.Client.styles.css" rel="stylesheet" />
|
<link href="JobsJobsJobs.Client.styles.css" rel="stylesheet" />
|
||||||
|
<link href="_content/Blazored.Toast/blazored-toast.min.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
using Blazored.Toast;
|
||||||
using JobsJobsJobs.Server.Data;
|
using JobsJobsJobs.Server.Data;
|
||||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
@ -43,6 +44,7 @@ namespace JobsJobsJobs.Server
|
||||||
services.AddRazorPages()
|
services.AddRazorPages()
|
||||||
.AddJsonOptions(options =>
|
.AddJsonOptions(options =>
|
||||||
options.JsonSerializerOptions.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb));
|
options.JsonSerializerOptions.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb));
|
||||||
|
services.AddBlazoredToast();
|
||||||
services.AddAuthentication(options =>
|
services.AddAuthentication(options =>
|
||||||
{
|
{
|
||||||
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
|
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user