fix(startup): enforce keychain consent before credential access

Keep credential-store operations behind a per-process consent gate, prevent duplicate native grant requests, and defer legacy token migration until explicit consent. Harden the RTL/sidebar, custom window controls, bidi copy, and queue editor fixes.

Refs #17
This commit is contained in:
NimBold
2026-07-19 07:07:29 +03:30
parent f47eb7507f
commit 6e85c0842f
17 changed files with 221 additions and 79 deletions
+9 -2
View File
@@ -9,8 +9,15 @@ const fallback: PlatformInfo = {
portable: false
};
export const shouldUseCustomWindowControls = (os: string, userAgent: string): boolean =>
!userAgent.includes('Mac') && (os === 'windows' || os === 'linux' || os === 'unknown');
export const shouldUseCustomWindowControls = (os: string, userAgent: string): boolean => {
if (os === 'windows' || os === 'linux' || os === 'macos') return true;
if (os !== 'unknown') return false;
// Keep the custom titlebar visible while the native platform query is
// resolving. Mobile user agents are the only unknown targets that must not
// receive desktop window controls.
return !/Android|iPhone|iPad|iPod|Mobile/i.test(userAgent);
};
let cached: PlatformInfo | null = null;
let pending: Promise<PlatformInfo> | null = null;