Files
webmail/app/app-lock.css
T
Linus Rath fb3c82eed5 feat: lock the app with a PIN, a passkey or Windows Hello, with mail out of memory and the local store closed
The lock is off by default, and an OS policy can require it and set the
timeout. It locks after a time without use counted across all windows and
tabs, on OS screen lock in the desktop app, and from Lock now.

Locking saves open composers, stops the outbox at its next message, closes
the store and stops its worker with every key, then reloads the page, so
nothing of the old page stays in reach. The new page holds the app back at a
Suspense boundary until someone unlocks. Pop-outs get no session while
locked, push notifications name nobody, and subjects leave plain storage.

One random lock key wraps each account's key as a layer. The PIN wraps the
lock key with PBKDF2 at 600,000 iterations, with a wait after wrong tries
that a reload doesn't reset. A passkey with PRF and the desktop's OS storage
wrap it too. Details and limits are in the decisions file.
2026-11-03 13:08:37 +01:00

10 lines
467 B
CSS

/*
* While the app lock is on and it isn't known yet to be unlocked, nothing under the
* lock screen shows, from the first frame. The inline script in app/(main)/layout.tsx
* sets the attribute before the first paint, and lib/app-lock/controller.ts takes it away.
* The window's drag strip stays: it shows the app's name and nothing else.
*/
html[data-app-locked] body > *:not([data-app-lock-overlay]):not(.window-title-bar) {
visibility: hidden !important;
}