| ... | ... | @@ -8,6 +8,7 @@ import path from "node:path"; |
| 8 | 8 | import { app, BrowserWindow, dialog, ipcMain, Menu, nativeImage, protocol, shell } from "electron"; |
| 9 | 9 | import type { MenuItemConstructorOptions } from "electron"; |
| 10 | 10 | |
| 11 | import type { ContextMenuItem } from "@t3tools/contracts"; |
| 11 | 12 | import { showDesktopConfirmDialog } from "./confirmDialog"; |
| 12 | 13 | import { fixPath } from "./fixPath"; |
| 13 | 14 | |
| ... | ... | @@ -36,12 +37,6 @@ let restartTimer: ReturnType<typeof setTimeout> | null = null; |
| 36 | 37 | let isQuitting = false; |
| 37 | 38 | let desktopProtocolRegistered = false; |
| 38 | 39 | |
| 39 | | interface DesktopContextMenuItem { |
| 40 | | id: string; |
| 41 | | label: string; |
| 42 | | destructive?: boolean; |
| 43 | | } |
| 44 | | |
| 45 | 40 | let destructiveMenuIconCache: Electron.NativeImage | null | undefined; |
| 46 | 41 | |
| 47 | 42 | function getDestructiveMenuIcon(): Electron.NativeImage | undefined { |
| ... | ... | @@ -439,7 +434,7 @@ function registerIpcHandlers(): void { |
| 439 | 434 | CONTEXT_MENU_CHANNEL, |
| 440 | 435 | async ( |
| 441 | 436 | _event, |
| 442 | | items: DesktopContextMenuItem[], |
| 437 | items: ContextMenuItem[], |
| 443 | 438 | position?: { x: number; y: number }, |
| 444 | 439 | ) => { |
| 445 | 440 | const normalizedItems = items |