Add Outlook unread-mail widget with device-code login

- outlook-auth.js: one-time device-code flow against Microsoft login;
  stores the refresh token in the outlook-tokens compose volume
- update-outlook.js: per-minute cron fetching the unread count and the
  latest unread messages via Microsoft Graph; caches access tokens and
  persists rotated refresh tokens
- Widget is hidden until the mailbox is actually authorized, so it
  stays out of sight while (admin) consent is pending
- New external card for Outlook (Office 365) with the official icon
- compose: pass OUTLOOK_CLIENT_ID/OUTLOOK_TENANT/GITEA_TOKEN from .env
- README: Entra ID app registration steps and the tenant-ID hint for
  directories not resolvable via the organizations endpoint
This commit is contained in:
2026-09-04 17:38:17 +02:00
parent c15cfc51a9
commit dfe246b7ca
12 changed files with 564 additions and 6 deletions
+12 -3
View File
@@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="color-scheme" content="dark" />
<title>Homelab Dashboard</title>
<title>GG36</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
@@ -21,8 +21,7 @@
<div class="brand">
<div class="logo-dot" aria-hidden="true"></div>
<div class="brand-text">
<h1>Homelab</h1>
<p class="subtitle">All your services, one place.</p>
<h1>GG36</h1>
</div>
</div>
<div class="top-right">
@@ -62,6 +61,16 @@
</div>
</article>
<article class="widget widget-outlook" id="widget-outlook" hidden>
<div class="widget-head">
<div class="widget-icon" aria-hidden="true">✉️</div>
<span class="widget-title">Outlook</span>
</div>
<div class="widget-body" id="outlook-mail">
<p class="widget-loading">Loading…</p>
</div>
</article>
<article class="widget widget-git" id="widget-git">
<div class="widget-head">
<div class="widget-icon" aria-hidden="true">🐙</div>