Skip to content

Conversation

@rmtsrc
Copy link
Contributor

@rmtsrc rmtsrc commented Jun 18, 2023

Currently by default it-tools is shown using the dark theme and does not change based on the current system dark mode setting.

I often find myself toggling the system light theme during the day and the dark mode at night. Most browsers, websites and my IDE all automatically update to reflect the system setting.

This PR switches over to useDark (from Vue.use), which takes into account your system theme settings (via the prefers-color-scheme CSS matcher). This PR also removes duplicate code in src/ui/theme/theme.store.ts.

Screencast.from.2023-06-18.09-26-58.webm

@vercel
Copy link

vercel bot commented Jun 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
it-tools ✅ Ready (Inspect) Visit Preview Jun 18, 2023 8:45am

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Owner

@CorentinTh CorentinTh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi !
Thank you for the improvement, that's indeed a nice improvement 🙏🏻
I planned to remove the theme store, the duplication of the dark mode boolean was a stupid thing

Great PR with the video 👌🏻

@CorentinTh CorentinTh enabled auto-merge (squash) June 18, 2023 08:56
@CorentinTh CorentinTh merged commit cf7b1f0 into CorentinTh:main Jun 18, 2023
@rmtsrc rmtsrc deleted the prefers-color-scheme branch June 18, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants