feat(v024): "Inkling 정보..." 트레이 메뉴 + native About dialog (backlog #44)

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) <noreply@anthropic.com>
This commit is contained in:
altair823
2026-05-05 00:14:30 +09:00
parent c87c248e89
commit d3dfe1e4e2

View File

@@ -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);
}