From 415257342cbd4296d5877f804630d062ffabc444 Mon Sep 17 00:00:00 2001 From: "kentin.brongniart" Date: Wed, 8 Jan 2025 15:58:09 +0100 Subject: [PATCH] recuperation push --- WF-WebAdmin/WF-WebAdmin/Pages/Accueil.cs | 4 +- WF-WebAdmin/WF-WebAdmin/Pages/Accueil.razor | 59 ++++++++++--------- WF-WebAdmin/WF-WebAdmin/Pages/_Layout.cshtml | 1 + WF-WebAdmin/WF-WebAdmin/Program.cs | 3 + WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj | 7 +++ WF-WebAdmin/WF-WebAdmin/_Imports.razor | 2 +- .../WF-WebAdmin/wwwroot/fake-dataQuote.json | 16 ++--- 7 files changed, 55 insertions(+), 37 deletions(-) diff --git a/WF-WebAdmin/WF-WebAdmin/Pages/Accueil.cs b/WF-WebAdmin/WF-WebAdmin/Pages/Accueil.cs index 6553676..d98f86e 100644 --- a/WF-WebAdmin/WF-WebAdmin/Pages/Accueil.cs +++ b/WF-WebAdmin/WF-WebAdmin/Pages/Accueil.cs @@ -1,4 +1,6 @@ -using Microsoft.AspNetCore.Components; +using Blazored.LocalStorage; +using Blazorise.DataGrid; +using Microsoft.AspNetCore.Components; using WF_WebAdmin.Model; diff --git a/WF-WebAdmin/WF-WebAdmin/Pages/Accueil.razor b/WF-WebAdmin/WF-WebAdmin/Pages/Accueil.razor index bba7495..e9f0d0b 100644 --- a/WF-WebAdmin/WF-WebAdmin/Pages/Accueil.razor +++ b/WF-WebAdmin/WF-WebAdmin/Pages/Accueil.razor @@ -5,35 +5,40 @@

Accueil

+

Sitation du jour

+ +@* +
+ +

Identifiant de la citation :@quote.Id

+

Citation:@quote.Content

+

Personnage : @quote.Charac

+

Source : @quote.TitleSrc

+

Langue : @quote.Langue

+

@quote.UserProposition a proposé cette citation

+ +
+*@ + + @if (quotes != null) { - - - - - - - - - - - - - - @foreach (var quote in quotes) - { - - - - - - - - - - } - -
IdContentCharactéreTitle SourceLikeLangueDate Source
@quote.Id@quote.Content@quote.Charac@quote.TitleSrc@quote.Like@quote.Langue@quote.DateSrc.ToShortDateString()
+

Citations non validées

+

Citations en attente de validation:

+ + @foreach (var quote in quotes) + { +
+ +

Identifiant de la citation :@quote.Id

+

Citation:@quote.Content

+

Personnage : @quote.Charac

+

Source : @quote.TitleSrc

+

Langue : @quote.Langue

+

@quote.UserProposition a proposé cette citation

+ +
+ } } \ No newline at end of file diff --git a/WF-WebAdmin/WF-WebAdmin/Pages/_Layout.cshtml b/WF-WebAdmin/WF-WebAdmin/Pages/_Layout.cshtml index dd71165..db114bc 100644 --- a/WF-WebAdmin/WF-WebAdmin/Pages/_Layout.cshtml +++ b/WF-WebAdmin/WF-WebAdmin/Pages/_Layout.cshtml @@ -28,5 +28,6 @@ + diff --git a/WF-WebAdmin/WF-WebAdmin/Program.cs b/WF-WebAdmin/WF-WebAdmin/Program.cs index cdcdbeb..77896c4 100644 --- a/WF-WebAdmin/WF-WebAdmin/Program.cs +++ b/WF-WebAdmin/WF-WebAdmin/Program.cs @@ -1,3 +1,4 @@ +using Blazored.LocalStorage; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Web; using WF_WebAdmin.Data; @@ -11,6 +12,8 @@ builder.Services.AddSingleton(); builder.Services.AddHttpClient(); +builder.Services.AddBlazoredLocalStorage(); + var app = builder.Build(); // Configure the HTTP request pipeline. diff --git a/WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj b/WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj index 9c94761..5eab720 100644 --- a/WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj +++ b/WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj @@ -7,4 +7,11 @@ WF_WebAdmin + + + + + + + diff --git a/WF-WebAdmin/WF-WebAdmin/_Imports.razor b/WF-WebAdmin/WF-WebAdmin/_Imports.razor index 5f99f58..d4da21d 100644 --- a/WF-WebAdmin/WF-WebAdmin/_Imports.razor +++ b/WF-WebAdmin/WF-WebAdmin/_Imports.razor @@ -7,4 +7,4 @@ @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.JSInterop @using WF_WebAdmin -@using WF_WebAdmin.Shared +@using WF_WebAdmin.Shared \ No newline at end of file diff --git a/WF-WebAdmin/WF-WebAdmin/wwwroot/fake-dataQuote.json b/WF-WebAdmin/WF-WebAdmin/wwwroot/fake-dataQuote.json index f38cd34..1378868 100644 --- a/WF-WebAdmin/WF-WebAdmin/wwwroot/fake-dataQuote.json +++ b/WF-WebAdmin/WF-WebAdmin/wwwroot/fake-dataQuote.json @@ -1,20 +1,20 @@ [ { "Id": 1, - "Content": "coucou", - "Charac": "moi", - "ImgPath": "img", - "TitleSrc": "G4", + "Content": "'Dans le monde il n’y a pas d’un côté le bien et le mal, il y a une part de lumière et d’ombre en chacun de nous. Ce qui compte c’est celle que l’on choisit de montrer dans nos actes, ça c’est ce que l’on est vraiment.'", + "Charac": "Sirius Black", + "ImgPath": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7", + "TitleSrc": "Harry Potter et L’ordre du Phoenix", "DateSrc": "2001-01-01", "Like": 20, "Langue": "fr" }, { "Id": 2, - "Content": "boujour", - "Charac": "toi", - "ImgPath": "img", - "TitleSrc": "G4", + "Content": "'Une autre citation'", + "Charac": "Un personnage", + "ImgPath": "https://tse2.mm.bing.net/th/id/OIP.zR4rzkK7q2wCcNwZd6jjegHaIC?w=163&h=180&c=7&r=0&o=5&pid=1.7", + "TitleSrc": "Un super film", "DateSrc": "2002-02-02", "Like": 0, "Langue": "fr"