Fix Theme Switching Issue & Two Factor QR Code for dark mode #179
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
The theme switcher didn’t update component appearances instantly when the theme changed. When using only
appearance
fromuseAppearance
, components didn’t always receive the latest theme value from the hook.Additionally, some components (like Stripe) don’t need the
system
theme value. For example, when i implementing a Stripe theme that matches the site’s light or dark mode colors, i had to manually handlesystem
checks each time.To simplify this, I introduced
resolvedAppearance
in theuseAppearance
hook, it always returns eitherlight
ordark
, removing the need for extra logic.Also cleaned up the
useAppearance
hook by removing duplicate code and making it more efficient.Fix:
Also fixed for vue-starter-kit
Theme Switching Issue Demo
Screen.Recording.2025-10-07.222222.mp4
Before & After QR Code Visibility