This is my implementation component :
"use client"
import { appWindow } from '@tauri-apps/api/window'
import Image from 'next/image'
const Toolbar = () => {
return (
<div className="flex justify-end bg-gray-800 p-2" data-tauri-drag-region>
<button className="p-2 hover:bg-yellow-600" onClick={() => appWindow.minimize()}>
<Image src="https://api.iconify.design/mdi:window-minimize.svg"
alt="minimize"
width={20}
height={20}
/>
</button>
<button className="p-2 hover:bg-green-600" onClick={()=>appWindow.toggleMaximize()}>
<Image
src="https://api.iconify.design/mdi:window-maximize.svg"
alt="maximize"
width={20}
height={20}
/>
</button>
<button className="p-2 hover:bg-red-700" onClick={() => appWindow.close()}>
<Image src="https://api.iconify.design/mdi:close.svg" alt="close" width={20}
height={20}/>
</button>
</div>
);
};
export default Toolbar
it works completely fine as expected when I assign false to
tauri.conf.json
....
"windows": [
{
"fullscreen": false,
.....
}]
....
but when its set to true the other two buttons (minimize and close) works as expected but the toggleMaximize button just doesn't do anything.