mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-11 20:00:29 +01:00
Further titlebar tweaks
This commit is contained in:
@@ -178,7 +178,7 @@ function HeaderSize({ className, ...props }: HeaderSizeProps) {
|
||||
className={classNames(
|
||||
className,
|
||||
'h-md pt-[1px] flex items-center w-full border-b',
|
||||
platform?.osType === 'Darwin' ? 'pl-20 pr-3' : 'pl-1',
|
||||
platform?.osType === 'Darwin' ? 'pl-20 pr-1' : 'pl-1',
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
|
||||
@@ -36,52 +36,52 @@ export const WorkspaceHeader = memo(function WorkspaceHeader({ className }: Prop
|
||||
<div className="pointer-events-none">
|
||||
<RecentRequestsDropdown />
|
||||
</div>
|
||||
<div className="flex-1 flex justify-end -mr-2 pointer-events-none">
|
||||
<div className="flex-1 flex items-center h-full justify-end pointer-events-none">
|
||||
<SettingsDropdown />
|
||||
{osInfo?.osType !== 'Darwin' && (
|
||||
<HStack className="ml-4" space={1} alignItems="center">
|
||||
<Button className="!text-gray-600 rounded-none" onClick={() => appWindow.minimize()}>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="currentColor" d="M14 8v1H3V8z" />
|
||||
</svg>
|
||||
</Button>
|
||||
<Button
|
||||
className="!text-gray-600 rounded-none"
|
||||
onClick={async () => {
|
||||
await appWindow.toggleMaximize();
|
||||
setMaximized(await appWindow.isMaximized());
|
||||
}}
|
||||
>
|
||||
{maximized ? (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="currentColor" d="M3 3v10h10V3zm9 9H4V4h8z" />
|
||||
</svg>
|
||||
) : (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="currentColor">
|
||||
<path d="M3 5v9h9V5zm8 8H4V6h7z" />
|
||||
<path fillRule="evenodd" d="M5 5h1V4h7v7h-1v1h2V3H5z" clipRule="evenodd" />
|
||||
</g>
|
||||
</svg>
|
||||
)}
|
||||
</Button>
|
||||
<Button
|
||||
color="custom"
|
||||
className="text-gray-600 rounded-none hocus:bg-red-200 hocus:text-gray-800"
|
||||
onClick={() => appWindow.close()}
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fillRule="evenodd"
|
||||
d="m7.116 8l-4.558 4.558l.884.884L8 8.884l4.558 4.558l.884-.884L8.884 8l4.558-4.558l-.884-.884L8 7.116L3.442 2.558l-.884.884z"
|
||||
clipRule="evenodd"
|
||||
/>
|
||||
</svg>
|
||||
</Button>
|
||||
</HStack>
|
||||
)}
|
||||
</div>
|
||||
{osInfo?.osType !== 'Darwin' && (
|
||||
<HStack className="ml-4" space={1} alignItems="center">
|
||||
<Button className="!text-gray-600 rounded-none" onClick={() => appWindow.minimize()}>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="currentColor" d="M14 8v1H3V8z" />
|
||||
</svg>
|
||||
</Button>
|
||||
<Button
|
||||
className="!text-gray-600 rounded-none"
|
||||
onClick={async () => {
|
||||
await appWindow.toggleMaximize();
|
||||
setMaximized(await appWindow.isMaximized());
|
||||
}}
|
||||
>
|
||||
{maximized ? (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="currentColor" d="M3 3v10h10V3zm9 9H4V4h8z" />
|
||||
</svg>
|
||||
) : (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="currentColor">
|
||||
<path d="M3 5v9h9V5zm8 8H4V6h7z" />
|
||||
<path fillRule="evenodd" d="M5 5h1V4h7v7h-1v1h2V3H5z" clipRule="evenodd" />
|
||||
</g>
|
||||
</svg>
|
||||
)}
|
||||
</Button>
|
||||
<Button
|
||||
color="custom"
|
||||
className="text-gray-600 rounded-none hocus:bg-red-200 hocus:text-gray-800"
|
||||
onClick={() => appWindow.close()}
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path
|
||||
fill="currentColor"
|
||||
fillRule="evenodd"
|
||||
d="m7.116 8l-4.558 4.558l.884.884L8 8.884l4.558 4.558l.884-.884L8.884 8l4.558-4.558l-.884-.884L8 7.116L3.442 2.558l-.884.884z"
|
||||
clipRule="evenodd"
|
||||
/>
|
||||
</svg>
|
||||
</Button>
|
||||
</HStack>
|
||||
)}
|
||||
</HStack>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user