Make application and logo configurable (#336)

* Adds settings for server name and logo

* Implements ApplicationLogo and replaces site name based on settings

* Refactors component for changing the company logo

* Removes unused variable

* Uses message instead of statusMessage

* Replaces favicon with logo if set
This commit is contained in:
Paco
2026-02-06 00:43:21 +00:00
committed by GitHub
parent d80c1e5b91
commit 965cbff8ff
27 changed files with 452 additions and 102 deletions
@@ -1,5 +1,6 @@
import type { ApplicationSettingsModel } from "~/prisma/client/models";
import prisma from "../db/database";
import type { Settings } from "../utils/types";
class ApplicationConfiguration {
// Reference to the currently selected application configuration
@@ -80,6 +81,20 @@ class ApplicationConfiguration {
return this.currentApplicationSettings[key];
}
async getSettings(): Promise<Settings> {
return {
store: {
showGamePanelTextDecoration: await applicationSettings.get(
"showGamePanelTextDecoration",
),
},
generalSettings: {
serverName: await applicationSettings.get("serverName"),
mLogoObjectId: await applicationSettings.get("mLogoObjectId"),
},
};
}
}
export const applicationSettings = new ApplicationConfiguration();
+10
View File
@@ -11,3 +11,13 @@ export type KeyOfType<T, V> = keyof {
type EnumDictionary<T extends string | symbol | number, U> = {
[K in T]: U;
};
export type Settings = {
store: {
showGamePanelTextDecoration: boolean;
};
generalSettings: {
serverName: string;
mLogoObjectId: string | null;
};
};