mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-13 12:13:42 +01:00
The strip, quiet encrypted rows, warning rows for refused handshakes, the encrypted card with named actions, trust at the first Decrypt, the toast with Undo and Reconnect, the pill's Decrypt everything switch, Settings' Decryption section, the Encrypted sidebar row, and two-step setup. Both body tabs read Body with a type badge; Info leads the request half with the timeline folded in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
888 B
TypeScript
20 lines
888 B
TypeScript
/** What decides whether setup is done, as the app last read it */
|
|
export interface SetupState {
|
|
/** The system proxy can be set on this platform, or null until read */
|
|
systemProxySupported: boolean | null;
|
|
/** The system proxy has been on at some point since this install */
|
|
systemProxyEverOn: boolean;
|
|
}
|
|
|
|
/**
|
|
* The first-run card shows while setup is incomplete: the system proxy never on since this
|
|
* install, where there is one. The certificate is not part of it: nothing needs it until
|
|
* something is decrypted, which asks for it then. Not while the system proxy is still being
|
|
* read, so the card does not flash. Once setup is done an empty list is the "no flows yet"
|
|
* state, after a Clear too.
|
|
*/
|
|
export function setupIncomplete(s: SetupState): boolean {
|
|
if (s.systemProxySupported == null) return false;
|
|
return s.systemProxySupported && !s.systemProxyEverOn;
|
|
}
|