feat(telemetry): tray menu '사용 로그 내보내기...' (#7 v0.2.3)

This commit is contained in:
altair823
2026-05-01 17:25:52 +09:00
parent 01447ddaad
commit 4213745dc7

View File

@@ -9,11 +9,11 @@ let _runBackup: () => void = () => {};
let _runExport: () => void = () => {};
let _runImport: () => void = () => {};
let _runSync: () => void = () => {};
let _runExportTelemetry: () => void = () => {};
let _todayCount = 0;
function buildMenu() {
const items: MenuItemConstructorOptions[] = [];
// F4-C: count > 0 시 비활성 라벨로 정체성 신호 노출. count = 0 시 메뉴를 자연스럽게 시작.
if (_todayCount > 0) {
items.push({ label: `오늘 ${_todayCount}번 잡아둠`, enabled: false });
items.push({ type: 'separator' });
@@ -25,6 +25,7 @@ function buildMenu() {
items.push({ label: '내보내기...', click: _runExport });
items.push({ label: '백업에서 복원...', click: _runImport });
items.push({ label: '지금 동기화', click: _runSync });
items.push({ label: '사용 로그 내보내기...', click: _runExportTelemetry });
if (app.isPackaged) {
const { openAtLogin } = app.getLoginItemSettings();
items.push({
@@ -52,7 +53,8 @@ export function createTray(
runBackup: () => void,
runExport: () => void,
runImport: () => void,
runSync: () => void
runSync: () => void,
runExportTelemetry: () => void
): TrayType {
_showInbox = showInbox;
_showCapture = showCapture;
@@ -60,6 +62,7 @@ export function createTray(
_runExport = runExport;
_runImport = runImport;
_runSync = runSync;
_runExportTelemetry = runExportTelemetry;
const icon = nativeImage.createEmpty();
tray = new Tray(icon);
tray.setToolTip(`Inkling — 오늘 ${_todayCount}`);