From 3bff4241d67c857f9d2649c1440689058b3c6ba9 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 9 Sep 2026 12:43:39 +0200 Subject: [PATCH] fix: add visible drag-handle icon (3x3 dots) in bottom-right corner - ui.tsx: decorative SVG drag indicator (pointerEvents:none) like old plugin - uses --figma-color-icon-secondary + opacity 0.4, fixed bottom/right 3px - Fragment wrapper; real drag still handled by useWindowResize handle --- src/ui.tsx | 68 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 22 deletions(-) diff --git a/src/ui.tsx b/src/ui.tsx index c9f0f2c..cc77efc 100644 --- a/src/ui.tsx +++ b/src/ui.tsx @@ -10,7 +10,7 @@ import { useWindowResize } from '@create-figma-plugin/ui' import { emit } from '@create-figma-plugin/utilities' -import { h } from 'preact' +import { h, Fragment } from 'preact' import { useState } from 'preact/hooks' const MIN_WINDOW_SIZE = { width: 320, height: 200 } @@ -39,33 +39,57 @@ function Plugin () { currentWindowSize.height >= MAX_WINDOW_SIZE.height return ( - -
- + +
+ + {isMaximized ? : } + +
+
- {isMaximized ? : } - -
+ Hello, Figma ✦ + + AI assistant (MVP) — bootstrap + + + {currentWindowSize.width} × {currentWindowSize.height} + +
+
+ {/* Декоративная иконка drag-хендла в правом нижнем углу (как в старом плагине). + pointerEvents:none — сам drag ловит невидимый div от useWindowResize. */} - + ) }