Fix toasts (#13)
This commit is contained in:
parent
d6f4628e1c
commit
9e9b519c25
|
@ -25,9 +25,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<BlazoredToasts Position="ToastPosition.BottomRight"
|
@if (InitToasts)
|
||||||
ShowProgressBar="true" />
|
{
|
||||||
|
<BlazoredToasts Position="ToastPosition.BottomRight"
|
||||||
|
ShowProgressBar="true" />
|
||||||
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
async void PlayJobs() => await js.InvokeVoidAsync("Audio.play", "pelosijobs");
|
bool InitToasts = false;
|
||||||
|
async void PlayJobs() => await js.InvokeVoidAsync("Audio.play", "pelosijobs");
|
||||||
|
|
||||||
|
protected override void OnAfterRender(bool firstRender)
|
||||||
|
{
|
||||||
|
base.OnAfterRender(firstRender);
|
||||||
|
if (!InitToasts) InitToasts = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,14 @@
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||||
<title>Jobs, Jobs, Jobs</title>
|
<title>Jobs, Jobs, Jobs</title>
|
||||||
<base href="/" />
|
<base href="/" />
|
||||||
<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