feat(app): support to edit screenshot area

- relocate or resize the area
- add anotations on the area
This commit is contained in:
2026-06-01 23:12:54 +08:00
parent ceecbb6af4
commit c45864e44c
9 changed files with 1234 additions and 133 deletions
+12 -5
View File
@@ -62,17 +62,24 @@ async function retryHotkey() {
}
async function onOverlayConfirm(rect: {
x: number
y: number
w: number
h: number
rect: {
x: number
y: number
w: number
h: number
}
annotations: Array<{
tool: string
color: string
points: Array<{ x: number; y: number }>
}>
}) {
// Optimistically swap back so the window does not visually lag the
// Go-side hide. If upload fails, the toast surfaces the reason.
mode.value = 'settings'
overlayPayload.value = null
try {
await ConfirmRegion(rect)
await ConfirmRegion(rect as any)
} catch {
/* Surfaced via upload:failure */
}