agmmnn / tauri-controls

🚥 Native-looking window controls for Tauri 2. React, Solid, Vue, Svelte+Tailwind.
https://npmjs.com/package/tauri-controls
MIT License
581 stars 21 forks source link

[MacOS] Shows windows controls on macos when platform is not specified #13

Open Blakeinstein opened 10 months ago

Blakeinstein commented 10 months ago

I was trying to debug why Windows controls were showing up on my project, but trying to run the SolidJS example yields similar results. As seen in the image, the first title bar, which, as per the code, should auto-detect the platform <WindowTitlebar class="border">content</WindowTitlebar> , detects the platform as windows.

image

I am on an M1 Pro Macbook.

Additionally, in my own project, I also get an error regarding a 400 error from the OS plugin. Note: I have the exact same cargo.toml, tauri.conf.json, and package.json versions for the dependencies.

image

Checking tauri-plugin-os, the rust code has no kind handler...

agmmnn commented 9 months ago

Thanks for the issue. Releated to #14

Th3Whit3Wolf commented 2 months ago

I had the same probably but it was caused by the platform being undefined. I fixed this by adding this to src-tauri/capabilities/default.json

"os:allow-arch",
"os:allow-hostname",
"os:allow-os-type",