-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
updated system theme: #102
base: main
Are you sure you want to change the base?
Conversation
can you check once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System theme selection is not solved by this PR. At least it doesnt work on macos
I think window.matchMedia("(prefers-color-scheme: dark)").matches is not working for Tauri app.
My be this is what the following plugin try to solve: https://github.com/wyhaya/tauri-plugin-theme
@@ -40,6 +40,7 @@ | |||
"date-fns": "^3.6.0", | |||
"lodash": "^4.17.21", | |||
"lucide-react": "^0.436.0", | |||
"next-themes": "^0.3.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dont need next-themes (I think this is for Nextjs app)
</div> | ||
</div> | ||
<span className="block w-full p-2 text-center font-normal">Dark</span> | ||
</FormLabel> | ||
</FormItem> | ||
|
||
<FormItem> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better use a half/half visualisation. something like this:
<FormItem> <FormLabel className="[&:has([data-state=checked])>div]:border-primary"> <FormControl> <RadioGroupItem value="system" className="sr-only" /> </FormControl> <div className="items-center rounded-md border-2 border-muted p-1 hover:border-accent"> <div className="flex rounded-sm"> <div className="w-1/2 space-y-2 rounded-l-sm bg-[#ecedef] p-2"> <div className="space-y-2 rounded-md bg-white p-2 shadow-sm"> <div className="h-2 w-[80px] rounded-lg bg-[#ecedef]" /> <div className="h-2 w-[100px] rounded-lg bg-[#ecedef]" /> </div> <div className="flex items-center space-x-2 rounded-md bg-white p-2 shadow-sm"> <div className="h-4 w-4 rounded-full bg-[#ecedef]" /> <div className="h-2 w-[100px] rounded-lg bg-[#ecedef]" /> </div> </div> <div className="w-1/2 space-y-2 rounded-r-sm bg-slate-950 p-2"> <div className="space-y-2 rounded-md bg-slate-800 p-2 shadow-sm"> <div className="h-2 w-[20px] rounded-lg bg-slate-400" /> <div className="h-2 w-[30px] rounded-lg bg-slate-400" /> </div> <div className="flex items-center space-x-2 rounded-md bg-slate-800 p-2 shadow-sm"> <div className="h-4 w-4 rounded-full bg-slate-400" /> <div className="h-2 w-[100px] rounded-lg bg-slate-400" /> </div> </div> </div> </div> <span className="block w-full p-2 text-center font-normal">System</span> </FormLabel> </FormItem>
// Define the types for themes | ||
type Theme = "light" | "dark" | "system"; | ||
|
||
export default function useTheme() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file should be removed as it's not used. Similar logic is already in settings-provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to resolve it
No description provided.