From 52515e7df155399063b5467d4bd3091a33b229c9 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Tue, 23 Apr 2024 16:26:26 +0200 Subject: [PATCH] Added footer customization --- .../Core/Configuration/CoreConfiguration.cs | 20 +++++++ .../UI/Components/Partials/AppFooter.razor | 53 ++++++++++++++----- .../Core/UI/Views/Admin/Sys/Settings.razor | 2 +- 3 files changed, 62 insertions(+), 13 deletions(-) diff --git a/Moonlight/Core/Configuration/CoreConfiguration.cs b/Moonlight/Core/Configuration/CoreConfiguration.cs index 9c88188..07ba758 100644 --- a/Moonlight/Core/Configuration/CoreConfiguration.cs +++ b/Moonlight/Core/Configuration/CoreConfiguration.cs @@ -105,6 +105,26 @@ public class CoreConfiguration [JsonProperty("FileManager")] public FileManagerData FileManager { get; set; } = new(); + + [JsonProperty("Footer")] public FooterData Footer { get; set; } = new(); + } + + public class FooterData + { + [Description("The name of the copyright holder. If this is changed from the default value, an additional 'Software by' will be shown")] + public string CopyrightText { get; set; } = "Moonlight Panel"; + + [Description("The link of the copyright holders website. If this is changed from the default value, an additional 'Software by' will be shown")] + public string CopyrightLink { get; set; } = "https://moonlightpanel.xyz"; + + [Description("A link to your 'about us' page. Leave it empty if you want to hide it")] + public string AboutLink { get; set; } = "https://moonlightpanel.xyz"; + + [Description("A link to your 'privacy' page. Leave it empty if you want to hide it")] + public string PrivacyLink { get; set; } = "https://moonlightpanel.xyz"; + + [Description("A link to your 'imprint' page. Leave it empty if you want to hide it")] + public string ImprintLink { get; set; } = "https://moonlightpanel.xyz"; } public class FileManagerData diff --git a/Moonlight/Core/UI/Components/Partials/AppFooter.razor b/Moonlight/Core/UI/Components/Partials/AppFooter.razor index 0e66145..1c52c4b 100644 --- a/Moonlight/Core/UI/Components/Partials/AppFooter.razor +++ b/Moonlight/Core/UI/Components/Partials/AppFooter.razor @@ -1,19 +1,48 @@ -
-
+
@foreach (var prop in Properties) {