Files
king 06af036f86 feat(project): PC tray notifier for mentions and assignments
Windows tray app (desktop/notifier, C# .NET Framework 4.8 WinForms,
single exe, no installer/admin) that shows the same big alert popup as
the web even when the browser is in the background: layered topmost
window that does not steal focus, blinking border, open/close actions,
sound, autostart toggle, DPAPI-encrypted token.

Server side (project_db migration 023):
- notifier_links / notifier_tokens (SHA-256 hashes only)
- device link flow: link/start -> browser approve at /project/notifier
  -> link/poll issues token once
- Bearer API for alerts/read/logout reusing _alerts_payload; token
  re-checks current user record and project permission each call
- /project/notifier page (approve, connected PCs, revoke, download)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:21:58 +09:00

30 lines
1.1 KiB
C#

using System;
using System.Threading;
using System.Windows.Forms;
namespace DbxNotifier
{
internal static class Program
{
[STAThread]
private static void Main(string[] args)
{
// 한 사용자 세션에 하나만 — 두 번 실행하면 안내만 하고 끝낸다.
using (var mutex = new Mutex(true, @"Local\DBXNotifier.SingleInstance", out bool created))
{
if (!created)
{
MessageBox.Show("DBX 알림이 이미 실행 중입니다.\n화면 오른쪽 아래 트레이의 종 아이콘을 확인하세요.",
"DBX 알림", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
bool autostart = Array.IndexOf(args, "--autostart") >= 0;
Application.Run(new TrayApp(autostart));
GC.KeepAlive(mutex);
}
}
}
}