• I’d like to know if there is a way to prevent it from automatically switching to dark mode when the phone is set to dark mode?

    Thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Yani

    (@yaniiliev)

    Thank you for your thoughtful question. At the moment, our plugin automatically detects and switches the theme based on your phone’s dark mode setting. Do you want to control this just for yourself, all users, or per user? If it is just for yourself, you can edit src/index.js:

    window
        .matchMedia("(prefers-color-scheme: dark)")
        .addEventListener("change", ({ matches: isDark }) => {
            //nocturne.theme.value = isDark ? "dark" : "light";
            nocturne.theme.value = 'light'; // change to dark, for dark-only mode
            nocturne.setPreference();
    });
    Thread Starter luisteixeira00

    (@luisteixeira00)

    Hello, thanks for your help.

    I don’t want it to switch to dark mode automatically for any user, I want the light mode to be the default even if they’re using dark mode in their phones. The only way to activate dark mode would be the toggle.

    Can you help me with this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.