Fix toasts (#13)
This commit is contained in:
parent
d6f4628e1c
commit
9e9b519c25
|
@ -25,9 +25,19 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<BlazoredToasts Position="ToastPosition.BottomRight"
|
||||
ShowProgressBar="true" />
|
||||
@if (InitToasts)
|
||||
{
|
||||
<BlazoredToasts Position="ToastPosition.BottomRight"
|
||||
ShowProgressBar="true" />
|
||||
}
|
||||
|
||||
@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>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>Jobs, Jobs, Jobs</title>
|
||||
<base href="/" />
|
||||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="css/app.css" rel="stylesheet" />
|
||||
<link href="JobsJobsJobs.Client.styles.css" rel="stylesheet" />
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>Jobs, Jobs, Jobs</title>
|
||||
<base href="/" />
|
||||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="css/app.css" rel="stylesheet" />
|
||||
<link href="JobsJobsJobs.Client.styles.css" rel="stylesheet" />
|
||||
<link href="_content/Blazored.Toast/blazored-toast.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Blazored.Toast;
|
||||
using JobsJobsJobs.Server.Data;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
|
@ -43,6 +44,7 @@ namespace JobsJobsJobs.Server
|
|||
services.AddRazorPages()
|
||||
.AddJsonOptions(options =>
|
||||
options.JsonSerializerOptions.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb));
|
||||
services.AddBlazoredToast();
|
||||
services.AddAuthentication(options =>
|
||||
{
|
||||
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||
|
|
Loading…
Reference in New Issue
Block a user