From 7098530cf40303e0d6a1a1e24d5c80794755ed5f Mon Sep 17 00:00:00 2001 From: LD-Reborn Date: Sun, 30 Nov 2025 14:51:53 +0100 Subject: [PATCH] Made app name customizable --- Resources/SharedResources.de.resx | 2 +- Resources/SharedResources.en.resx | 2 +- Views/Home/Dashboard.cshtml | 3 ++- Views/Shared/_Layout.cshtml | 11 +++++++---- appsettings.json | 1 + 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Resources/SharedResources.de.resx b/Resources/SharedResources.de.resx index f9e7ed0..8ad3357 100644 --- a/Resources/SharedResources.de.resx +++ b/Resources/SharedResources.de.resx @@ -1,7 +1,7 @@ - Willkommen bei OneForMe + Willkommen bei {0} Angemeldet als diff --git a/Resources/SharedResources.en.resx b/Resources/SharedResources.en.resx index 913906c..11adba4 100644 --- a/Resources/SharedResources.en.resx +++ b/Resources/SharedResources.en.resx @@ -1,7 +1,7 @@ - Welcome to OneForMe + Welcome to {0} Logged in as diff --git a/Views/Home/Dashboard.cshtml b/Views/Home/Dashboard.cshtml index 97be75e..1b8bd72 100644 --- a/Views/Home/Dashboard.cshtml +++ b/Views/Home/Dashboard.cshtml @@ -1,6 +1,7 @@ @using Microsoft.AspNetCore.Localization @using OneForMe.Services @inject LocalizationService Localizer +@inject IConfiguration Configuration @model DashboardViewModel @{ @@ -10,7 +11,7 @@
-

@Localizer.Get("Welcome")

+

@Localizer["Welcome", Configuration["AppName"] ?? "OneForMe"]

diff --git a/Views/Shared/_Layout.cshtml b/Views/Shared/_Layout.cshtml index 1cef614..ed25d20 100644 --- a/Views/Shared/_Layout.cshtml +++ b/Views/Shared/_Layout.cshtml @@ -1,9 +1,12 @@ - +@using Microsoft.Extensions.Configuration +@inject IConfiguration Configuration + + - @ViewData["Title"] - OneForMe + @ViewData["Title"] - @(Configuration["AppName"] ?? "OneForMe") @@ -13,7 +16,7 @@