Dark mode by default? #2220
Replies: 9 comments 9 replies
-
If I'm correct this is a per user setting stored within local storage of the browser. I do not think that this is possible. But i haven't checked thoroughly. |
Beta Was this translation helpful? Give feedback.
-
yes, you're right. It's a "per user setting". A "force" to dark would be nice :-) |
Beta Was this translation helpful? Give feedback.
-
Before I can help you with that problem we need to clarify something. Now that we know that this change has to be made in the client, locate the folder containing the webvault. |
Beta Was this translation helpful? Give feedback.
-
Hi @Masgalor. Indeed it's 1.23.1 - I messed that up... |
Beta Was this translation helpful? Give feedback.
-
You can do this automatically when using containers by creating a startup script. Create a script in either #!/usr/bin/env sh
sed -i 's#class="theme_light"#class="theme_dark"#' /web-vault/index.html
sed -i 's#class="theme_light"#class="theme_dark"#' /web-vault/sso-connector.html |
Beta Was this translation helpful? Give feedback.
-
@Fmstrat you're running this script in your docker-container? Doesn't work for me... ´´´start.sh: 4: Bad substitution´´´ |
Beta Was this translation helpful? Give feedback.
-
It seems like to get this working on current version (at least on the login page) this worked for me:
Inside the docker-compose.yml:
In case this changes I found the correct string via a grep from inside the docker container:
|
Beta Was this translation helpful? Give feedback.
-
Does this still work? It would be great to have just only dark mode everywhere because my eyes are strained very easily using dark mode and since the browsers i tend to use across devices don't always keep the settings stored locally it would be great to have something server side that i will know regardless of what device i open it on it will be in dark mode. Thanks. |
Beta Was this translation helpful? Give feedback.
-
The script for 1.33.0: #!/bin/sh
# https://github.com/bitwarden/clients/blob/web-v2025.1.1/apps/web/src/index.html#L2
sed -i 's/theme_light/theme_dark/g' /web-vault/*.html
# https://github.com/bitwarden/clients/blob/web-v2025.1.1/apps/web/src/app/core/core.module.ts#L226-L227
sed -i 's/.Light),deps:/.Dark),deps:/g' /web-vault/app/main.*.js |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm running Vaultwarden 2.25.0.
Is it possible, to get the dark mode by default?
Thanks,
Tom
Beta Was this translation helpful? Give feedback.
All reactions