diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts index 107371cc16ebe5782a99fad33f13488604fc2504..4fd4d0ba7d63e29913a2b22728703f8bd8dc7deb 100644 --- a/apps/desktop/src/main.ts +++ b/apps/desktop/src/main.ts @@ -8,6 +8,7 @@ import path from "node:path"; import { app, BrowserWindow, dialog, ipcMain, Menu, nativeImage, protocol, shell } from "electron"; import type { MenuItemConstructorOptions } from "electron"; +import type { ContextMenuItem } from "@t3tools/contracts"; import { showDesktopConfirmDialog } from "./confirmDialog"; import { fixPath } from "./fixPath"; @@ -36,12 +37,6 @@ let restartTimer: ReturnType | null = null; let isQuitting = false; let desktopProtocolRegistered = false; -interface DesktopContextMenuItem { - id: string; - label: string; - destructive?: boolean; -} - let destructiveMenuIconCache: Electron.NativeImage | null | undefined; function getDestructiveMenuIcon(): Electron.NativeImage | undefined { @@ -439,7 +434,7 @@ function registerIpcHandlers(): void { CONTEXT_MENU_CHANNEL, async ( _event, - items: DesktopContextMenuItem[], + items: ContextMenuItem[], position?: { x: number; y: number }, ) => { const normalizedItems = items