feat: relaunch button in right panel + drag-resize window
- package.json: add relaunchButtons (runAI) for right-panel shortcut - main.ts: setRelaunchData + RESIZE_WINDOW handler (figma.ui.resize) - ui.tsx: useWindowResize native drag handle + expand/collapse toggle - .gitignore: exclude _reference/ (temp old-plugin copy) - IDEA.md: commit+push to Gitea is mandatory workflow
This commit is contained in:
1 parent
4507162f42
commit
6c7be98a82
6 files changed
+89
-8
No files matched your search
+10
-1
@@ -1,5 +1,14 @@
|
||||
import { showUI } from '@create-figma-plugin/utilities'
|
||||
import { emit, on, showUI } from '@create-figma-plugin/utilities'
|
||||
|
||||
export default function () {
|
||||
// Глобальный ярлык relaunch в правой панели Figma (команда runAI из manifest.json)
|
||||
figma.root.setRelaunchData({ runAI: '' })
|
||||
|
||||
// Ресайз окна плагина (drag за угол в UI -> useWindowResize -> RESIZE_WINDOW)
|
||||
on('RESIZE_WINDOW', function (windowSize: { width: number; height: number }) {
|
||||
const { width, height } = windowSize
|
||||
figma.ui.resize(width, height)
|
||||
})
|
||||
|
||||
showUI({ width: 320, height: 200, themeColors: true })
|
||||
}
|
||||
Reference in new issue
Block a user