aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/app.component.ts
diff options
context:
space:
mode:
authorAkash Keshav <112591754+domesticchores@users.noreply.github.com>2025-04-04 14:53:32 -0400
committerAkash Keshav <112591754+domesticchores@users.noreply.github.com>2025-04-04 14:53:32 -0400
commitb4a9cd9d540d42a61bee9045d41ada392305a8d5 (patch)
tree3cddb6389800788cb5d8b397cf21dbd40142be1b /ufund-ui/src/app/app.component.ts
parent8cdf84ae4a6765db8f462cc71e2685c1d3514f08 (diff)
downloadJellySolutions-b4a9cd9d540d42a61bee9045d41ada392305a8d5.tar.gz
JellySolutions-b4a9cd9d540d42a61bee9045d41ada392305a8d5.tar.bz2
JellySolutions-b4a9cd9d540d42a61bee9045d41ada392305a8d5.zip
add light/dark mode toggle, only homepage is fully functional. -ak
Diffstat (limited to 'ufund-ui/src/app/app.component.ts')
-rw-r--r--ufund-ui/src/app/app.component.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/ufund-ui/src/app/app.component.ts b/ufund-ui/src/app/app.component.ts
index bc0e71a..635061c 100644
--- a/ufund-ui/src/app/app.component.ts
+++ b/ufund-ui/src/app/app.component.ts
@@ -49,5 +49,11 @@ export class AppComponent implements OnInit {
location.reload()
}
+ toggleColorScheme() {
+ let newTheme = this.document.body.parentElement!.getAttribute("theme") == "light" ? "dark" : "light";
+ this.document.body.parentElement!.setAttribute("theme",newTheme);
+ console.log(newTheme, this.document.body.parentElement);
+ }
+
protected readonly userType = userType;
}