fix: window controls, dragging, and text selection

- Add Tauri permissions for window minimize/maximize/close/drag
- Rewrite WindowControls with plain buttons + stopPropagation
  to prevent drag region from capturing button clicks
- Add data-tauri-drag-region to TopBar child containers
- Make OpenPylon text pointer-events-none and select-none
This commit is contained in:
Your Name
2026-02-15 21:19:24 +02:00
parent a226eabba4
commit 08fbeaa1b2
3 changed files with 45 additions and 29 deletions

View File

@@ -81,7 +81,7 @@ export function TopBar() {
style={{ borderBottom: isBoardView && board ? `2px solid ${board.color}` : '1px solid var(--border)' }}
>
{/* Left section */}
<div className="flex items-center gap-2">
<div data-tauri-drag-region className="flex items-center gap-2">
{isBoardView && (
<Tooltip>
<TooltipTrigger asChild>
@@ -104,7 +104,7 @@ export function TopBar() {
</div>
{/* Center section */}
<div className="flex flex-1 items-center justify-center">
<div data-tauri-drag-region className="flex flex-1 items-center justify-center select-none">
{isBoardView && board ? (
editing ? (
<input
@@ -128,7 +128,7 @@ export function TopBar() {
</button>
)
) : (
<span className="font-heading text-lg text-pylon-text">
<span className="pointer-events-none font-heading text-lg text-pylon-text">
OpenPylon
</span>
)}