Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Add popup open heartbeat, refactor background.ts (#1131)
Leendert de Borst1138b16daab3
diff --git a/apps/browser-extension/src/entrypoints/background.ts b/apps/browser-extension/src/entrypoints/background.tsindex a415108b6..ee090643a 100644--- a/apps/browser-extension/src/entrypoints/background.ts+++ b/apps/browser-extension/src/entrypoints/background.ts@@ -1,24 +1,16 @@import { onMessage, sendMessage } from "webext-bridge/background";+import { handleResetAutoLockTimer, handlePopupHeartbeat, handleSetAutoLockTimeout } from '@/entrypoints/background/AutolockTimeoutHandler';+import { handleClipboardCopied, handleCancelClipboardClear, handleGetClipboardClearTimeout, handleSetClipboardClearTimeout, handleGetClipboardCountdownState } from '@/entrypoints/background/ClipboardClearHandler';import { setupContextMenus } from '@/entrypoints/background/ContextMenu';import { handleOpenPopup, handlePopupWithCredential, handleToggleContextMenu } from '@/entrypoints/background/PopupMessageHandler';import { handleCheckAuthStatus, handleClearPersistedFormValues, handleClearVault, handleCreateIdentity, handleGetCredentials, handleGetDefaultEmailDomain, handleGetDefaultIdentitySettings, handleGetEncryptionKey, handleGetEncryptionKeyDerivationParams, handleGetPasswordSettings, handleGetPersistedFormValues, handleGetVault, handlePersistFormValues, handleStoreEncryptionKey, handleStoreEncryptionKeyDerivationParams, handleStoreVault, handleSyncVault, handleUploadVault } from '@/entrypoints/background/VaultMessageHandler';-import { GLOBAL_CONTEXT_MENU_ENABLED_KEY, CLIPBOARD_CLEAR_TIMEOUT_KEY, AUTO_LOCK_TIMEOUT_KEY } from '@/utils/Constants';+import { GLOBAL_CONTEXT_MENU_ENABLED_KEY } from '@/utils/Constants';import type { EncryptionKeyDerivationParams } from '@/utils/dist/shared/models/metadata';import { defineBackground, storage, browser } from '#imports';-let clipboardClearTimer: NodeJS.Timeout | null = null;-let countdownInterval: NodeJS.Timeout | null = null;-let remainingTime = 0;-let currentCountdownId = 0;-let totalCountdownTime = 0;-let countdownStartTime = 0;-let offscreenDocumentCreated = false;--let autoLockTimer: NodeJS.Timeout | null = null;-export default defineBackground({/*** This is the main entry point for the background script.@@ -64,8 +56,7 @@ export default defineBackground({// Auto-lock management messagesonMessage('RESET_AUTO_LOCK_TIMER', () => handleResetAutoLockTimer());onMessage('SET_AUTO_LOCK_TIMEOUT', ({ data }) => handleSetAutoLockTimeout(data as number));- onMessage('POPUP_OPENED', () => handlePopupOpened());- onMessage('POPUP_CLOSED', () => handlePopupClosed());+ onMessage('POPUP_HEARTBEAT', () => handlePopupHeartbeat());// Handle clipboard copied from context menuonMessage('CLIPBOARD_COPIED_FROM_CONTEXT', () => handleClipboardCopied());@@ -114,285 +105,3 @@ function getActiveElementIdentifier() : string {}return '';}--/**- * Create offscreen document if it doesn't exist.- */-async function createOffscreenDocument(): Promise<void> {- if (offscreenDocumentCreated) {- return;- }-- try {- // Check if chrome.offscreen API is available (Chrome 109+)- if (!chrome.offscreen) {- console.warn('[CLIPBOARD] Offscreen API not available, falling back to direct clipboard access');- return;- }-- // Check if offscreen document already exists- if (chrome.runtime.getContexts) {- const existingContexts = await chrome.runtime.getContexts({- contextTypes: ['OFFSCREEN_DOCUMENT'],- documentUrls: [chrome.runtime.getURL('offscreen.html')]- });-- if (existingContexts.length > 0) {- offscreenDocumentCreated = true;- return;- }- }-- // Create offscreen document- await chrome.offscreen.createDocument({- url: 'offscreen.html',- reasons: [chrome.offscreen.Reason.CLIPBOARD],- justification: 'Clear clipboard after timeout for security'- });-- offscreenDocumentCreated = true;- } catch (error) {- console.error('[CLIPBOARD] Failed to create offscreen document:', error);- offscreenDocumentCreated = false;- }-}--/**- * Clear clipboard using offscreen document or fallback method.- */-async function clearClipboardContent(): Promise<void> {- if (import.meta.env.CHROME || import.meta.env.EDGE) {- /*- * Chrome and Edge use mv3 and do not have direct access to clipboard- * so we use an offscreen document to clear the clipboard.- */- await createOffscreenDocument();-- // Send message to offscreen document to clear clipboard- const response = await chrome.runtime.sendMessage({ type: 'CLEAR_CLIPBOARD' });-- if (response?.success) {- console.info('[CLIPBOARD] Clipboard cleared via offscreen document');- } else {- throw new Error(response?.message || 'Failed to clear clipboard via offscreen');- }- } else {- // Firefox and Safari use mv2 and can use direct clipboard access.- await navigator.clipboard.writeText('');- }-}--/**- * Handle clipboard copied event - starts countdown and timer to clear clipboard.- */-async function handleClipboardCopied() : Promise<void> {- const timeout = await storage.getItem(CLIPBOARD_CLEAR_TIMEOUT_KEY) as number ?? 10;-- // Clear any existing timer- if (clipboardClearTimer) {- clearTimeout(clipboardClearTimer);- clipboardClearTimer = null;- }- if (countdownInterval) {- clearInterval(countdownInterval);- countdownInterval = null;- }-- // Don't set timer if timeout is 0 (disabled)- if (timeout === 0) {- return;- }-- // Generate new countdown ID- currentCountdownId = Date.now();- const thisCountdownId = currentCountdownId;- countdownStartTime = Date.now();- totalCountdownTime = timeout;-- remainingTime = timeout;-- // Send initial countdown immediately with ID- sendMessage('CLIPBOARD_COUNTDOWN', { remaining: remainingTime, total: timeout, id: thisCountdownId }, 'popup').catch(() => {});-- // Send countdown updates to popup every 100ms for smooth animation- let elapsed = 0;- countdownInterval = setInterval(() => {- // Check if this countdown is still active- if (thisCountdownId !== currentCountdownId) {- if (countdownInterval) {- clearInterval(countdownInterval);- }- return;- }-- elapsed += 0.1;- remainingTime = Math.max(0, timeout - elapsed);- sendMessage('CLIPBOARD_COUNTDOWN', { remaining: remainingTime, total: timeout, id: thisCountdownId }, 'popup').catch(() => {});-- if (elapsed >= timeout && countdownInterval) {- clearInterval(countdownInterval);- countdownInterval = null;- }- }, 100);-- // Set timer to clear clipboard- clipboardClearTimer = setTimeout(async () => {- try {- // Clear clipboard using offscreen document or fallback- await clearClipboardContent();-- // Clean up regardless of success/failure- clipboardClearTimer = null;- if (countdownInterval) {- clearInterval(countdownInterval);- countdownInterval = null;- }-- // Reset countdown tracking- currentCountdownId = 0;- countdownStartTime = 0;- totalCountdownTime = 0;-- sendMessage('CLIPBOARD_CLEARED', {}, 'popup').catch(() => {});- } catch (error) {- console.error('[CLIPBOARD] Error during clipboard clear:', error);-- // Clean up even on error- clipboardClearTimer = null;- if (countdownInterval) {- clearInterval(countdownInterval);- countdownInterval = null;- }- currentCountdownId = 0;- countdownStartTime = 0;- totalCountdownTime = 0;- sendMessage('CLIPBOARD_CLEARED', {}, 'popup').catch(() => {});- }- }, timeout * 1000);-}--/**- * Cancel clipboard clear countdown and timer.- */-function handleCancelClipboardClear(): void {- if (clipboardClearTimer) {- clearTimeout(clipboardClearTimer);- clipboardClearTimer = null;- }- if (countdownInterval) {- clearInterval(countdownInterval);- countdownInterval = null;- }- sendMessage('CLIPBOARD_COUNTDOWN_CANCELLED', {}, 'popup').catch(() => {});-}--/**- * Get the clipboard clear timeout setting.- */-async function handleGetClipboardClearTimeout(): Promise<number> {- const timeout = await storage.getItem(CLIPBOARD_CLEAR_TIMEOUT_KEY) as number ?? 10;- return timeout;-}--/**- * Set the clipboard clear timeout setting.- */-async function handleSetClipboardClearTimeout(data: number): Promise<boolean> {- await storage.setItem(CLIPBOARD_CLEAR_TIMEOUT_KEY, data);- return true;-}--/**- * Get the current clipboard countdown state.- */-function handleGetClipboardCountdownState(): { remaining: number; total: number; id: number } | null {- // Calculate actual remaining time based on elapsed time- if (currentCountdownId && countdownStartTime && totalCountdownTime) {- const elapsed = (Date.now() - countdownStartTime) / 1000;- const actualRemaining = Math.max(0, totalCountdownTime - elapsed);-- if (actualRemaining > 0) {- return {- remaining: actualRemaining,- total: totalCountdownTime,- id: currentCountdownId- };- }- }- return null;-}--/**- * Reset the auto-lock timer.- */-function handleResetAutoLockTimer(): void {- resetAutoLockTimer();-}--/**- * Handle popup opened - clear auto-lock timer.- */-function handlePopupOpened(): void {- if (autoLockTimer) {- clearTimeout(autoLockTimer);- autoLockTimer = null;- console.info('[AUTO_LOCK] Timer cleared - popup opened');- }-}--/**- * Handle popup closed - restart auto-lock timer.- */-function handlePopupClosed(): void {- resetAutoLockTimer();- console.info('[AUTO_LOCK] Timer restarted - popup closed');-}--/**- * Set the auto-lock timeout setting.- */-async function handleSetAutoLockTimeout(timeout: number): Promise<boolean> {- await storage.setItem(AUTO_LOCK_TIMEOUT_KEY, timeout);- resetAutoLockTimer();- return true;-}--/**- * Reset the auto-lock timer based on current settings.- */-async function resetAutoLockTimer(): Promise<void> {- // Clear existing timer- if (autoLockTimer) {- clearTimeout(autoLockTimer);- autoLockTimer = null;- }-- // Get timeout setting- const timeout = await storage.getItem(AUTO_LOCK_TIMEOUT_KEY) as number ?? 0;-- // Don't set timer if timeout is 0 (disabled) or if vault is already locked- if (timeout === 0) {- return;- }-- // Check if vault is unlocked before setting timer- const encryptionKey = await storage.getItem('session:encryptionKey') as string | null;-- if (!encryptionKey) {- // Vault is already locked, don't start timer- return;- }-- // Set new timer- autoLockTimer = setTimeout(async () => {- try {- // Lock the vault using the existing handler- handleClearVault();-- console.info('[AUTO_LOCK] Vault locked due to inactivity');- autoLockTimer = null;- } catch (error) {- console.error('[AUTO_LOCK] Error locking vault:', error);- }- }, timeout * 1000);-}\ No newline at end of filediff --git a/apps/browser-extension/src/entrypoints/background/AutolockTimeoutHandler.ts b/apps/browser-extension/src/entrypoints/background/AutolockTimeoutHandler.tsnew file mode 100644index 000000000..286141831--- /dev/null+++ b/apps/browser-extension/src/entrypoints/background/AutolockTimeoutHandler.ts@@ -0,0 +1,113 @@+import { storage } from 'wxt/utils/storage';++import { handleClearVault } from '@/entrypoints/background/VaultMessageHandler';++import { AUTO_LOCK_TIMEOUT_KEY } from '@/utils/Constants';++let autoLockTimer: NodeJS.Timeout | null = null;++/**+ * Reset the auto-lock timer.+ */+export function handleResetAutoLockTimer(): void {+ resetAutoLockTimer();+}++/**+ * Handle popup heartbeat - extend auto-lock timer.+ */+export function handlePopupHeartbeat(): void {+ extendAutoLockTimer();+}++/**+ * Set the auto-lock timeout setting.+ */+export async function handleSetAutoLockTimeout(timeout: number): Promise<boolean> {+ await storage.setItem(AUTO_LOCK_TIMEOUT_KEY, timeout);+ resetAutoLockTimer();+ return true;+}++/**+ * Reset the auto-lock timer based on current settings.+ */+async function resetAutoLockTimer(): Promise<void> {+ // Clear existing timer+ if (autoLockTimer) {+ clearTimeout(autoLockTimer);+ autoLockTimer = null;+ }++ // Get timeout setting+ const timeout = await storage.getItem(AUTO_LOCK_TIMEOUT_KEY) as number ?? 0;++ // Don't set timer if timeout is 0 (disabled) or if vault is already locked+ if (timeout === 0) {+ return;+ }++ // Check if vault is unlocked before setting timer+ const encryptionKey = await storage.getItem('session:encryptionKey') as string | null;++ if (!encryptionKey) {+ // Vault is already locked, don't start timer+ return;+ }++ // Set new timer+ autoLockTimer = setTimeout(async () => {+ try {+ // Lock the vault using the existing handler+ handleClearVault();++ console.info('[AUTO_LOCK] Vault locked due to inactivity');+ autoLockTimer = null;+ } catch (error) {+ console.error('[AUTO_LOCK] Error locking vault:', error);+ }+ }, timeout * 1000);+}++/**+ * Extend the auto-lock timer by the full timeout period.+ * This is called by popup heartbeats to prevent locking while popup is active.+ */+async function extendAutoLockTimer(): Promise<void> {+ // Get timeout setting+ const timeout = await storage.getItem(AUTO_LOCK_TIMEOUT_KEY) as number ?? 0;++ // Don't extend timer if timeout is 0 (disabled)+ if (timeout === 0) {+ return;+ }++ // Check if vault is unlocked+ const encryptionKey = await storage.getItem('session:encryptionKey') as string | null;++ if (!encryptionKey) {+ // Vault is already locked, don't extend timer+ return;+ }++ // Clear existing timer and start a new one+ if (autoLockTimer) {+ clearTimeout(autoLockTimer);+ autoLockTimer = null;+ }++ // Set new timer+ autoLockTimer = setTimeout(async () => {+ try {+ // Lock the vault using the existing handler+ handleClearVault();++ console.info('[AUTO_LOCK] Vault locked due to inactivity');+ autoLockTimer = null;+ } catch (error) {+ console.error('[AUTO_LOCK] Error locking vault:', error);+ }+ }, timeout * 1000);++ console.info(`[AUTO_LOCK] Timer extended (popup heartbeat)`);+}diff --git a/apps/browser-extension/src/entrypoints/background/ClipboardClearHandler.ts b/apps/browser-extension/src/entrypoints/background/ClipboardClearHandler.tsnew file mode 100644index 000000000..8d2d9d286--- /dev/null+++ b/apps/browser-extension/src/entrypoints/background/ClipboardClearHandler.ts@@ -0,0 +1,219 @@+import { sendMessage } from 'webext-bridge/background';+import { storage } from 'wxt/utils/storage';++import { CLIPBOARD_CLEAR_TIMEOUT_KEY } from '@/utils/Constants';++let clipboardClearTimer: NodeJS.Timeout | null = null;+let countdownInterval: NodeJS.Timeout | null = null;+let remainingTime = 0;+let currentCountdownId = 0;+let totalCountdownTime = 0;+let countdownStartTime = 0;+let offscreenDocumentCreated = false;++/**+ * Create offscreen document if it doesn't exist.+ */+async function createOffscreenDocument(): Promise<void> {+ if (offscreenDocumentCreated) {+ return;+ }++ try {+ // Check if chrome.offscreen API is available (Chrome 109+)+ if (!chrome.offscreen) {+ console.warn('[CLIPBOARD] Offscreen API not available, falling back to direct clipboard access');+ return;+ }++ // Check if offscreen document already exists+ if (chrome.runtime.getContexts) {+ const existingContexts = await chrome.runtime.getContexts({+ contextTypes: ['OFFSCREEN_DOCUMENT'],+ documentUrls: [chrome.runtime.getURL('offscreen.html')]+ });++ if (existingContexts.length > 0) {+ offscreenDocumentCreated = true;+ return;+ }+ }++ // Create offscreen document+ await chrome.offscreen.createDocument({+ url: 'offscreen.html',+ reasons: [chrome.offscreen.Reason.CLIPBOARD],+ justification: 'Clear clipboard after timeout for security'+ });++ offscreenDocumentCreated = true;+ } catch (error) {+ console.error('[CLIPBOARD] Failed to create offscreen document:', error);+ offscreenDocumentCreated = false;+ }+}++/**+ * Clear clipboard using offscreen document or fallback method.+ */+async function clearClipboardContent(): Promise<void> {+ if (import.meta.env.CHROME || import.meta.env.EDGE) {+ /*+ * Chrome and Edge use mv3 and do not have direct access to clipboard+ * so we use an offscreen document to clear the clipboard.+ */+ await createOffscreenDocument();++ // Send message to offscreen document to clear clipboard+ const response = await chrome.runtime.sendMessage({ type: 'CLEAR_CLIPBOARD' });++ if (response?.success) {+ console.info('[CLIPBOARD] Clipboard cleared via offscreen document');+ } else {+ throw new Error(response?.message || 'Failed to clear clipboard via offscreen');+ }+ } else {+ // Firefox and Safari use mv2 and can use direct clipboard access.+ await navigator.clipboard.writeText('');+ }+}++/**+ * Handle clipboard copied event - starts countdown and timer to clear clipboard.+ */+export async function handleClipboardCopied() : Promise<void> {+ const timeout = await storage.getItem(CLIPBOARD_CLEAR_TIMEOUT_KEY) as number ?? 10;++ // Clear any existing timer+ if (clipboardClearTimer) {+ clearTimeout(clipboardClearTimer);+ clipboardClearTimer = null;+ }+ if (countdownInterval) {+ clearInterval(countdownInterval);+ countdownInterval = null;+ }++ // Don't set timer if timeout is 0 (disabled)+ if (timeout === 0) {+ return;+ }++ // Generate new countdown ID+ currentCountdownId = Date.now();+ const thisCountdownId = currentCountdownId;+ countdownStartTime = Date.now();+ totalCountdownTime = timeout;++ remainingTime = timeout;++ // Send initial countdown immediately with ID+ sendMessage('CLIPBOARD_COUNTDOWN', { remaining: remainingTime, total: timeout, id: thisCountdownId }, 'popup').catch(() => {});++ // Send countdown updates to popup every 100ms for smooth animation+ let elapsed = 0;+ countdownInterval = setInterval(() => {+ // Check if this countdown is still active+ if (thisCountdownId !== currentCountdownId) {+ if (countdownInterval) {+ clearInterval(countdownInterval);+ }+ return;+ }++ elapsed += 0.1;+ remainingTime = Math.max(0, timeout - elapsed);+ sendMessage('CLIPBOARD_COUNTDOWN', { remaining: remainingTime, total: timeout, id: thisCountdownId }, 'popup').catch(() => {});++ if (elapsed >= timeout && countdownInterval) {+ clearInterval(countdownInterval);+ countdownInterval = null;+ }+ }, 100);++ // Set timer to clear clipboard+ clipboardClearTimer = setTimeout(async () => {+ try {+ // Clear clipboard using offscreen document or fallback+ await clearClipboardContent();++ // Clean up regardless of success/failure+ clipboardClearTimer = null;+ if (countdownInterval) {+ clearInterval(countdownInterval);+ countdownInterval = null;+ }++ // Reset countdown tracking+ currentCountdownId = 0;+ countdownStartTime = 0;+ totalCountdownTime = 0;++ sendMessage('CLIPBOARD_CLEARED', {}, 'popup').catch(() => {});+ } catch (error) {+ console.error('[CLIPBOARD] Error during clipboard clear:', error);++ // Clean up even on error+ clipboardClearTimer = null;+ if (countdownInterval) {+ clearInterval(countdownInterval);+ countdownInterval = null;+ }+ currentCountdownId = 0;+ countdownStartTime = 0;+ totalCountdownTime = 0;+ sendMessage('CLIPBOARD_CLEARED', {}, 'popup').catch(() => {});+ }+ }, timeout * 1000);+}++/**+ * Cancel clipboard clear countdown and timer.+ */+export function handleCancelClipboardClear(): void {+ if (clipboardClearTimer) {+ clearTimeout(clipboardClearTimer);+ clipboardClearTimer = null;+ }+ if (countdownInterval) {+ clearInterval(countdownInterval);+ countdownInterval = null;+ }+ sendMessage('CLIPBOARD_COUNTDOWN_CANCELLED', {}, 'popup').catch(() => {});+}++/**+ * Get the clipboard clear timeout setting.+ */+export async function handleGetClipboardClearTimeout(): Promise<number> {+ const timeout = await storage.getItem(CLIPBOARD_CLEAR_TIMEOUT_KEY) as number ?? 10;+ return timeout;+}++/**+ * Set the clipboard clear timeout setting.+ */+export async function handleSetClipboardClearTimeout(data: number): Promise<boolean> {+ await storage.setItem(CLIPBOARD_CLEAR_TIMEOUT_KEY, data);+ return true;+}++/**+ * Get the current clipboard countdown state.+ */+export function handleGetClipboardCountdownState(): { remaining: number; total: number; id: number } | null {+ // Calculate actual remaining time based on elapsed time+ if (currentCountdownId && countdownStartTime && totalCountdownTime) {+ const elapsed = (Date.now() - countdownStartTime) / 1000;+ const actualRemaining = Math.max(0, totalCountdownTime - elapsed);++ if (actualRemaining > 0) {+ return {+ remaining: actualRemaining,+ total: totalCountdownTime,+ id: currentCountdownId+ };+ }+ }+ return null;+}diff --git a/apps/browser-extension/src/entrypoints/popup/App.tsx b/apps/browser-extension/src/entrypoints/popup/App.tsxindex bc3a8ba0c..52df760c4 100644--- a/apps/browser-extension/src/entrypoints/popup/App.tsx+++ b/apps/browser-extension/src/entrypoints/popup/App.tsx@@ -77,19 +77,25 @@ const App: React.FC = () => {}, [isInitialLoading, setIsLoading]);/**- * Notify background when popup opens/closes.+ * Send heartbeat to background every 5 seconds while popup is open.+ * This extends the auto-lock timer to prevent vault locking while popup is active.*/useEffect(() => {- // Notify background that popup is open- sendMessage('POPUP_OPENED', {}, 'background').catch(() => {+ // Send initial heartbeat+ sendMessage('POPUP_HEARTBEAT', {}, 'background').catch(() => {// Ignore errors as background script might not be ready});- // Cleanup: notify background when popup closes- return () : void => {- sendMessage('POPUP_CLOSED', {}, 'background').catch(() => {- // Ignore errors on cleanup+ // Set up heartbeat interval+ const heartbeatInterval = setInterval(() => {+ sendMessage('POPUP_HEARTBEAT', {}, 'background').catch(() => {+ // Ignore errors as background script might not be ready});+ }, 5000); // Send heartbeat every 5 seconds++ // Cleanup: clear interval when popup closes+ return () : void => {+ clearInterval(heartbeatInterval);};}, []);diff --git a/apps/browser-extension/src/entrypoints/popup/pages/Settings.tsx b/apps/browser-extension/src/entrypoints/popup/pages/Settings.tsxindex e200ac261..7443fef76 100644--- a/apps/browser-extension/src/entrypoints/popup/pages/Settings.tsx+++ b/apps/browser-extension/src/entrypoints/popup/pages/Settings.tsx@@ -464,7 +464,7 @@ const Settings: React.FC = () => {className="w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500"><option value="0">{t('settings.autoLockNever')}</option>- <option value="5">{t('settings.autoLock5Seconds')}</option>+ <option value="15">{t('settings.autoLock15Seconds')}</option><option value="60">{t('settings.autoLock1Minute')}</option><option value="300">{t('settings.autoLock5Minutes')}</option><option value="900">{t('settings.autoLock15Minutes')}</option>diff --git a/apps/browser-extension/src/i18n/locales/en.json b/apps/browser-extension/src/i18n/locales/en.jsonindex 286231052..57dc84425 100644--- a/apps/browser-extension/src/i18n/locales/en.json+++ b/apps/browser-extension/src/i18n/locales/en.json@@ -324,7 +324,7 @@"autoLockTimeoutDescription": "Automatically lock the vault after a period of inactivity","autoLockTimeoutHelp": "The timer resets when you open the browser extension or use autofill on a webpage. The vault will only lock after the specified period of inactivity (no autofill usage or extension popup opened). The vault will always lock when the browser is closed, regardless of this setting.","autoLockNever": "Never",- "autoLock5Seconds": "5 seconds (debug)",+ "autoLock15Seconds": "15 seconds","autoLock1Minute": "1 minute","autoLock5Minutes": "5 minutes","autoLock15Minutes": "15 minutes",