louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
60.01k stars 5.37k forks source link

Force Theme with environment variable #2847

Open cwchristerw opened 1 year ago

cwchristerw commented 1 year ago

⚠️ Please verify that this feature request has NOT been suggested before.

🏷️ Feature Request Type

UI Feature

🔖 Feature description

I would use UPTIME_KUMA_THEME environment variable to force theme to be always dark mode in dashboard.

✔️ Solution

Add environment variable that can force theme to be light, dark or auto.

❓ Alternatives

Add feature to save user's theme in to database.

📝 Additional Context

When user selects dark mode it doesn't save it to database and theme is always auto instead of dark. I use multiple computers and always reset cookies for privacy reasons.

cwchristerw commented 1 year ago

@louislam Would it be possible to implement this or alternative to next release?

CommanderStorm commented 1 year ago

@cwchristerw This feature request will likely not get anywhere as this would violate the project-style as documented here: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#project-styles

Settings should be configurable in the frontend. Environment variable is not encouraged, unless it is related to startup such as DATA_DIR

Given that this will likely never be done because of this, could you close this issue?

cwchristerw commented 1 year ago

@CommanderStorm Would it be OK, to suggest similar but with API? I'm looking to automate setting up Uptime Kuma with ansible and doing settings as automated as possible. I want to be able to force Dark Mode as default in my instance.

cwchristerw commented 1 year ago

Related to https://github.com/louislam/uptime-kuma/issues/1858