Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status page - Auto theme does not work on custom domains #3294

Closed
2 tasks done
crystalcommunication opened this issue Jun 21, 2023 · 4 comments · Fixed by #3296
Closed
2 tasks done

Status page - Auto theme does not work on custom domains #3294

crystalcommunication opened this issue Jun 21, 2023 · 4 comments · Fixed by #3296
Labels
bug Something isn't working

Comments

@crystalcommunication
Copy link
Contributor

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

If you select the "Auto" theme for a status page and the page has a custom domain, the light theme is always used for the custom domain. The theme works as expected when accessing the status page through the main domain using the /status/example URI.

👟 Reproduction steps

  1. Make sure your browser is set to dark mode
  2. Configure a status page to use Auto theme and a custom domain
  3. View the status page using the custom domain

👀 Expected behavior

When the status page loads, it should be using the dark theme

😓 Actual Behavior

The status page uses the light theme

🐻 Uptime-Kuma Version

1.22.0-beta.0

💻 Operating System and Arch

Debian 11 x86_64

🌐 Browser

Firefox 102.11.0esr

🐋 Docker Version

No response

🟩 NodeJS Version

18.14.2

📝 Relevant log output

No response

@crystalcommunication crystalcommunication added the bug Something isn't working label Jun 21, 2023
@CommanderStorm
Copy link
Collaborator

Was this not fixed by #2870 in 1.22? Am I missing something?
cc: @chakflying

@chakflying
Copy link
Collaborator

I have not tested this exact case (custom domain) and I don't have one setup right now. Feel free to help investigate.

@CommanderStorm
Copy link
Collaborator

CommanderStorm commented Jun 21, 2023

@crystalcommunication
Copy link
Contributor Author

crystalcommunication commented Jun 21, 2023

I found the relevant code section. I don't fully understand what's going on here. It is clear, however, that the part of the script that detects if it's on auto and switches it to match the system setting only runs when the URI starts with /status/. https://github.com/louislam/uptime-kuma/blob/master/src/mixins/theme.js#L29-L46

EDIT: I figured it out and submitted a pull request to fix it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants