mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-16 16:20:04 +00:00
Adjust theme preview message to include theme & mode
This commit is contained in:
@@ -5,6 +5,7 @@ import {themes} from "Frontend/theming/themes";
|
|||||||
import {Theme} from "Frontend/theming/theme";
|
import {Theme} from "Frontend/theming/theme";
|
||||||
import ThemePreview from "Frontend/components/theming/ThemePreview";
|
import ThemePreview from "Frontend/components/theming/ThemePreview";
|
||||||
import {UserPreferencesEndpoint} from "Frontend/generated/endpoints";
|
import {UserPreferencesEndpoint} from "Frontend/generated/endpoints";
|
||||||
|
import {toTitleCase} from "Frontend/util/utils";
|
||||||
|
|
||||||
export function ThemeSelector() {
|
export function ThemeSelector() {
|
||||||
|
|
||||||
@@ -56,7 +57,9 @@ export function ThemeSelector() {
|
|||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<p className="text-2xl font-semibold mt-8">Preview</p>
|
<p className="text-2xl font-semibold mt-8">Preview for theme
|
||||||
|
"{toTitleCase(theme!.replaceAll("-", " "))}"
|
||||||
|
</p>
|
||||||
<Divider/>
|
<Divider/>
|
||||||
<div className="flex flex-row gap-8 items-baseline">
|
<div className="flex flex-row gap-8 items-baseline">
|
||||||
<div className="flex flex-row gap-4">
|
<div className="flex flex-row gap-4">
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ export function roleToRoleName(role: string) {
|
|||||||
return role.charAt(0).toUpperCase() + role.slice(1);
|
return role.charAt(0).toUpperCase() + role.slice(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function toTitleCase(str: string) {
|
||||||
|
return str.toLowerCase().split(' ').map((word: string) => {
|
||||||
|
return (word.charAt(0).toUpperCase() + word.slice(1));
|
||||||
|
}).join(' ');
|
||||||
|
}
|
||||||
|
|
||||||
export function roleToColor(role: string) {
|
export function roleToColor(role: string) {
|
||||||
switch (role) {
|
switch (role) {
|
||||||
case "ROLE_SUPERADMIN":
|
case "ROLE_SUPERADMIN":
|
||||||
|
|||||||
Reference in New Issue
Block a user