From 0d793e4cd8951eb92f6d55cbf7e044f39d0b9d67 Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Mon, 2 Mar 2026 19:12:11 +0400 Subject: [PATCH] style: show lock icon for encrypted profiles --- src/components/profile-data-table.tsx | 31 ++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/src/components/profile-data-table.tsx b/src/components/profile-data-table.tsx index e7aa451..c331993 100644 --- a/src/components/profile-data-table.tsx +++ b/src/components/profile-data-table.tsx @@ -202,7 +202,12 @@ type TableMeta = { getProfileLockEmail: (profileId: string) => string | undefined; }; -type SyncStatusDot = { color: string; tooltip: string; animate: boolean }; +type SyncStatusDot = { + color: string; + tooltip: string; + animate: boolean; + encrypted: boolean; +}; function getProfileSyncStatusDot( profile: BrowserProfile, @@ -215,6 +220,7 @@ function getProfileSyncStatusDot( | undefined, errorMessage?: string, ): SyncStatusDot | null { + const encrypted = profile.sync_mode === "Encrypted"; const status = liveStatus ?? (profile.sync_mode && profile.sync_mode !== "Disabled" @@ -223,12 +229,18 @@ function getProfileSyncStatusDot( switch (status) { case "syncing": - return { color: "bg-yellow-500", tooltip: "Syncing...", animate: true }; + return { + color: "bg-yellow-500", + tooltip: "Syncing...", + animate: true, + encrypted, + }; case "waiting": return { color: "bg-yellow-500", tooltip: "Waiting to sync", animate: false, + encrypted, }; case "synced": return { @@ -237,12 +249,14 @@ function getProfileSyncStatusDot( ? `Synced ${new Date(profile.last_sync * 1000).toLocaleString()}` : "Synced", animate: false, + encrypted, }; case "error": return { color: "bg-red-500", tooltip: errorMessage ? `Sync error: ${errorMessage}` : "Sync error", animate: false, + encrypted, }; case "disabled": if (profile.last_sync) { @@ -250,6 +264,7 @@ function getProfileSyncStatusDot( color: "bg-gray-400", tooltip: `Sync disabled, last sync ${formatRelativeTime(profile.last_sync)}`, animate: false, + encrypted: false, }; } return null; @@ -2303,9 +2318,15 @@ export function ProfilesDataTable({ - + {dot.encrypted ? ( + + ) : ( + + )} {dot.tooltip}