From d3dfe1e4e24f94ac05acef2a9fd6eac0448aed42 Mon Sep 17 00:00:00 2001 From: altair823 Date: Tue, 5 May 2026 00:14:30 +0900 Subject: [PATCH] =?UTF-8?q?feat(v024):=20"Inkling=20=EC=A0=95=EB=B3=B4..."?= =?UTF-8?q?=20=ED=8A=B8=EB=A0=88=EC=9D=B4=20=EB=A9=94=EB=89=B4=20+=20nativ?= =?UTF-8?q?e=20About=20dialog=20(backlog=20#44)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dogfood 발견 #44 fix — 사용자가 설치된 버전 확인 path 부재 해소. - 트레이 메뉴 마지막 항목 (종료 직전): "Inkling 정보..." - 클릭 시 native dialog (showMessageBox): - title: Inkling 정보 - message: Inkling {version} - detail: 버전, Electron, Node, OS platform/release, 데이터 위치 - 버튼 3개: 확인 / 데이터 위치 열기 (shell.openPath) / 정보 복사 (clipboard) - 디버그 정보 노출로 사용자가 issue report 시 첨부 가능 Co-Authored-By: Claude Opus 4.7 (1M context) --- src/main/tray.ts | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/main/tray.ts b/src/main/tray.ts index 38af617..a78472f 100644 --- a/src/main/tray.ts +++ b/src/main/tray.ts @@ -1,6 +1,33 @@ import electron from 'electron'; import type { Tray as TrayType, MenuItemConstructorOptions } from 'electron'; -const { app, Tray, Menu, nativeImage } = electron; +import { platform, release } from 'node:os'; +const { app, Tray, Menu, nativeImage, dialog, shell, clipboard } = electron; + +function showAboutDialog(): void { + const version = app.getVersion(); + const electronVersion = process.versions.electron ?? '?'; + const nodeVersion = process.versions.node ?? '?'; + const profileDir = app.getPath('userData'); + const detail = [ + `버전: ${version}`, + `Electron: ${electronVersion}`, + `Node: ${nodeVersion}`, + `OS: ${platform()} ${release()}`, + `데이터 위치: ${profileDir}` + ].join('\n'); + void dialog.showMessageBox({ + type: 'info', + title: 'Inkling 정보', + message: `Inkling ${version}`, + detail, + buttons: ['확인', '데이터 위치 열기', '정보 복사'], + defaultId: 0, + cancelId: 0 + }).then((r) => { + if (r.response === 1) void shell.openPath(profileDir); + if (r.response === 2) clipboard.writeText(`Inkling ${version}\n${detail}`); + }); +} let tray: TrayType | null = null; let _showInbox: () => void = () => {}; @@ -60,6 +87,7 @@ function buildMenu() { } else { items.push({ type: 'separator' }); } + items.push({ label: 'Inkling 정보...', click: showAboutDialog }); items.push({ label: '종료', click: () => { app.isQuitting = true; app.quit(); } }); return Menu.buildFromTemplate(items); }