|
|
|
@ -1,42 +1,42 @@
|
|
|
|
|
using Blazorise.DataGrid;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
using Microsoft.Extensions.Localization;
|
|
|
|
|
using System.Security.Claims;
|
|
|
|
|
using WF_WebAdmin.Model;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace WF_WebAdmin.Pages
|
|
|
|
|
{
|
|
|
|
|
public partial class Accueil
|
|
|
|
|
{
|
|
|
|
|
private Quote[] Dailyquote;
|
|
|
|
|
[Inject]
|
|
|
|
|
public ILogger<Accueil> Logger { get; set; }
|
|
|
|
|
|
|
|
|
|
[Inject]
|
|
|
|
|
public HttpClient Http { get; set; }
|
|
|
|
|
|
|
|
|
|
[Inject]
|
|
|
|
|
public NavigationManager NavigationManager { get; set; }
|
|
|
|
|
|
|
|
|
|
[Inject]
|
|
|
|
|
public IStringLocalizer<Accueil> Localizer { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This method is called during the initialization of the Blazor component.
|
|
|
|
|
/// It is asynchronous and is used to load data or perform actions before the component is rendered.
|
|
|
|
|
/// </summary>
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
|
{
|
|
|
|
|
Dailyquote = await Http.GetFromJsonAsync<Quote[]>($"{NavigationManager.BaseUri}fake-dataDailyQuote.json");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
private void RandomDailyquote()
|
|
|
|
|
{
|
|
|
|
|
//fonction a compléter
|
|
|
|
|
LoggerSaveStub.Log(Logger, LogLevel.Information, "Random change of quote of the day");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
using Blazorise.DataGrid;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
using Microsoft.Extensions.Localization;
|
|
|
|
|
using System.Security.Claims;
|
|
|
|
|
using WF_WebAdmin.Model;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace WF_WebAdmin.Pages
|
|
|
|
|
{
|
|
|
|
|
public partial class Accueil
|
|
|
|
|
{
|
|
|
|
|
private Quote[]? Dailyquote;
|
|
|
|
|
[Inject]
|
|
|
|
|
public ILogger<Accueil>? Logger { get; set; }
|
|
|
|
|
|
|
|
|
|
[Inject]
|
|
|
|
|
public HttpClient? Http { get; set; }
|
|
|
|
|
|
|
|
|
|
[Inject]
|
|
|
|
|
public NavigationManager? NavigationManager { get; set; }
|
|
|
|
|
|
|
|
|
|
[Inject]
|
|
|
|
|
public IStringLocalizer<Accueil>? Localizer { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This method is called during the initialization of the Blazor component.
|
|
|
|
|
/// It is asynchronous and is used to load data or perform actions before the component is rendered.
|
|
|
|
|
/// </summary>
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
|
{
|
|
|
|
|
Dailyquote = await Http.GetFromJsonAsync<Quote[]>($"{NavigationManager.BaseUri}fake-dataDailyQuote.json");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
private void RandomDailyquote()
|
|
|
|
|
{
|
|
|
|
|
//fonction a compléter
|
|
|
|
|
LoggerSaveStub.Log(Logger, LogLevel.Information, "Random change of quote of the day");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|