h2oai / h2ogpt

Private chat with local GPT with document, images, video, etc. 100% private, Apache 2.0. Supports oLLaMa, Mixtral, llama.cpp, and more. Demo: https://gpt.h2o.ai/ https://codellama.h2o.ai/
http://h2o.ai
Apache License 2.0
10.94k stars 1.2k forks source link

Darkmode Issues #1343

Open bw-Deejee opened 5 months ago

bw-Deejee commented 5 months ago

I have several issues with darkmode.

When I've set my windows sytem color mode to "dark", h2oGPT seems to adapt this. Even though h2oGPT variable dark: bool = False is set, it starts up in dark mode. If I use --dark=True or set dark: bool = True is uses light-mode, which is super counter intuitive.

Setting my windows system color mode to "light" reverses that effect, at least making the naming now intuitive. So, it just seems as h2oGPT is expecting light mode as system default, and the variable dark is simply a switch to use the non-default.

This issue seems to prevent me from forcing light mode for all users as some might use light and some use dark mode as system default.

Furthermore: when working with --auth and having the login mask on first access. The Login page does not obey at all to the dark variable and instead always uses winows system color mode. This is very annoying and I can't seem to find a way to force a light mode in the login page.

pseudotensor commented 5 months ago

Yes, I've noticed similar things. I'm not js expert, I'll ask what others think.

@jefffohl Do you have any ideas? I have same issue in sense that my desktop sticks to dark first, while other machines stick to light first. While I can switch dark mode, I don't understand how the defaults are set.

js here: https://github.com/h2oai/h2ogpt/blob/8e5e73c151cc959e3ffc3c663721fb1e3067b72e/src/gradio_themes.py#L235-L242

starting state set here: https://github.com/h2oai/h2ogpt/blob/39565175bb230976eb1c146482ac8f1ec9b1bb43/src/gradio_runner.py#L5936-L5942

button control here: https://github.com/h2oai/h2ogpt/blob/39565175bb230976eb1c146482ac8f1ec9b1bb43/src/gradio_runner.py#L3846-L3853

pseudotensor commented 5 months ago

Related: https://github.com/h2oai/h2ogpt/issues/1303