From 20f1b3d93f5ae26fc485a26c662fafb580e35835 Mon Sep 17 00:00:00 2001 From: Izaak Kuipers Date: Fri, 20 Oct 2023 21:40:09 +0200 Subject: [PATCH] Implement `UserData.acc.loginBackground` --- src/css/desktop/apps/exit.css | 1 + .../apps/settings/account/customWallpaper.css | 21 ++++++------------- .../Overlays/CustomLoginWallpaper.svelte | 2 +- src/ts/userlogic/themes/interface.ts | 1 + src/ts/userlogic/themes/main.ts | 4 ++++ 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/css/desktop/apps/exit.css b/src/css/desktop/apps/exit.css index 0728c847..5bb58ba0 100644 --- a/src/css/desktop/apps/exit.css +++ b/src/css/desktop/apps/exit.css @@ -14,6 +14,7 @@ window#Exit button.option { text-align: center; padding: 20px 20px; background-color: transparent; + box-shadow: none; } window#Exit button.option:hover { diff --git a/src/css/desktop/apps/settings/account/customWallpaper.css b/src/css/desktop/apps/settings/account/customWallpaper.css index a0e44918..469b1915 100644 --- a/src/css/desktop/apps/settings/account/customWallpaper.css +++ b/src/css/desktop/apps/settings/account/customWallpaper.css @@ -1,34 +1,25 @@ -window#SettingsApp window.overlay#customWallpaper div.customwallpaper-wrapper { +window#SettingsApp window.overlay div.customwallpaper-wrapper { display: flex; margin: 5px; } -window#SettingsApp - window.overlay#customWallpaper - div.customwallpaper-wrapper - div.field { +window#SettingsApp window.overlay div.customwallpaper-wrapper div.field { width: 100%; } -window#SettingsApp - window.overlay#customWallpaper - div.customwallpaper-wrapper - img { +window#SettingsApp window.overlay div.customwallpaper-wrapper img { height: 40px; width: 40px; margin-right: 10px; } -window#SettingsApp - window.overlay#customWallpaper - div.customwallpaper-wrapper - input { +window#SettingsApp window.overlay div.customwallpaper-wrapper input { width: 100%; margin: 5px 0; } window#SettingsApp - window.overlay#customWallpaper + window.overlay div.customwallpaper-wrapper div.field div.apply { @@ -36,7 +27,7 @@ window#SettingsApp } window#SettingsApp - window.overlay#customWallpaper + window.overlay div.customwallpaper-wrapper div.field div.apply diff --git a/src/lib/Apps/Settings/Pages/Account/Overlays/CustomLoginWallpaper.svelte b/src/lib/Apps/Settings/Pages/Account/Overlays/CustomLoginWallpaper.svelte index 255a7bc5..98cfc3a3 100644 --- a/src/lib/Apps/Settings/Pages/Account/Overlays/CustomLoginWallpaper.svelte +++ b/src/lib/Apps/Settings/Pages/Account/Overlays/CustomLoginWallpaper.svelte @@ -28,7 +28,7 @@ } function cancel() { - hideOverlay("customWallpaper", "SettingsApp"); + hideOverlay("customLoginWallpaper", "SettingsApp"); } async function checkImage(url): Promise { diff --git a/src/ts/userlogic/themes/interface.ts b/src/ts/userlogic/themes/interface.ts index 1fcefeb5..53ba3a46 100644 --- a/src/ts/userlogic/themes/interface.ts +++ b/src/ts/userlogic/themes/interface.ts @@ -8,6 +8,7 @@ export interface UserTheme { sharp: boolean; theme: string; wallpaper: string; + loginBackground: string; taskbarCentered: boolean; taskbarLabels: boolean; taskbarPosition: "vertical" | "" | "vertical-right" | string; diff --git a/src/ts/userlogic/themes/main.ts b/src/ts/userlogic/themes/main.ts index 356f1b57..2c5594bc 100644 --- a/src/ts/userlogic/themes/main.ts +++ b/src/ts/userlogic/themes/main.ts @@ -40,6 +40,9 @@ export function loadTheme(context: UserTheme) { udata.sh.window.centertb = !!context.titlebarCentered; udata.sh.taskbar.isLauncher = !!context.isLauncher; + if (context.loginBackground) + udata.acc.loginBackground = context.loginBackground; + return udata; }); } @@ -57,6 +60,7 @@ export function saveCurrentTheme(name: string) { sharp: udata.sh.desktop.sharp, theme: udata.sh.desktop.theme, wallpaper: udata.sh.desktop.wallpaper, + loginBackground: udata.acc.loginBackground || "img15", accent: udata.sh.desktop.accent, docked: udata.sh.taskbar.docked, taskbarCentered: udata.sh.taskbar.centered,