Introducing ReUI:Open-source UI components and apps built with React, Next.js and Tailwind CSS
Browse ReUI

KTThemeMode click behavior


Hello,

Can I suggest a small change in the KTThemeMode logic?

I'm using the event `kt.thememode.change` to grab user's choice and save it in the database.

But there is a scenario where this event is not triggered:

Imagine that:
- My system theme is 'dark'
- My current selection is theme 'dark'
- I'll try to change to 'System' (so I can control it through my system)
- There is no event trigger


if (mode !== currentMode) {
KTEventHandler.trigger(document.documentElement, 'kt.thememode.change', the);
}


It should be nice to trigger this event when I'm changing values.
Even from 'dark' to 'system' (assuming my system is dark)
Or from 'light' to 'system' (assuming my system is light)


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


Betting exchanges have revolutionized the sports betting industry by allowing bettors to bet against each other, rather than placing bets against a bookmaker. This shift provides more flexibility, as users can set their own odds and bet on both sides of a wager. With betting https://melbet-egypt.net/ exchanges, the focus is on finding value from the market and taking advantage of the fluctuations in odds. However, while they provide opportunities for profit, they also come with higher risks, as the market is less predictable compared to traditional sportsbooks.



Looking for a platform with a unique gambling atmosphere and incredible chances to win? 11winner is your perfect choice! We have a wide selection of slots, exciting live casinos and the best sports betting. Everything you need for an unforgettable experience is right in your pocket.
Plenty of games to suit every taste: from slots to live tables with real dealers.
Mobile app: play anytime, anywhere, no restrictions.
Generous bonuses and promotions: get bonuses that increase your chances of success.
High security: your comfort and safety is our top priority.
Join 11 Winner today and discover a world of fun, exciting bets and huge winnings!



If you’re exploring entertainment options beyond coding and UI discussions, check out 1win! 🎮 It’s a platform that combines fun and earnings with a great selection of casino games and sports betting options. Whether you’re relaxing after solving complex problems or just need a break, 1win offers an intuitive interface and smooth experience on both desktop and mobile. Perfect for switching modes and enjoying some downtime!



Hey there! When it comes to reliable platforms for online betting and gaming, the key is finding one that offers a smooth experience, security, and a variety of options. One that really stands out is pin up . It's a great choice for anyone looking for a user-friendly site with a lot of options, whether you're into casino games, slots, or sports betting like cricket and football. The platform also supports multiple languages and offers attractive bonuses for new users, making it perfect for players from different regions. Plus, their payment system is safe and convenient, and the customer support is always there when you need it. If you're looking for a solid platform, definitely give Pin-Up a try.



Hi,

Sorry for the late reply

In src/js/layout/theme-mode.js in the end of setMode function can you try to change:


if (mode !== currentMode) {
KTEventHandler.trigger(document.documentElement, "kt.thememode.change", the);
}


to:


KTEventHandler.trigger(document.documentElement, "kt.thememode.change", the);



Regards.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(