From 53e5a0ac25b79bacba0f5437b5fd4203c1654563 Mon Sep 17 00:00:00 2001 From: Tea Date: Tue, 16 Apr 2024 18:51:22 +0200 Subject: [PATCH] closes #7 Global message supports markdown using commonmark notation global message is now input using a TextArea so multiple lines can be used --- PizzaBot/Components/GlobalMessages.razor | 13 +++++++++++-- PizzaBot/Components/Pages/Admin.razor | 2 +- PizzaBot/PizzaBot.csproj | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/PizzaBot/Components/GlobalMessages.razor b/PizzaBot/Components/GlobalMessages.razor index eea9d0c..0e79a2e 100644 --- a/PizzaBot/Components/GlobalMessages.razor +++ b/PizzaBot/Components/GlobalMessages.razor @@ -7,10 +7,19 @@ } @if (GlobalStuffService.Message.Length >= 2) { -

@GlobalStuffService.Message

- +
@((MarkupString)Markdig.Markdown.ToHtml(GlobalStuffService.Message))
} + + @code{ protected override void OnInitialized() { diff --git a/PizzaBot/Components/Pages/Admin.razor b/PizzaBot/Components/Pages/Admin.razor index 88368f3..85498d0 100644 --- a/PizzaBot/Components/Pages/Admin.razor +++ b/PizzaBot/Components/Pages/Admin.razor @@ -25,7 +25,7 @@

Global Message

- + diff --git a/PizzaBot/PizzaBot.csproj b/PizzaBot/PizzaBot.csproj index 56f8723..9e7bfbe 100644 --- a/PizzaBot/PizzaBot.csproj +++ b/PizzaBot/PizzaBot.csproj @@ -15,6 +15,7 @@ +