feat: add right-click and keyboard delete for batch table reference thumbnails

- Right-click on reference thumbnail shows context menu with 删除素材
- Delete/Backspace key removes the hovered reference cell
- Both actions only work within the batch table, on the specific thumbnail
This commit is contained in:
Codex
2026-09-19 14:36:20 +08:00
parent 5b9abfcc97
commit 67da7af88c
6 changed files with 596 additions and 333 deletions

10
fix_shared.py Normal file
View File

@@ -0,0 +1,10 @@
path = r"D:\yingce\open-ai-canvas-main\web\src\pages\canvas\shared.tsx"
with open(path, "r", encoding="utf-8") as f:
content = f.read()
content = content.replace(
'onUploadReference={() => {}} onConnectStart={() => {}}',
'onUploadReference={() => {}} onRemoveReference={() => {}} onConnectStart={() => {}}'
)
with open(path, "w", encoding="utf-8") as f:
f.write(content)
print("done")