Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
Implement UserData.acc.loginBackground
Browse files Browse the repository at this point in the history
  • Loading branch information
IzKuipers committed Oct 20, 2023
1 parent de88a13 commit 20f1b3d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
1 change: 1 addition & 0 deletions src/css/desktop/apps/exit.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
21 changes: 6 additions & 15 deletions src/css/desktop/apps/settings/account/customWallpaper.css
Original file line number Diff line number Diff line change
@@ -1,42 +1,33 @@
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 {
display: flex;
}

window#SettingsApp
window.overlay#customWallpaper
window.overlay
div.customwallpaper-wrapper
div.field
div.apply
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}
function cancel() {
hideOverlay("customWallpaper", "SettingsApp");
hideOverlay("customLoginWallpaper", "SettingsApp");
}
async function checkImage(url): Promise<boolean> {
Expand Down
1 change: 1 addition & 0 deletions src/ts/userlogic/themes/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export interface UserTheme {
sharp: boolean;
theme: string;
wallpaper: string;
loginBackground: string;
taskbarCentered: boolean;
taskbarLabels: boolean;
taskbarPosition: "vertical" | "" | "vertical-right" | string;
Expand Down
4 changes: 4 additions & 0 deletions src/ts/userlogic/themes/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
}
Expand All @@ -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,
Expand Down

0 comments on commit 20f1b3d

Please sign in to comment.