@burdenoff/microfe-security 2026.1120.2 → 2026.1122.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/dist/generated/global-types.d.ts +5953 -796
  2. package/dist/generated/wspace-operations.d.ts +315 -3
  3. package/dist/generated/wspace-operations.js +216 -62
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/generated/wspace-types.d.ts +74118 -10624
  6. package/dist/generated/wspace-types.js +3 -1
  7. package/dist/generated/wspace-types.js.map +1 -1
  8. package/dist/security/components/BulkPickerDialogs.js.map +1 -1
  9. package/dist/security/components/ImportWizard.js.map +1 -1
  10. package/dist/security/components/SecretFormFields.js.map +1 -1
  11. package/dist/security/components/SecretShareDialog.d.ts +6 -0
  12. package/dist/security/components/SecretShareDialog.js +150 -270
  13. package/dist/security/components/SecretShareDialog.js.map +1 -1
  14. package/dist/security/components/SecretShareLinkPanel.d.ts +33 -0
  15. package/dist/security/components/SecretShareLinkPanel.js +144 -0
  16. package/dist/security/components/SecretShareLinkPanel.js.map +1 -0
  17. package/dist/security/components/SecretSharePeoplePanel.d.ts +26 -0
  18. package/dist/security/components/SecretSharePeoplePanel.js +87 -0
  19. package/dist/security/components/SecretSharePeoplePanel.js.map +1 -0
  20. package/dist/security/components/SecurityScoreCard.d.ts +2 -1
  21. package/dist/security/components/SecurityScoreCard.js +9 -3
  22. package/dist/security/components/SecurityScoreCard.js.map +1 -1
  23. package/dist/security/components/VaultFormFields.js.map +1 -1
  24. package/dist/security/components/VaultShareDialog.js.map +1 -1
  25. package/dist/security/components/secretShareTypes.d.ts +22 -0
  26. package/dist/security/components/ui.js.map +1 -1
  27. package/dist/security/hooks/useSecurityDashboard.d.ts +10 -1
  28. package/dist/security/hooks/useSecurityDashboard.js +18 -17
  29. package/dist/security/hooks/useSecurityDashboard.js.map +1 -1
  30. package/dist/security/hooks/useShareQueries.js +11 -8
  31. package/dist/security/hooks/useShareQueries.js.map +1 -1
  32. package/dist/security/pages/AccessReviewPage.js.map +1 -1
  33. package/dist/security/pages/AuditLogPage.js.map +1 -1
  34. package/dist/security/pages/ProviderDetailPage.js.map +1 -1
  35. package/dist/security/pages/ProvidersPage.js.map +1 -1
  36. package/dist/security/pages/SecretCreatePage.js.map +1 -1
  37. package/dist/security/pages/SecretDetailPage.js.map +1 -1
  38. package/dist/security/pages/SecurityDashboardPage.js.map +1 -1
  39. package/dist/security/pages/SharedWithMePage.js +48 -26
  40. package/dist/security/pages/SharedWithMePage.js.map +1 -1
  41. package/dist/security/pages/VaultCreatePage.js.map +1 -1
  42. package/dist/security/pages/VaultDetailPage.js.map +1 -1
  43. package/dist/security/pages/VaultSettingsPage.js.map +1 -1
  44. package/dist/security/pages/VaultShareViewer.js.map +1 -1
  45. package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
  46. package/dist/security/routes/SecurityRoutes.js +50 -44
  47. package/dist/security/routes/SecurityRoutes.js.map +1 -1
  48. package/dist/security/translations/en.d.ts +5 -0
  49. package/dist/security/translations/en.js +6 -1
  50. package/dist/security/translations/en.js.map +1 -1
  51. package/dist/security/v2/SecurityV2Routes.d.ts +15 -0
  52. package/dist/security/v2/SecurityV2Routes.js +119 -0
  53. package/dist/security/v2/SecurityV2Routes.js.map +1 -0
  54. package/dist/security/v2/components/AuditEntries.d.ts +11 -0
  55. package/dist/security/v2/components/AuditEntries.js +37 -0
  56. package/dist/security/v2/components/AuditEntries.js.map +1 -0
  57. package/dist/security/v2/components/MaskedValue.d.ts +15 -0
  58. package/dist/security/v2/components/MaskedValue.js +109 -0
  59. package/dist/security/v2/components/MaskedValue.js.map +1 -0
  60. package/dist/security/v2/components/auditWords.d.ts +32 -0
  61. package/dist/security/v2/components/auditWords.js +103 -0
  62. package/dist/security/v2/components/auditWords.js.map +1 -0
  63. package/dist/security/v2/components/dates.d.ts +9 -0
  64. package/dist/security/v2/components/dates.js +37 -0
  65. package/dist/security/v2/components/dates.js.map +1 -0
  66. package/dist/security/v2/components/healthWords.d.ts +25 -0
  67. package/dist/security/v2/components/healthWords.js +76 -0
  68. package/dist/security/v2/components/healthWords.js.map +1 -0
  69. package/dist/security/v2/components/pieces.d.ts +33 -0
  70. package/dist/security/v2/components/pieces.js +49 -0
  71. package/dist/security/v2/components/pieces.js.map +1 -0
  72. package/dist/security/v2/components/typeWords.d.ts +7 -0
  73. package/dist/security/v2/components/typeWords.js +26 -0
  74. package/dist/security/v2/components/typeWords.js.map +1 -0
  75. package/dist/security/v2/dialogs/AccessReviewDialog.d.ts +20 -0
  76. package/dist/security/v2/dialogs/AccessReviewDialog.js +196 -0
  77. package/dist/security/v2/dialogs/AccessReviewDialog.js.map +1 -0
  78. package/dist/security/v2/dialogs/ImportExportDialog.d.ts +19 -0
  79. package/dist/security/v2/dialogs/ImportExportDialog.js +85 -0
  80. package/dist/security/v2/dialogs/ImportExportDialog.js.map +1 -0
  81. package/dist/security/v2/dialogs/LockedDialog.d.ts +12 -0
  82. package/dist/security/v2/dialogs/LockedDialog.js +32 -0
  83. package/dist/security/v2/dialogs/LockedDialog.js.map +1 -0
  84. package/dist/security/v2/dialogs/SecurityHealthDialog.d.ts +19 -0
  85. package/dist/security/v2/dialogs/SecurityHealthDialog.js +151 -0
  86. package/dist/security/v2/dialogs/SecurityHealthDialog.js.map +1 -0
  87. package/dist/security/v2/dialogs/import-export/ExportPanel.d.ts +25 -0
  88. package/dist/security/v2/dialogs/import-export/ExportPanel.js +70 -0
  89. package/dist/security/v2/dialogs/import-export/ExportPanel.js.map +1 -0
  90. package/dist/security/v2/dialogs/import-export/ImportPanel.d.ts +26 -0
  91. package/dist/security/v2/dialogs/import-export/ImportPanel.js +240 -0
  92. package/dist/security/v2/dialogs/import-export/ImportPanel.js.map +1 -0
  93. package/dist/security/v2/dialogs/import-export/TransferFooters.d.ts +21 -0
  94. package/dist/security/v2/dialogs/import-export/TransferFooters.js +51 -0
  95. package/dist/security/v2/dialogs/import-export/TransferFooters.js.map +1 -0
  96. package/dist/security/v2/dialogs/import-export/useTransfers.d.ts +23 -0
  97. package/dist/security/v2/dialogs/import-export/useTransfers.js +69 -0
  98. package/dist/security/v2/dialogs/import-export/useTransfers.js.map +1 -0
  99. package/dist/security/v2/dialogs/reviewWords.d.ts +15 -0
  100. package/dist/security/v2/dialogs/reviewWords.js +48 -0
  101. package/dist/security/v2/dialogs/reviewWords.js.map +1 -0
  102. package/dist/security/v2/hooks/useActorNames.d.ts +15 -0
  103. package/dist/security/v2/hooks/useActorNames.js +40 -0
  104. package/dist/security/v2/hooks/useActorNames.js.map +1 -0
  105. package/dist/security/v2/hooks/useAuditEvents.d.ts +23 -0
  106. package/dist/security/v2/hooks/useAuditEvents.js +28 -0
  107. package/dist/security/v2/hooks/useAuditEvents.js.map +1 -0
  108. package/dist/security/v2/hooks/useSavedValuesData.d.ts +85 -0
  109. package/dist/security/v2/hooks/useSavedValuesData.js +111 -0
  110. package/dist/security/v2/hooks/useSavedValuesData.js.map +1 -0
  111. package/dist/security/v2/hooks/useSavedValuesGates.d.ts +24 -0
  112. package/dist/security/v2/hooks/useSavedValuesGates.js +22 -0
  113. package/dist/security/v2/hooks/useSavedValuesGates.js.map +1 -0
  114. package/dist/security/v2/hooks/useSavedValuesNav.d.ts +11 -0
  115. package/dist/security/v2/hooks/useSavedValuesNav.js +26 -0
  116. package/dist/security/v2/hooks/useSavedValuesNav.js.map +1 -0
  117. package/dist/security/v2/hooks/useVaultActions.d.ts +12 -0
  118. package/dist/security/v2/hooks/useVaultActions.js +81 -0
  119. package/dist/security/v2/hooks/useVaultActions.js.map +1 -0
  120. package/dist/security/v2/hooks/useVaultPage.d.ts +86 -0
  121. package/dist/security/v2/hooks/useVaultPage.js +174 -0
  122. package/dist/security/v2/hooks/useVaultPage.js.map +1 -0
  123. package/dist/security/v2/model/access.d.ts +63 -0
  124. package/dist/security/v2/model/access.js +57 -0
  125. package/dist/security/v2/model/access.js.map +1 -0
  126. package/dist/security/v2/model/audit.d.ts +43 -0
  127. package/dist/security/v2/model/audit.js +113 -0
  128. package/dist/security/v2/model/audit.js.map +1 -0
  129. package/dist/security/v2/model/health.d.ts +70 -0
  130. package/dist/security/v2/model/health.js +118 -0
  131. package/dist/security/v2/model/health.js.map +1 -0
  132. package/dist/security/v2/model/params.d.ts +40 -0
  133. package/dist/security/v2/model/params.js +65 -0
  134. package/dist/security/v2/model/params.js.map +1 -0
  135. package/dist/security/v2/model/review.d.ts +99 -0
  136. package/dist/security/v2/model/review.js +141 -0
  137. package/dist/security/v2/model/review.js.map +1 -0
  138. package/dist/security/v2/model/shared.d.ts +40 -0
  139. package/dist/security/v2/model/shared.js +26 -0
  140. package/dist/security/v2/model/shared.js.map +1 -0
  141. package/dist/security/v2/model/time.d.ts +24 -0
  142. package/dist/security/v2/model/time.js +37 -0
  143. package/dist/security/v2/model/time.js.map +1 -0
  144. package/dist/security/v2/model/vaults.d.ts +46 -0
  145. package/dist/security/v2/model/vaults.js +55 -0
  146. package/dist/security/v2/model/vaults.js.map +1 -0
  147. package/dist/security/v2/pages/AuditLogPage.d.ts +6 -0
  148. package/dist/security/v2/pages/AuditLogPage.js +170 -0
  149. package/dist/security/v2/pages/AuditLogPage.js.map +1 -0
  150. package/dist/security/v2/pages/SavedValuesPage.d.ts +5 -0
  151. package/dist/security/v2/pages/SavedValuesPage.js +98 -0
  152. package/dist/security/v2/pages/SavedValuesPage.js.map +1 -0
  153. package/dist/security/v2/pages/VaultPage.d.ts +5 -0
  154. package/dist/security/v2/pages/VaultPage.js +201 -0
  155. package/dist/security/v2/pages/VaultPage.js.map +1 -0
  156. package/dist/security/v2/pages/saved/HealthSummary.d.ts +15 -0
  157. package/dist/security/v2/pages/saved/HealthSummary.js +44 -0
  158. package/dist/security/v2/pages/saved/HealthSummary.js.map +1 -0
  159. package/dist/security/v2/pages/saved/RevealSharedDialog.d.ts +11 -0
  160. package/dist/security/v2/pages/saved/RevealSharedDialog.js +65 -0
  161. package/dist/security/v2/pages/saved/RevealSharedDialog.js.map +1 -0
  162. package/dist/security/v2/pages/saved/SavedValuesDialogs.d.ts +14 -0
  163. package/dist/security/v2/pages/saved/SavedValuesDialogs.js +55 -0
  164. package/dist/security/v2/pages/saved/SavedValuesDialogs.js.map +1 -0
  165. package/dist/security/v2/pages/saved/SharedWithMeTab.d.ts +10 -0
  166. package/dist/security/v2/pages/saved/SharedWithMeTab.js +178 -0
  167. package/dist/security/v2/pages/saved/SharedWithMeTab.js.map +1 -0
  168. package/dist/security/v2/pages/saved/VaultCard.d.ts +17 -0
  169. package/dist/security/v2/pages/saved/VaultCard.js +91 -0
  170. package/dist/security/v2/pages/saved/VaultCard.js.map +1 -0
  171. package/dist/security/v2/pages/saved/VaultsTab.d.ts +23 -0
  172. package/dist/security/v2/pages/saved/VaultsTab.js +133 -0
  173. package/dist/security/v2/pages/saved/VaultsTab.js.map +1 -0
  174. package/dist/security/v2/pages/saved/useSavedValuesPage.d.ts +75 -0
  175. package/dist/security/v2/pages/saved/useSavedValuesPage.js +80 -0
  176. package/dist/security/v2/pages/saved/useSavedValuesPage.js.map +1 -0
  177. package/dist/security/v2/pages/vault/AccessTab.d.ts +48 -0
  178. package/dist/security/v2/pages/vault/AccessTab.js +162 -0
  179. package/dist/security/v2/pages/vault/AccessTab.js.map +1 -0
  180. package/dist/security/v2/pages/vault/ActivityTab.d.ts +15 -0
  181. package/dist/security/v2/pages/vault/ActivityTab.js +50 -0
  182. package/dist/security/v2/pages/vault/ActivityTab.js.map +1 -0
  183. package/dist/security/v2/pages/vault/ValuesTab.d.ts +25 -0
  184. package/dist/security/v2/pages/vault/ValuesTab.js +187 -0
  185. package/dist/security/v2/pages/vault/ValuesTab.js.map +1 -0
  186. package/dist/security/v2/pages/vault/VaultHeader.d.ts +40 -0
  187. package/dist/security/v2/pages/vault/VaultHeader.js +128 -0
  188. package/dist/security/v2/pages/vault/VaultHeader.js.map +1 -0
  189. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"SecretDetailPage.js","names":["SecretDetailPage","useParams","shellNavigate","useSecurity","actorLabel","useActorLabel","routerNavigate","useNavigate","tr","useTr","isFluidgrids","useIsFluidgridsVariant","secretData","useGetSecret","secretId","secret","versionsData","versionsLoading","useGetSecretVersionsQuery","versions","decryptedValue","decrypting","useSecretValue","deleteSecret","deletingSecret","useDeleteSecret","rotateSecret","rotatingSecret","useRotateSecret","updateSecret","updatingSecret","useUpdateSecret","rotating","rotateError","setRotateError","useState","rollbackSecret","rollingBack","useRollbackSecret","useSecurityEventEmitter","canDeleteSecret","usePermission","canUpdateSecret","canDecryptSecret","featureSecretRotate","useFeatureFlag","SECURITY_FEATURE_FLAGS","canRotate","showDeleteConfirm","setShowDeleteConfirm","showShareDialog","setShowShareDialog","showRotatePrompt","setShowRotatePrompt","rotateValueRef","useRef","openRotatePrompt","showHistoryModal","setShowHistoryModal","newRotationValue","setNewRotationValue","handleNavigate","path","handleBack","basePath","vaultId","handleDelete","emit","nativeNotify","err","requestDelete","result","nativeConfirm","handleRotate","refetch","handleRollback","loading","PageLayout","Loader2","error","Card","AlertTriangle","Button","ArrowLeft","versionCount","rotationStatus","getRotationStatus","createdByLabel","overflowActions","Share2","RefreshCw","Trash2","CTAOverflowMenu","PagePurpose","KeyRound","NextSteps","isRevealed","reveal","SecretTypeBadge","RotationStatusBadge","Badge","label","GlassCard","Calendar","SecretValueDisplay","hide","History","OptionalFields","ShowTechnicalDetails","Clock","Shield","Dialog","open","DialogContent","DialogHeader","DialogTitle","cn","v","SecurityPermissionGuard","ConfirmDialog","SecretShareDialog"],"sources":["../../../src/security/pages/SecretDetailPage.tsx"],"sourcesContent":["import { useState, useRef } from 'react';\nimport { useParams, useNavigate } from 'react-router';\nimport {\n ArrowLeft,\n Edit2,\n Trash2,\n RefreshCw,\n History,\n Loader2,\n AlertTriangle,\n Clock,\n KeyRound,\n Shield,\n Calendar,\n Share2,\n} from 'lucide-react';\nimport {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogTitle,\n GlassCard,\n CTAOverflowMenu,\n type CTAAction,\n PagePurpose,\n NextSteps,\n OptionalFields,\n ShowTechnicalDetails,\n} from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { SecretValueDisplay } from '../components/SecretValueDisplay';\nimport { SecretTypeBadge } from '../components/SecretTypeBadge';\nimport { RotationStatusBadge } from '../components/RotationStatusBadge';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport { SecretShareDialog } from '../components/SecretShareDialog';\nimport { Button, Card, Badge } from '../components/ui';\nimport {\n useGetSecret,\n useDeleteSecret,\n useRotateSecret,\n useRollbackSecret,\n useUpdateSecret,\n} from '../hooks/useSecretQueries';\nimport { useSecurityEventEmitter } from '../hooks/useSecurityEventEmitter';\nimport { useGetSecretVersionsQuery } from '../../generated/wspace-operations';\nimport { useSecretValue } from '../hooks/useSecretValue';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { SecurityPermissionGuard } from '../components/SecurityPermissionGuard';\nimport { usePermission, useFeatureFlag } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { cn } from '../utils/cn';\nimport { useTr } from '../hooks/useTr';\nimport { useIsFluidgridsVariant } from '../hooks/useSecurityVariant';\nimport { useActorLabel } from '../hooks/useActorLabel';\nimport { getRotationStatus } from '../utils/rotationStatus';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\nimport { SECURITY_FEATURE_FLAGS } from '../constants/featureFlags';\nimport type { SecretType } from '../types';\n\nexport function SecretDetailPage() {\n const { vaultId, secretId } = useParams<{ vaultId: string; secretId: string }>();\n const { basePath = '/', navigate: shellNavigate } = useSecurity();\n const actorLabel = useActorLabel();\n const routerNavigate = useNavigate();\n\n const tr = useTr();\n const isFluidgrids = useIsFluidgridsVariant();\n\n const { data: secretData, loading, error, refetch } = useGetSecret(secretId ?? null);\n const secret = secretData?.getSecret;\n\n const { data: versionsData, loading: versionsLoading } = useGetSecretVersionsQuery({\n variables: { secretId: secretId ?? '', pagination: { limit: 50 } },\n skip: !secretId,\n fetchPolicy: 'network-only',\n });\n const versions = versionsData?.getSecretVersionsPaginated?.items ?? [];\n\n const {\n value: decryptedValue,\n reveal,\n hide,\n loading: decrypting,\n isRevealed,\n } = useSecretValue(secretId ?? '');\n\n const [deleteSecret, { loading: deletingSecret }] = useDeleteSecret();\n const [rotateSecret, { loading: rotatingSecret }] = useRotateSecret();\n const [updateSecret, { loading: updatingSecret }] = useUpdateSecret();\n const rotating = rotatingSecret || updatingSecret;\n const [rotateError, setRotateError] = useState<string | null>(null);\n const [rollbackSecret, { loading: rollingBack }] = useRollbackSecret();\n const { emit } = useSecurityEventEmitter();\n\n const canDeleteSecret = usePermission('secret:delete');\n const canUpdateSecret = usePermission('secret:update');\n const canDecryptSecret = usePermission('secret:decrypt');\n const featureSecretRotate = useFeatureFlag(SECURITY_FEATURE_FLAGS.SECRET_ROTATE, false);\n // FluidGrids (BOFF-11871): \"Update value\" works for anyone with\n // `secret:update`, whatever the rotate flag (off by default) says. It\n // saves through updateSecret (see handleRotate), which keeps the old value\n // in version history; rollback is unchanged.\n const canRotate = canUpdateSecret && (isFluidgrids || featureSecretRotate);\n\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\n const [showShareDialog, setShowShareDialog] = useState(false);\n const [showRotatePrompt, setShowRotatePrompt] = useState(false);\n const rotateValueRef = useRef<HTMLTextAreaElement>(null);\n const openRotatePrompt = () => {\n setRotateError(null);\n setShowRotatePrompt(true);\n // Focus next frame so the textarea has been mounted by then.\n requestAnimationFrame(() => rotateValueRef.current?.focus());\n };\n const [showHistoryModal, setShowHistoryModal] = useState(false);\n const [newRotationValue, setNewRotationValue] = useState('');\n\n const handleNavigate = (path: string) => {\n if (shellNavigate) {\n shellNavigate(path);\n } else {\n routerNavigate(path);\n }\n };\n\n const handleBack = () => {\n handleNavigate(`${basePath}/vaults/${vaultId}`);\n };\n\n const handleDelete = async () => {\n if (!secretId) return;\n try {\n await deleteSecret({ variables: { id: secretId } });\n emit('secret.deleted', { secretId, vaultId });\n setShowDeleteConfirm(false);\n void nativeNotify('success');\n handleBack();\n } catch (err) {\n console.error('Failed to delete secret:', err);\n void nativeNotify('error');\n }\n };\n\n const requestDelete = async () => {\n void nativeImpact('medium');\n const result = await nativeConfirm({\n title: 'Delete Secret',\n message: 'Delete this secret? This cannot be undone.',\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n if (result === null) {\n setShowDeleteConfirm(true);\n return;\n }\n if (result) {\n await handleDelete();\n }\n };\n\n const handleRotate = async () => {\n if (!secretId || !newRotationValue.trim()) return;\n setRotateError(null);\n try {\n if (isFluidgrids) {\n // FluidGrids' \"Update value\" replaces the value through updateSecret,\n // which needs only `secret:update`: it encrypts the new value with the\n // vault key and keeps the old one in version history, exactly as\n // rotation does, but is not behind the workspace's rotation feature.\n await updateSecret({\n variables: { id: secretId, input: { value: newRotationValue.trim() } },\n });\n emit('secret.updated', { secretId, vaultId });\n } else {\n await rotateSecret({ variables: { id: secretId, newValue: newRotationValue.trim() } });\n emit('secret.rotated', { secretId, vaultId });\n }\n setShowRotatePrompt(false);\n setNewRotationValue('');\n refetch();\n } catch (err) {\n console.error('Failed to rotate secret:', err);\n // The dialog used to stay open with no message; say what happened.\n // Plain words first; the server's own text only under technical details.\n setRotateError(err instanceof Error && err.message ? err.message : '');\n }\n };\n\n const handleRollback = async (version: number) => {\n if (!secretId) return;\n try {\n await rollbackSecret({ variables: { id: secretId, version } });\n emit('secret.rollback', { secretId, vaultId });\n refetch();\n setShowHistoryModal(false);\n } catch (err) {\n console.error('Failed to rollback secret:', err);\n }\n };\n\n if (loading && !secret) {\n return (\n <PageLayout\n title={tr('security.secretDetail.loading.title', 'Loading Secret...')}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.common.breadcrumbs.secret', 'Secret') },\n ]}\n >\n <div className=\"flex items-center justify-center py-20\">\n <Loader2 className=\"size-10 animate-spin text-primary/60\" />\n </div>\n </PageLayout>\n );\n }\n\n if (error || !secret) {\n return (\n <PageLayout\n title={tr('security.common.errorPage.title', 'Error')}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.common.breadcrumbs.secret', 'Secret') },\n ]}\n >\n <Card className=\"p-8 text-center max-w-lg mx-auto mt-10\">\n <div className=\"flex flex-col items-center gap-4\">\n <div className=\"p-3 rounded-full bg-status-error-bg/10\">\n <AlertTriangle className=\"size-8 text-status-error-text\" />\n </div>\n <div>\n <h3 className=\"text-lg font-bold text-text-primary\">\n {tr('security.secretDetail.error.title', 'Failed to load secret')}\n </h3>\n <p className=\"text-sm text-text-secondary mt-2\">\n {error?.message ??\n tr(\n 'security.secretDetail.error.description',\n 'Secret not found or access denied.'\n )}\n </p>\n </div>\n <Button variant=\"outline\" onClick={handleBack} className=\"mt-4\">\n <ArrowLeft className=\"size-4\" />\n {tr('security.secretDetail.actions.backToVault', 'Go Back to Vault')}\n </Button>\n </div>\n </Card>\n </PageLayout>\n );\n }\n\n const versionCount = secret.versionCount ?? 0;\n const rotationStatus = getRotationStatus(secret.expiresAt);\n const createdByLabel = actorLabel(secret.createdBy);\n\n return (\n <PageLayout\n title={secret.name}\n description={\n secret.description ??\n tr('security.secretDetail.description', 'View and manage this secret.')\n }\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n {\n label: tr('security.common.breadcrumbs.vault', 'Vault'),\n path: `${basePath}/vaults/${vaultId}`,\n },\n { label: secret.name },\n ]}\n actions={(() => {\n // Boff UI 2.0: keep \"Back\" as a quiet navigation button; collapse the\n // secondary actions (share / rotate / delete) into the overflow menu.\n // Gating preserved: rotate needs secret:update + SECRET_ROTATE flag.\n const overflowActions: CTAAction[] = [];\n if (canUpdateSecret) {\n overflowActions.push({\n label: tr('security.common.actions.share', 'Share'),\n icon: <Share2 className=\"size-4\" />,\n onSelect: () => setShowShareDialog(true),\n });\n }\n if (canRotate) {\n overflowActions.push({\n label: tr('security.secretDetail.actions.rotate', 'Rotate'),\n icon: <RefreshCw className=\"size-4\" />,\n onSelect: openRotatePrompt,\n });\n }\n if (canDeleteSecret) {\n overflowActions.push({\n label: tr('security.common.actions.delete', 'Delete'),\n icon: <Trash2 className=\"size-4\" />,\n intent: 'destructive',\n onSelect: () => void requestDelete(),\n });\n }\n return (\n <div className=\"flex flex-wrap items-center gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={handleBack}>\n <ArrowLeft className=\"size-4\" />\n <span className=\"hidden sm:inline\">\n {tr('security.secretDetail.actions.backToVault', 'Back to Vault')}\n </span>\n <span className=\"sm:hidden\">{tr('security.common.actions.back', 'Back')}</span>\n </Button>\n <CTAOverflowMenu actions={overflowActions} />\n </div>\n );\n })()}\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<KeyRound className=\"size-4\" />}>\n {tr(\n 'security.secretDetail.purpose',\n 'This is a single secret — an encrypted credential such as an API key, password or connection string. Reveal and copy its value when you need it (every reveal is logged), rotate it to a new value while keeping the old one in version history, roll back to a previous version, or share it securely with someone outside this vault.'\n )}\n </PagePurpose>\n\n {(canDecryptSecret || canUpdateSecret) && (\n <NextSteps\n storageKey=\"security-secret-detail\"\n steps={[\n ...(canDecryptSecret\n ? [\n {\n id: 'reveal',\n label: tr('security.secretDetail.next.reveal', 'Reveal the value'),\n description: tr(\n 'security.secretDetail.next.revealDesc',\n 'Decrypt and copy this secret when you need it.'\n ),\n icon: <KeyRound className=\"size-4\" />,\n onClick: isRevealed ? undefined : () => void reveal(),\n done: isRevealed,\n },\n ]\n : []),\n // FluidGrids offers one next step, \"Show the value\"; Share and\n // Update value stay in the ⋯ menu.\n ...(canUpdateSecret && !isFluidgrids\n ? [\n {\n id: 'share',\n label: tr('security.secretDetail.next.share', 'Share this secret'),\n description: tr(\n 'security.secretDetail.next.shareDesc',\n 'Send a confidential, expiring link to someone.'\n ),\n icon: <Share2 className=\"size-4\" />,\n onClick: () => setShowShareDialog(true),\n },\n ]\n : []),\n ...(canRotate && !isFluidgrids\n ? [\n {\n id: 'rotate',\n label: tr('security.secretDetail.next.rotate', 'Rotate the value'),\n description: tr(\n 'security.secretDetail.next.rotateDesc',\n 'Replace the value and keep the old one in history.'\n ),\n icon: <RefreshCw className=\"size-4\" />,\n onClick: openRotatePrompt,\n },\n ]\n : []),\n ]}\n />\n )}\n\n {/* Status and Info (FluidGrids: under \"More details\" below) */}\n {!isFluidgrids && (\n <div className=\"flex flex-wrap items-center gap-3\">\n <SecretTypeBadge type={secret.type as SecretType} />\n {rotationStatus && <RotationStatusBadge status={rotationStatus} />}\n <Badge variant=\"outline\" className=\"bg-bg-surface/50\">\n {tr('security.secretDetail.status.label', 'Status: {{status}}', {\n status: secret.status,\n })}\n </Badge>\n {secret.labels?.map((label: any) => (\n <Badge key={label.id} variant=\"outline\" className=\"border-primary/20 text-primary\">\n {label.label}\n </Badge>\n ))}\n </div>\n )}\n\n <div className=\"grid grid-cols-1 md:grid-cols-3 gap-6\">\n {/* Main Info */}\n <div className=\"md:col-span-2 space-y-6\">\n {/* Secret Value — the single emphasis zone on this page */}\n <GlassCard treatment=\"glass\" glow className=\"p-6\">\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-bold text-text-primary flex items-center gap-2\">\n <KeyRound className=\"size-5 text-primary\" />\n {tr('security.secretDetail.value.title', 'Secret Value')}\n </h2>\n {secret.expiresAt && (\n <div className=\"flex items-center gap-1.5 text-xs text-warning\">\n <Calendar className=\"size-3.5\" />\n {tr('security.secretDetail.value.expires', 'Expires: {{date}}', {\n date: new Date(secret.expiresAt).toLocaleDateString(),\n })}\n </div>\n )}\n </div>\n <SecretValueDisplay\n value={decryptedValue ?? ''}\n isRevealed={isRevealed}\n onToggleReveal={\n canDecryptSecret\n ? () => {\n if (isRevealed) {\n hide();\n } else {\n void reveal();\n }\n }\n : undefined\n }\n isLoading={decrypting}\n />\n <p className=\"text-xs text-text-secondary mt-4 italic\">\n {tr(\n 'security.secretDetail.value.note',\n 'Secret values are decrypted on-demand and never stored in plain text.'\n )}\n </p>\n </GlassCard>\n\n {/* Version History Summary (FluidGrids: under \"More details\") */}\n {!isFluidgrids && (\n <Card className=\"p-6 shadow-sm border-border-subtle/60\">\n <div className=\"flex items-center justify-between mb-6\">\n <h2 className=\"text-lg font-bold text-text-primary flex items-center gap-2\">\n <History className=\"size-5 text-primary\" />\n {tr('security.secretDetail.history.title', 'Version History')}\n </h2>\n <Badge variant=\"outline\" className=\"bg-bg-sunken font-mono\">\n {tr('security.secretDetail.history.totalVersions', '{{count}} total versions', {\n count: versionCount,\n })}\n </Badge>\n </div>\n\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between p-4 rounded-lg bg-action-primary-bg/5 border border-primary/10\">\n <div className=\"flex items-center gap-3\">\n <div className=\"size-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-primary text-xs font-bold tabular-nums\">\n v{secret.version ?? versionCount}\n </div>\n <div>\n <p className=\"text-sm font-semibold\">\n {tr(\n 'security.secretDetail.history.currentVersion',\n 'Current Active Version'\n )}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {tr(\n 'security.secretDetail.history.lastUpdated',\n 'Last updated {{date}}',\n {\n date: new Date(secret.updatedAt).toLocaleString(),\n }\n )}\n </p>\n </div>\n </div>\n <Badge variant=\"success\" className=\"text-[10px] uppercase\">\n {tr('security.common.status.active', 'Active')}\n </Badge>\n </div>\n\n {versionCount > 1 && (\n <div className=\"text-center py-4 border-2 border-dashed border-border-subtle/40 rounded-lg bg-bg-sunken/20\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'security.secretDetail.history.available',\n 'Historical versions are available. You can rollback to a previous state if needed.'\n )}\n </p>\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"mt-3\"\n onClick={() => setShowHistoryModal(true)}\n >\n {tr('security.secretDetail.history.viewFull', 'View Full History')}\n </Button>\n </div>\n )}\n </div>\n </Card>\n )}\n\n {isFluidgrids && (\n <OptionalFields\n storageKey=\"security.secretDetail.moreDetails\"\n label={tr('security.secretDetail.moreDetails', 'More details')}\n >\n <div className=\"space-y-4\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <SecretTypeBadge type={secret.type as SecretType} />\n {rotationStatus && <RotationStatusBadge status={rotationStatus} />}\n {secret.labels?.map((label: { id: string; label: string }) => (\n <Badge\n key={label.id}\n variant=\"outline\"\n className=\"border-primary/20 text-primary\"\n >\n {label.label}\n </Badge>\n ))}\n </div>\n <div className=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border-subtle p-4\">\n <div>\n <p className=\"text-sm font-semibold text-text-primary flex items-center gap-2\">\n <History className=\"size-4 text-primary\" />\n {tr('security.secretDetail.history.title', 'Version History')}\n </p>\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'security.secretDetail.history.totalVersions',\n '{{count}} total versions',\n { count: versionCount }\n )}\n </p>\n </div>\n <Button variant=\"outline\" size=\"sm\" onClick={() => setShowHistoryModal(true)}>\n {tr('security.secretDetail.history.viewFull', 'View Full History')}\n </Button>\n </div>\n <p className=\"text-sm text-text-secondary\">\n <span className=\"font-medium text-text-primary\">\n {tr('security.secretDetail.details.createdBy', 'Created By')}:\n </span>{' '}\n <span className=\"break-all\">{createdByLabel}</span>\n </p>\n <ShowTechnicalDetails copyable>\n {[\n `${tr('security.secretDetail.details.keyIdentifier', 'Key Identifier')}: ${secret.key}`,\n `${tr('security.secretDetail.details.createdBy', 'Created By')}: ${secret.createdBy}`,\n `${tr('security.secretDetail.status.name', 'Status')}: ${secret.status}`,\n `${tr('security.secretDetail.history.versionName', 'Version')}: ${secret.version ?? versionCount}`,\n ...(secret.lastRotatedAt\n ? [\n `${tr('security.secretDetail.details.lastRotation', 'Last Rotation')}: ${new Date(secret.lastRotatedAt).toLocaleString()}`,\n ]\n : []),\n ].join('\\n')}\n </ShowTechnicalDetails>\n </div>\n </OptionalFields>\n )}\n </div>\n\n {/* Sidebar Info */}\n <div className=\"space-y-6\">\n <Card className=\"p-6 shadow-sm border-border-subtle/60 space-y-4\">\n <h3 className=\"font-bold text-sm uppercase tracking-wider text-text-secondary\">\n {tr('security.secretDetail.details.title', 'Details')}\n </h3>\n\n <div className=\"space-y-3\">\n {!isFluidgrids && (\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr('security.secretDetail.details.keyIdentifier', 'Key Identifier')}\n </p>\n <code className=\"text-xs font-mono bg-bg-sunken px-1.5 py-0.5 rounded block mt-1 overflow-hidden text-ellipsis whitespace-nowrap\">\n {secret.key}\n </code>\n </div>\n )}\n {!isFluidgrids && (\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr('security.secretDetail.details.createdBy', 'Created By')}\n </p>\n <p className=\"text-sm font-medium mt-1\">{secret.createdBy}</p>\n </div>\n )}\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr('security.secretDetail.details.createdAt', 'Created At')}\n </p>\n <div className=\"flex items-center gap-1.5 text-sm mt-1\">\n <Clock className=\"size-3.5\" />\n {new Date(secret.createdAt).toLocaleDateString()}\n </div>\n </div>\n {secret.lastRotatedAt && !isFluidgrids && (\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr('security.secretDetail.details.lastRotation', 'Last Rotation')}\n </p>\n <p className=\"text-sm mt-1\">\n {new Date(secret.lastRotatedAt).toLocaleString()}\n </p>\n </div>\n )}\n </div>\n </Card>\n\n <GlassCard treatment=\"insight\" className=\"p-6 space-y-4\">\n <h3 className=\"font-bold text-sm text-primary flex items-center gap-2\">\n <Shield className=\"size-4\" />\n {tr('security.secretDetail.security.title', 'Security')}\n </h3>\n <p className=\"text-xs text-text-secondary leading-relaxed\">\n {tr(\n 'security.secretDetail.security.description',\n 'This secret is protected by 256-bit encryption. All access is logged and monitored for suspicious activity.'\n )}\n </p>\n </GlassCard>\n </div>\n </div>\n </div>\n\n {/* Version History Modal */}\n <Dialog\n open={showHistoryModal}\n onOpenChange={(open) => {\n if (!open) setShowHistoryModal(false);\n }}\n >\n <DialogContent className=\"max-w-2xl border-primary/20 max-h-[80vh] flex flex-col gap-0 p-0\">\n <DialogHeader className=\"p-6 border-b border-border-subtle text-left\">\n <div className=\"flex items-center gap-3\">\n <div className=\"p-2 rounded-full bg-action-primary-bg/10 text-primary\">\n <History className=\"size-5\" />\n </div>\n <DialogTitle className=\"text-xl font-bold\">\n {tr('security.secretDetail.history.modalTitle', 'Version History')}\n </DialogTitle>\n </div>\n </DialogHeader>\n\n <div className=\"p-6 overflow-y-auto flex-1\">\n {versionsLoading ? (\n <div className=\"flex justify-center py-8\">\n <Loader2 className=\"size-8 animate-spin text-primary/60\" />\n </div>\n ) : (\n <div className=\"space-y-4\">\n {versions.map((v: any) => (\n <div\n key={v.id}\n className={cn(\n 'p-4 rounded-lg border',\n v.version === secret.version\n ? 'bg-action-primary-bg/5 border-primary/20'\n : 'bg-bg-surface border-border-subtle'\n )}\n >\n <div className=\"flex items-center justify-between\">\n <div>\n <div className=\"flex items-center gap-2\">\n <span className=\"font-semibold\">\n {tr(\n 'security.secretDetail.history.versionLabel',\n 'Version {{version}}',\n {\n version: v.version,\n }\n )}\n </span>\n {v.version === secret.version && (\n <Badge variant=\"success\" className=\"text-[10px] uppercase\">\n {tr('security.common.status.active', 'Active')}\n </Badge>\n )}\n </div>\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'security.secretDetail.history.versionMeta',\n '{{date}} by {{createdBy}}',\n {\n date: new Date(v.createdAt).toLocaleString(),\n createdBy: v.createdBy,\n }\n )}\n </p>\n {v.changeReason && <p className=\"text-sm mt-2\">{v.changeReason}</p>}\n </div>\n {v.version !== secret.version && (\n <SecurityPermissionGuard\n permission=\"secret:update\"\n featureFlagKey={SECURITY_FEATURE_FLAGS.SECRET_ROLLBACK}\n featureFlagDefault={false}\n >\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => handleRollback(v.version)}\n disabled={rollingBack}\n >\n {tr('security.secretDetail.actions.rollback', 'Rollback')}\n </Button>\n </SecurityPermissionGuard>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n </DialogContent>\n </Dialog>\n\n {/* Delete confirmation */}\n <ConfirmDialog\n isOpen={showDeleteConfirm}\n onClose={() => setShowDeleteConfirm(false)}\n onConfirm={handleDelete}\n title={tr('security.secretDetail.delete.title', 'Delete Secret')}\n description={tr(\n 'security.secretDetail.delete.description',\n 'Are you sure you want to delete \"{{name}}\"? This action cannot be undone and will permanently remove this secret from the vault.',\n { name: secret.name }\n )}\n confirmLabel={\n deletingSecret\n ? tr('security.secretDetail.delete.deleting', 'Deleting...')\n : tr('security.secretDetail.delete.confirm', 'Delete Secret')\n }\n variant=\"destructive\"\n />\n\n {/* Rotate prompt */}\n <Dialog\n open={showRotatePrompt}\n onOpenChange={(open) => {\n if (!open) setShowRotatePrompt(false);\n }}\n >\n <DialogContent className=\"max-w-md border-primary/20\">\n <div className=\"space-y-4\">\n <DialogHeader className=\"text-left\">\n <div className=\"flex items-center gap-3\">\n <div className=\"p-2 rounded-full bg-action-primary-bg/10 text-primary\">\n <RefreshCw className=\"size-5\" />\n </div>\n <DialogTitle className=\"text-xl font-bold\">\n {tr('security.secretDetail.rotate.title', 'Rotate Secret')}\n </DialogTitle>\n </div>\n </DialogHeader>\n\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'security.secretDetail.rotate.description',\n 'Enter a new value for {{name}}. The current value will be moved to version history.',\n { name: secret.name }\n )}\n </p>\n\n <div className=\"space-y-2\">\n <label htmlFor=\"new-secret-value\" className=\"text-sm font-medium\">\n {tr('security.secretDetail.rotate.newValue', 'New Secret Value')}\n </label>\n <textarea\n id=\"new-secret-value\"\n aria-label={tr('security.secretDetail.rotate.newValue', 'New Secret Value')}\n ref={rotateValueRef}\n value={newRotationValue}\n onChange={(e) => setNewRotationValue(e.target.value)}\n placeholder={tr(\n 'security.secretDetail.rotate.placeholder',\n 'Enter new secret value...'\n )}\n rows={4}\n className={cn(\n 'w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono transition-all',\n 'focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary',\n 'placeholder:text-text-secondary/50'\n )}\n />\n </div>\n\n {rotateError !== null && (\n <div role=\"alert\" className=\"space-y-2\">\n <p className=\"text-sm text-status-error-text\">\n {tr(\n 'security.secretDetail.rotate.failed',\n 'The value could not be updated. Try again.'\n )}\n </p>\n {rotateError && <ShowTechnicalDetails copyable>{rotateError}</ShowTechnicalDetails>}\n </div>\n )}\n\n <div className=\"flex justify-end gap-3 pt-2\">\n <Button\n variant=\"outline\"\n onClick={() => setShowRotatePrompt(false)}\n disabled={rotating}\n >\n {tr('security.common.actions.cancel', 'Cancel')}\n </Button>\n <Button onClick={handleRotate} disabled={rotating || !newRotationValue.trim()}>\n {rotating ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : (\n <RefreshCw className=\"size-4\" />\n )}\n {rotating\n ? tr('security.secretDetail.rotate.loading', 'Rotating...')\n : tr('security.secretDetail.rotate.confirm', 'Rotate Secret')}\n </Button>\n </div>\n </div>\n </DialogContent>\n </Dialog>\n\n {vaultId && secretId && (\n <SecretShareDialog\n isOpen={showShareDialog}\n onClose={() => setShowShareDialog(false)}\n vaultId={vaultId}\n secretId={secretId}\n name={secret.name}\n />\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DA,SAAgBA,IAAmB;CACjC,IAAM,EAAE,YAAS,gBAAaC,GAAiD,GACzE,EAAE,cAAW,KAAK,UAAUC,MAAkBC,GAAY,GAC1DC,KAAaC,GAAc,GAC3BC,KAAiBC,GAAY,GAE7BC,IAAKC,GAAM,GACXC,IAAeC,GAAuB,GAEtC,EAAE,MAAMC,IAAY,aAAS,UAAO,eAAYC,GAAaC,KAAY,IAAI,GAC7EC,IAASH,IAAY,WAErB,EAAE,MAAMI,IAAc,SAASC,OAAoBC,GAA0B;EACjF,WAAW;GAAE,UAAUJ,KAAY;GAAI,YAAY,EAAE,OAAO,GAAG;EAAE;EACjE,MAAM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ACV,kBAAC0G,IAAD;IACE,QAAQtE;IACR,eAAeC,EAAmB,EAAK;IAC9B;IACC;IACV,MAAMpC,EAAO;GACd,CAAA;EAEO;;AAEhB"}
1
+ {"version":3,"file":"SecretDetailPage.js","names":["Button","Badge","Badge$1","Button$1","SecretDetailPage","useParams","shellNavigate","useSecurity","actorLabel","useActorLabel","routerNavigate","useNavigate","tr","useTr","isFluidgrids","useIsFluidgridsVariant","secretData","useGetSecret","secretId","secret","versionsData","versionsLoading","useGetSecretVersionsQuery","versions","decryptedValue","decrypting","useSecretValue","deleteSecret","deletingSecret","useDeleteSecret","rotateSecret","rotatingSecret","useRotateSecret","updateSecret","updatingSecret","useUpdateSecret","rotating","rotateError","setRotateError","useState","rollbackSecret","rollingBack","useRollbackSecret","useSecurityEventEmitter","canDeleteSecret","usePermission","canUpdateSecret","canDecryptSecret","featureSecretRotate","useFeatureFlag","SECURITY_FEATURE_FLAGS","canRotate","showDeleteConfirm","setShowDeleteConfirm","showShareDialog","setShowShareDialog","showRotatePrompt","setShowRotatePrompt","rotateValueRef","useRef","openRotatePrompt","showHistoryModal","setShowHistoryModal","newRotationValue","setNewRotationValue","handleNavigate","path","handleBack","basePath","vaultId","handleDelete","emit","nativeNotify","err","requestDelete","result","nativeConfirm","handleRotate","refetch","handleRollback","loading","PageLayout","Loader2","error","Card","AlertTriangle","ArrowLeft","versionCount","rotationStatus","getRotationStatus","createdByLabel","overflowActions","Share2","RefreshCw","Trash2","CTAOverflowMenu","PagePurpose","KeyRound","NextSteps","isRevealed","reveal","SecretTypeBadge","RotationStatusBadge","label","GlassCard","Calendar","SecretValueDisplay","hide","History","OptionalFields","ShowTechnicalDetails","Clock","Shield","Dialog","open","DialogContent","DialogHeader","DialogTitle","cn","v","SecurityPermissionGuard","ConfirmDialog","SecretShareDialog"],"sources":["../../../src/security/pages/SecretDetailPage.tsx"],"sourcesContent":["import { useState, useRef } from 'react';\nimport { useParams, useNavigate } from 'react-router';\nimport {\n ArrowLeft,\n Edit2,\n Trash2,\n RefreshCw,\n History,\n Loader2,\n AlertTriangle,\n Clock,\n KeyRound,\n Shield,\n Calendar,\n Share2,\n} from 'lucide-react';\nimport {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogTitle,\n GlassCard,\n CTAOverflowMenu,\n type CTAAction,\n PagePurpose,\n NextSteps,\n OptionalFields,\n ShowTechnicalDetails,\n} from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { SecretValueDisplay } from '../components/SecretValueDisplay';\nimport { SecretTypeBadge } from '../components/SecretTypeBadge';\nimport { RotationStatusBadge } from '../components/RotationStatusBadge';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport { SecretShareDialog } from '../components/SecretShareDialog';\nimport { Button, Card, Badge } from '../components/ui';\nimport {\n useGetSecret,\n useDeleteSecret,\n useRotateSecret,\n useRollbackSecret,\n useUpdateSecret,\n} from '../hooks/useSecretQueries';\nimport { useSecurityEventEmitter } from '../hooks/useSecurityEventEmitter';\nimport { useGetSecretVersionsQuery } from '../../generated/wspace-operations';\nimport { useSecretValue } from '../hooks/useSecretValue';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { SecurityPermissionGuard } from '../components/SecurityPermissionGuard';\nimport { usePermission, useFeatureFlag } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { cn } from '../utils/cn';\nimport { useTr } from '../hooks/useTr';\nimport { useIsFluidgridsVariant } from '../hooks/useSecurityVariant';\nimport { useActorLabel } from '../hooks/useActorLabel';\nimport { getRotationStatus } from '../utils/rotationStatus';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\nimport { SECURITY_FEATURE_FLAGS } from '../constants/featureFlags';\nimport type { SecretType } from '../types';\n\nexport function SecretDetailPage() {\n const { vaultId, secretId } = useParams<{ vaultId: string; secretId: string }>();\n const { basePath = '/', navigate: shellNavigate } = useSecurity();\n const actorLabel = useActorLabel();\n const routerNavigate = useNavigate();\n\n const tr = useTr();\n const isFluidgrids = useIsFluidgridsVariant();\n\n const { data: secretData, loading, error, refetch } = useGetSecret(secretId ?? null);\n const secret = secretData?.getSecret;\n\n const { data: versionsData, loading: versionsLoading } = useGetSecretVersionsQuery({\n variables: { secretId: secretId ?? '', pagination: { limit: 50 } },\n skip: !secretId,\n fetchPolicy: 'network-only',\n });\n const versions = versionsData?.getSecretVersionsPaginated?.items ?? [];\n\n const {\n value: decryptedValue,\n reveal,\n hide,\n loading: decrypting,\n isRevealed,\n } = useSecretValue(secretId ?? '');\n\n const [deleteSecret, { loading: deletingSecret }] = useDeleteSecret();\n const [rotateSecret, { loading: rotatingSecret }] = useRotateSecret();\n const [updateSecret, { loading: updatingSecret }] = useUpdateSecret();\n const rotating = rotatingSecret || updatingSecret;\n const [rotateError, setRotateError] = useState<string | null>(null);\n const [rollbackSecret, { loading: rollingBack }] = useRollbackSecret();\n const { emit } = useSecurityEventEmitter();\n\n const canDeleteSecret = usePermission('secret:delete');\n const canUpdateSecret = usePermission('secret:update');\n const canDecryptSecret = usePermission('secret:decrypt');\n const featureSecretRotate = useFeatureFlag(SECURITY_FEATURE_FLAGS.SECRET_ROTATE, false);\n // FluidGrids (BOFF-11871): \"Update value\" works for anyone with\n // `secret:update`, whatever the rotate flag (off by default) says. It\n // saves through updateSecret (see handleRotate), which keeps the old value\n // in version history; rollback is unchanged.\n const canRotate = canUpdateSecret && (isFluidgrids || featureSecretRotate);\n\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\n const [showShareDialog, setShowShareDialog] = useState(false);\n const [showRotatePrompt, setShowRotatePrompt] = useState(false);\n const rotateValueRef = useRef<HTMLTextAreaElement>(null);\n const openRotatePrompt = () => {\n setRotateError(null);\n setShowRotatePrompt(true);\n // Focus next frame so the textarea has been mounted by then.\n requestAnimationFrame(() => rotateValueRef.current?.focus());\n };\n const [showHistoryModal, setShowHistoryModal] = useState(false);\n const [newRotationValue, setNewRotationValue] = useState('');\n\n const handleNavigate = (path: string) => {\n if (shellNavigate) {\n shellNavigate(path);\n } else {\n routerNavigate(path);\n }\n };\n\n const handleBack = () => {\n handleNavigate(`${basePath}/vaults/${vaultId}`);\n };\n\n const handleDelete = async () => {\n if (!secretId) return;\n try {\n await deleteSecret({ variables: { id: secretId } });\n emit('secret.deleted', { secretId, vaultId });\n setShowDeleteConfirm(false);\n void nativeNotify('success');\n handleBack();\n } catch (err) {\n console.error('Failed to delete secret:', err);\n void nativeNotify('error');\n }\n };\n\n const requestDelete = async () => {\n void nativeImpact('medium');\n const result = await nativeConfirm({\n title: 'Delete Secret',\n message: 'Delete this secret? This cannot be undone.',\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n if (result === null) {\n setShowDeleteConfirm(true);\n return;\n }\n if (result) {\n await handleDelete();\n }\n };\n\n const handleRotate = async () => {\n if (!secretId || !newRotationValue.trim()) return;\n setRotateError(null);\n try {\n if (isFluidgrids) {\n // FluidGrids' \"Update value\" replaces the value through updateSecret,\n // which needs only `secret:update`: it encrypts the new value with the\n // vault key and keeps the old one in version history, exactly as\n // rotation does, but is not behind the workspace's rotation feature.\n await updateSecret({\n variables: { id: secretId, input: { value: newRotationValue.trim() } },\n });\n emit('secret.updated', { secretId, vaultId });\n } else {\n await rotateSecret({ variables: { id: secretId, newValue: newRotationValue.trim() } });\n emit('secret.rotated', { secretId, vaultId });\n }\n setShowRotatePrompt(false);\n setNewRotationValue('');\n refetch();\n } catch (err) {\n console.error('Failed to rotate secret:', err);\n // The dialog used to stay open with no message; say what happened.\n // Plain words first; the server's own text only under technical details.\n setRotateError(err instanceof Error && err.message ? err.message : '');\n }\n };\n\n const handleRollback = async (version: number) => {\n if (!secretId) return;\n try {\n await rollbackSecret({ variables: { id: secretId, version } });\n emit('secret.rollback', { secretId, vaultId });\n refetch();\n setShowHistoryModal(false);\n } catch (err) {\n console.error('Failed to rollback secret:', err);\n }\n };\n\n if (loading && !secret) {\n return (\n <PageLayout\n title={tr('security.secretDetail.loading.title', 'Loading Secret...')}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.common.breadcrumbs.secret', 'Secret') },\n ]}\n >\n <div className=\"flex items-center justify-center py-20\">\n <Loader2 className=\"size-10 animate-spin text-primary/60\" />\n </div>\n </PageLayout>\n );\n }\n\n if (error || !secret) {\n return (\n <PageLayout\n title={tr('security.common.errorPage.title', 'Error')}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.common.breadcrumbs.secret', 'Secret') },\n ]}\n >\n <Card className=\"p-8 text-center max-w-lg mx-auto mt-10\">\n <div className=\"flex flex-col items-center gap-4\">\n <div className=\"p-3 rounded-full bg-status-error-bg/10\">\n <AlertTriangle className=\"size-8 text-status-error-text\" />\n </div>\n <div>\n <h3 className=\"text-lg font-bold text-text-primary\">\n {tr('security.secretDetail.error.title', 'Failed to load secret')}\n </h3>\n <p className=\"text-sm text-text-secondary mt-2\">\n {error?.message ??\n tr(\n 'security.secretDetail.error.description',\n 'Secret not found or access denied.'\n )}\n </p>\n </div>\n <Button variant=\"outline\" onClick={handleBack} className=\"mt-4\">\n <ArrowLeft className=\"size-4\" />\n {tr('security.secretDetail.actions.backToVault', 'Go Back to Vault')}\n </Button>\n </div>\n </Card>\n </PageLayout>\n );\n }\n\n const versionCount = secret.versionCount ?? 0;\n const rotationStatus = getRotationStatus(secret.expiresAt);\n const createdByLabel = actorLabel(secret.createdBy);\n\n return (\n <PageLayout\n title={secret.name}\n description={\n secret.description ??\n tr('security.secretDetail.description', 'View and manage this secret.')\n }\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n {\n label: tr('security.common.breadcrumbs.vault', 'Vault'),\n path: `${basePath}/vaults/${vaultId}`,\n },\n { label: secret.name },\n ]}\n actions={(() => {\n // Boff UI 2.0: keep \"Back\" as a quiet navigation button; collapse the\n // secondary actions (share / rotate / delete) into the overflow menu.\n // Gating preserved: rotate needs secret:update + SECRET_ROTATE flag.\n const overflowActions: CTAAction[] = [];\n if (canUpdateSecret) {\n overflowActions.push({\n label: tr('security.common.actions.share', 'Share'),\n icon: <Share2 className=\"size-4\" />,\n onSelect: () => setShowShareDialog(true),\n });\n }\n if (canRotate) {\n overflowActions.push({\n label: tr('security.secretDetail.actions.rotate', 'Rotate'),\n icon: <RefreshCw className=\"size-4\" />,\n onSelect: openRotatePrompt,\n });\n }\n if (canDeleteSecret) {\n overflowActions.push({\n label: tr('security.common.actions.delete', 'Delete'),\n icon: <Trash2 className=\"size-4\" />,\n intent: 'destructive',\n onSelect: () => void requestDelete(),\n });\n }\n return (\n <div className=\"flex flex-wrap items-center gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={handleBack}>\n <ArrowLeft className=\"size-4\" />\n <span className=\"hidden sm:inline\">\n {tr('security.secretDetail.actions.backToVault', 'Back to Vault')}\n </span>\n <span className=\"sm:hidden\">{tr('security.common.actions.back', 'Back')}</span>\n </Button>\n <CTAOverflowMenu actions={overflowActions} />\n </div>\n );\n })()}\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<KeyRound className=\"size-4\" />}>\n {tr(\n 'security.secretDetail.purpose',\n 'This is a single secret — an encrypted credential such as an API key, password or connection string. Reveal and copy its value when you need it (every reveal is logged), rotate it to a new value while keeping the old one in version history, roll back to a previous version, or share it securely with someone outside this vault.'\n )}\n </PagePurpose>\n\n {(canDecryptSecret || canUpdateSecret) && (\n <NextSteps\n storageKey=\"security-secret-detail\"\n steps={[\n ...(canDecryptSecret\n ? [\n {\n id: 'reveal',\n label: tr('security.secretDetail.next.reveal', 'Reveal the value'),\n description: tr(\n 'security.secretDetail.next.revealDesc',\n 'Decrypt and copy this secret when you need it.'\n ),\n icon: <KeyRound className=\"size-4\" />,\n onClick: isRevealed ? undefined : () => void reveal(),\n done: isRevealed,\n },\n ]\n : []),\n // FluidGrids offers one next step, \"Show the value\"; Share and\n // Update value stay in the ⋯ menu.\n ...(canUpdateSecret && !isFluidgrids\n ? [\n {\n id: 'share',\n label: tr('security.secretDetail.next.share', 'Share this secret'),\n description: tr(\n 'security.secretDetail.next.shareDesc',\n 'Send a confidential, expiring link to someone.'\n ),\n icon: <Share2 className=\"size-4\" />,\n onClick: () => setShowShareDialog(true),\n },\n ]\n : []),\n ...(canRotate && !isFluidgrids\n ? [\n {\n id: 'rotate',\n label: tr('security.secretDetail.next.rotate', 'Rotate the value'),\n description: tr(\n 'security.secretDetail.next.rotateDesc',\n 'Replace the value and keep the old one in history.'\n ),\n icon: <RefreshCw className=\"size-4\" />,\n onClick: openRotatePrompt,\n },\n ]\n : []),\n ]}\n />\n )}\n\n {/* Status and Info (FluidGrids: under \"More details\" below) */}\n {!isFluidgrids && (\n <div className=\"flex flex-wrap items-center gap-3\">\n <SecretTypeBadge type={secret.type as SecretType} />\n {rotationStatus && <RotationStatusBadge status={rotationStatus} />}\n <Badge variant=\"outline\" className=\"bg-bg-surface/50\">\n {tr('security.secretDetail.status.label', 'Status: {{status}}', {\n status: secret.status,\n })}\n </Badge>\n {secret.labels?.map((label: any) => (\n <Badge key={label.id} variant=\"outline\" className=\"border-primary/20 text-primary\">\n {label.label}\n </Badge>\n ))}\n </div>\n )}\n\n <div className=\"grid grid-cols-1 md:grid-cols-3 gap-6\">\n {/* Main Info */}\n <div className=\"md:col-span-2 space-y-6\">\n {/* Secret Value — the single emphasis zone on this page */}\n <GlassCard treatment=\"glass\" glow className=\"p-6\">\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-bold text-text-primary flex items-center gap-2\">\n <KeyRound className=\"size-5 text-primary\" />\n {tr('security.secretDetail.value.title', 'Secret Value')}\n </h2>\n {secret.expiresAt && (\n <div className=\"flex items-center gap-1.5 text-xs text-warning\">\n <Calendar className=\"size-3.5\" />\n {tr('security.secretDetail.value.expires', 'Expires: {{date}}', {\n date: new Date(secret.expiresAt).toLocaleDateString(),\n })}\n </div>\n )}\n </div>\n <SecretValueDisplay\n value={decryptedValue ?? ''}\n isRevealed={isRevealed}\n onToggleReveal={\n canDecryptSecret\n ? () => {\n if (isRevealed) {\n hide();\n } else {\n void reveal();\n }\n }\n : undefined\n }\n isLoading={decrypting}\n />\n <p className=\"text-xs text-text-secondary mt-4 italic\">\n {tr(\n 'security.secretDetail.value.note',\n 'Secret values are decrypted on-demand and never stored in plain text.'\n )}\n </p>\n </GlassCard>\n\n {/* Version History Summary (FluidGrids: under \"More details\") */}\n {!isFluidgrids && (\n <Card className=\"p-6 shadow-sm border-border-subtle/60\">\n <div className=\"flex items-center justify-between mb-6\">\n <h2 className=\"text-lg font-bold text-text-primary flex items-center gap-2\">\n <History className=\"size-5 text-primary\" />\n {tr('security.secretDetail.history.title', 'Version History')}\n </h2>\n <Badge variant=\"outline\" className=\"bg-bg-sunken font-mono\">\n {tr('security.secretDetail.history.totalVersions', '{{count}} total versions', {\n count: versionCount,\n })}\n </Badge>\n </div>\n\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between p-4 rounded-lg bg-action-primary-bg/5 border border-primary/10\">\n <div className=\"flex items-center gap-3\">\n <div className=\"size-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-primary text-xs font-bold tabular-nums\">\n v{secret.version ?? versionCount}\n </div>\n <div>\n <p className=\"text-sm font-semibold\">\n {tr(\n 'security.secretDetail.history.currentVersion',\n 'Current Active Version'\n )}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {tr(\n 'security.secretDetail.history.lastUpdated',\n 'Last updated {{date}}',\n {\n date: new Date(secret.updatedAt).toLocaleString(),\n }\n )}\n </p>\n </div>\n </div>\n <Badge variant=\"success\" className=\"text-[10px] uppercase\">\n {tr('security.common.status.active', 'Active')}\n </Badge>\n </div>\n\n {versionCount > 1 && (\n <div className=\"text-center py-4 border-2 border-dashed border-border-subtle/40 rounded-lg bg-bg-sunken/20\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'security.secretDetail.history.available',\n 'Historical versions are available. You can rollback to a previous state if needed.'\n )}\n </p>\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"mt-3\"\n onClick={() => setShowHistoryModal(true)}\n >\n {tr('security.secretDetail.history.viewFull', 'View Full History')}\n </Button>\n </div>\n )}\n </div>\n </Card>\n )}\n\n {isFluidgrids && (\n <OptionalFields\n storageKey=\"security.secretDetail.moreDetails\"\n label={tr('security.secretDetail.moreDetails', 'More details')}\n >\n <div className=\"space-y-4\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <SecretTypeBadge type={secret.type as SecretType} />\n {rotationStatus && <RotationStatusBadge status={rotationStatus} />}\n {secret.labels?.map((label: { id: string; label: string }) => (\n <Badge\n key={label.id}\n variant=\"outline\"\n className=\"border-primary/20 text-primary\"\n >\n {label.label}\n </Badge>\n ))}\n </div>\n <div className=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border-subtle p-4\">\n <div>\n <p className=\"text-sm font-semibold text-text-primary flex items-center gap-2\">\n <History className=\"size-4 text-primary\" />\n {tr('security.secretDetail.history.title', 'Version History')}\n </p>\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'security.secretDetail.history.totalVersions',\n '{{count}} total versions',\n { count: versionCount }\n )}\n </p>\n </div>\n <Button variant=\"outline\" size=\"sm\" onClick={() => setShowHistoryModal(true)}>\n {tr('security.secretDetail.history.viewFull', 'View Full History')}\n </Button>\n </div>\n <p className=\"text-sm text-text-secondary\">\n <span className=\"font-medium text-text-primary\">\n {tr('security.secretDetail.details.createdBy', 'Created By')}:\n </span>{' '}\n <span className=\"break-all\">{createdByLabel}</span>\n </p>\n <ShowTechnicalDetails copyable>\n {[\n `${tr('security.secretDetail.details.keyIdentifier', 'Key Identifier')}: ${secret.key}`,\n `${tr('security.secretDetail.details.createdBy', 'Created By')}: ${secret.createdBy}`,\n `${tr('security.secretDetail.status.name', 'Status')}: ${secret.status}`,\n `${tr('security.secretDetail.history.versionName', 'Version')}: ${secret.version ?? versionCount}`,\n ...(secret.lastRotatedAt\n ? [\n `${tr('security.secretDetail.details.lastRotation', 'Last Rotation')}: ${new Date(secret.lastRotatedAt).toLocaleString()}`,\n ]\n : []),\n ].join('\\n')}\n </ShowTechnicalDetails>\n </div>\n </OptionalFields>\n )}\n </div>\n\n {/* Sidebar Info */}\n <div className=\"space-y-6\">\n <Card className=\"p-6 shadow-sm border-border-subtle/60 space-y-4\">\n <h3 className=\"font-bold text-sm uppercase tracking-wider text-text-secondary\">\n {tr('security.secretDetail.details.title', 'Details')}\n </h3>\n\n <div className=\"space-y-3\">\n {!isFluidgrids && (\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr('security.secretDetail.details.keyIdentifier', 'Key Identifier')}\n </p>\n <code className=\"text-xs font-mono bg-bg-sunken px-1.5 py-0.5 rounded block mt-1 overflow-hidden text-ellipsis whitespace-nowrap\">\n {secret.key}\n </code>\n </div>\n )}\n {!isFluidgrids && (\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr('security.secretDetail.details.createdBy', 'Created By')}\n </p>\n <p className=\"text-sm font-medium mt-1\">{secret.createdBy}</p>\n </div>\n )}\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr('security.secretDetail.details.createdAt', 'Created At')}\n </p>\n <div className=\"flex items-center gap-1.5 text-sm mt-1\">\n <Clock className=\"size-3.5\" />\n {new Date(secret.createdAt).toLocaleDateString()}\n </div>\n </div>\n {secret.lastRotatedAt && !isFluidgrids && (\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr('security.secretDetail.details.lastRotation', 'Last Rotation')}\n </p>\n <p className=\"text-sm mt-1\">\n {new Date(secret.lastRotatedAt).toLocaleString()}\n </p>\n </div>\n )}\n </div>\n </Card>\n\n <GlassCard treatment=\"insight\" className=\"p-6 space-y-4\">\n <h3 className=\"font-bold text-sm text-primary flex items-center gap-2\">\n <Shield className=\"size-4\" />\n {tr('security.secretDetail.security.title', 'Security')}\n </h3>\n <p className=\"text-xs text-text-secondary leading-relaxed\">\n {tr(\n 'security.secretDetail.security.description',\n 'This secret is protected by 256-bit encryption. All access is logged and monitored for suspicious activity.'\n )}\n </p>\n </GlassCard>\n </div>\n </div>\n </div>\n\n {/* Version History Modal */}\n <Dialog\n open={showHistoryModal}\n onOpenChange={(open) => {\n if (!open) setShowHistoryModal(false);\n }}\n >\n <DialogContent className=\"max-w-2xl border-primary/20 max-h-[80vh] flex flex-col gap-0 p-0\">\n <DialogHeader className=\"p-6 border-b border-border-subtle text-left\">\n <div className=\"flex items-center gap-3\">\n <div className=\"p-2 rounded-full bg-action-primary-bg/10 text-primary\">\n <History className=\"size-5\" />\n </div>\n <DialogTitle className=\"text-xl font-bold\">\n {tr('security.secretDetail.history.modalTitle', 'Version History')}\n </DialogTitle>\n </div>\n </DialogHeader>\n\n <div className=\"p-6 overflow-y-auto flex-1\">\n {versionsLoading ? (\n <div className=\"flex justify-center py-8\">\n <Loader2 className=\"size-8 animate-spin text-primary/60\" />\n </div>\n ) : (\n <div className=\"space-y-4\">\n {versions.map((v: any) => (\n <div\n key={v.id}\n className={cn(\n 'p-4 rounded-lg border',\n v.version === secret.version\n ? 'bg-action-primary-bg/5 border-primary/20'\n : 'bg-bg-surface border-border-subtle'\n )}\n >\n <div className=\"flex items-center justify-between\">\n <div>\n <div className=\"flex items-center gap-2\">\n <span className=\"font-semibold\">\n {tr(\n 'security.secretDetail.history.versionLabel',\n 'Version {{version}}',\n {\n version: v.version,\n }\n )}\n </span>\n {v.version === secret.version && (\n <Badge variant=\"success\" className=\"text-[10px] uppercase\">\n {tr('security.common.status.active', 'Active')}\n </Badge>\n )}\n </div>\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'security.secretDetail.history.versionMeta',\n '{{date}} by {{createdBy}}',\n {\n date: new Date(v.createdAt).toLocaleString(),\n createdBy: v.createdBy,\n }\n )}\n </p>\n {v.changeReason && <p className=\"text-sm mt-2\">{v.changeReason}</p>}\n </div>\n {v.version !== secret.version && (\n <SecurityPermissionGuard\n permission=\"secret:update\"\n featureFlagKey={SECURITY_FEATURE_FLAGS.SECRET_ROLLBACK}\n featureFlagDefault={false}\n >\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => handleRollback(v.version)}\n disabled={rollingBack}\n >\n {tr('security.secretDetail.actions.rollback', 'Rollback')}\n </Button>\n </SecurityPermissionGuard>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n </DialogContent>\n </Dialog>\n\n {/* Delete confirmation */}\n <ConfirmDialog\n isOpen={showDeleteConfirm}\n onClose={() => setShowDeleteConfirm(false)}\n onConfirm={handleDelete}\n title={tr('security.secretDetail.delete.title', 'Delete Secret')}\n description={tr(\n 'security.secretDetail.delete.description',\n 'Are you sure you want to delete \"{{name}}\"? This action cannot be undone and will permanently remove this secret from the vault.',\n { name: secret.name }\n )}\n confirmLabel={\n deletingSecret\n ? tr('security.secretDetail.delete.deleting', 'Deleting...')\n : tr('security.secretDetail.delete.confirm', 'Delete Secret')\n }\n variant=\"destructive\"\n />\n\n {/* Rotate prompt */}\n <Dialog\n open={showRotatePrompt}\n onOpenChange={(open) => {\n if (!open) setShowRotatePrompt(false);\n }}\n >\n <DialogContent className=\"max-w-md border-primary/20\">\n <div className=\"space-y-4\">\n <DialogHeader className=\"text-left\">\n <div className=\"flex items-center gap-3\">\n <div className=\"p-2 rounded-full bg-action-primary-bg/10 text-primary\">\n <RefreshCw className=\"size-5\" />\n </div>\n <DialogTitle className=\"text-xl font-bold\">\n {tr('security.secretDetail.rotate.title', 'Rotate Secret')}\n </DialogTitle>\n </div>\n </DialogHeader>\n\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'security.secretDetail.rotate.description',\n 'Enter a new value for {{name}}. The current value will be moved to version history.',\n { name: secret.name }\n )}\n </p>\n\n <div className=\"space-y-2\">\n <label htmlFor=\"new-secret-value\" className=\"text-sm font-medium\">\n {tr('security.secretDetail.rotate.newValue', 'New Secret Value')}\n </label>\n <textarea\n id=\"new-secret-value\"\n aria-label={tr('security.secretDetail.rotate.newValue', 'New Secret Value')}\n ref={rotateValueRef}\n value={newRotationValue}\n onChange={(e) => setNewRotationValue(e.target.value)}\n placeholder={tr(\n 'security.secretDetail.rotate.placeholder',\n 'Enter new secret value...'\n )}\n rows={4}\n className={cn(\n 'w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono transition-all',\n 'focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary',\n 'placeholder:text-text-secondary/50'\n )}\n />\n </div>\n\n {rotateError !== null && (\n <div role=\"alert\" className=\"space-y-2\">\n <p className=\"text-sm text-status-error-text\">\n {tr(\n 'security.secretDetail.rotate.failed',\n 'The value could not be updated. Try again.'\n )}\n </p>\n {rotateError && <ShowTechnicalDetails copyable>{rotateError}</ShowTechnicalDetails>}\n </div>\n )}\n\n <div className=\"flex justify-end gap-3 pt-2\">\n <Button\n variant=\"outline\"\n onClick={() => setShowRotatePrompt(false)}\n disabled={rotating}\n >\n {tr('security.common.actions.cancel', 'Cancel')}\n </Button>\n <Button onClick={handleRotate} disabled={rotating || !newRotationValue.trim()}>\n {rotating ? (\n <Loader2 className=\"size-4 animate-spin\" />\n ) : (\n <RefreshCw className=\"size-4\" />\n )}\n {rotating\n ? tr('security.secretDetail.rotate.loading', 'Rotating...')\n : tr('security.secretDetail.rotate.confirm', 'Rotate Secret')}\n </Button>\n </div>\n </div>\n </DialogContent>\n </Dialog>\n\n {vaultId && secretId && (\n <SecretShareDialog\n isOpen={showShareDialog}\n onClose={() => setShowShareDialog(false)}\n vaultId={vaultId}\n secretId={secretId}\n name={secret.name}\n />\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DA,SAAgBI,IAAmB;CACjC,IAAM,EAAE,YAAS,gBAAaC,GAAiD,GACzE,EAAE,cAAW,KAAK,UAAUC,MAAkBC,GAAY,GAC1DC,KAAaC,GAAc,GAC3BC,KAAiBC,GAAY,GAE7BC,IAAKC,GAAM,GACXC,IAAeC,GAAuB,GAEtC,EAAE,MAAMC,IAAY,aAAS,UAAO,eA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W,GAAD,EAAW,WAAU,SAAU,CAAA,GAEhCzD,IACGxB,EAAG,wCAAwC,aAAa,IACxDA,EAAG,wCAAwC,eAAe,CACxD;QACL,CAAA,CAAA;;MACF;;IACQ,CAAA;GACT,CAAA;GAEPyD,KAAWnD,KACV,kBAACwG,IAAD;IACE,QAAQpE;IACR,eAAeC,EAAmB,EAAK;IAC9B;IACC;IACV,MAAMpC,EAAO;GACd,CAAA;EAEO;;AAEhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityDashboardPage.js","names":["SecurityDashboardPage","useSecurity","useSecurityDashboard","tr","useTr","go","navigate","path","loading","PageLayout","basePath","Loader2","error","Card","AlertTriangle","PagePurpose","Shield","NextSteps","Plus","Users","FileSearch","SecurityScoreCard","dashboard","GlassCard","Lock","KeyRound","Badge","v","ActivityTimeline","IllustratedEmptyState"],"sources":["../../../src/security/pages/SecurityDashboardPage.tsx"],"sourcesContent":["import {\n Shield,\n AlertTriangle,\n KeyRound,\n Lock,\n Loader2,\n Users,\n Plus,\n FileSearch,\n} from 'lucide-react';\nimport { GlassCard, IllustratedEmptyState, PagePurpose, NextSteps } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { SecurityScoreCard } from '../components/SecurityScoreCard';\nimport { ActivityTimeline } from '../components/ActivityTimeline';\nimport { Card, Badge } from '../components/ui';\nimport { useSecurityDashboard } from '../hooks/useSecurityDashboard';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useTr } from '../hooks/useTr';\n\nexport function SecurityDashboardPage() {\n const { basePath = '/', navigate } = useSecurity();\n const { dashboard, loading, error } = useSecurityDashboard();\n const tr = useTr();\n const go = (path: string) => {\n if (navigate) navigate(path);\n else window.location.assign(path);\n };\n\n if (loading) {\n return (\n <PageLayout\n title={tr('security.dashboard.title', 'Security Health')}\n breadcrumbs={[\n { label: tr('security.nav.security', 'Security'), path: basePath },\n { label: tr('security.nav.health', 'Health') },\n ]}\n >\n <div className=\"flex items-center justify-center py-16\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n </PageLayout>\n );\n }\n\n if (error) {\n return (\n <PageLayout\n title={tr('security.dashboard.title', 'Security Health')}\n breadcrumbs={[\n { label: tr('security.nav.security', 'Security'), path: basePath },\n { label: tr('security.nav.health', 'Health') },\n ]}\n >\n <Card className=\"p-6\">\n <div className=\"flex items-start gap-4\">\n <AlertTriangle className=\"size-6 text-status-error-text\" />\n <div>\n <h3 className=\"font-semibold text-status-error-text\">\n {tr('security.dashboard.error', 'Failed to load dashboard')}\n </h3>\n <p className=\"text-sm text-text-secondary mt-1\">{error.message}</p>\n </div>\n </div>\n </Card>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={tr('security.dashboard.title', 'Security Health')}\n description={tr(\n 'security.dashboard.description',\n 'Overview of your workspace security posture.'\n )}\n breadcrumbs={[\n { label: tr('security.nav.security', 'Security'), path: basePath },\n { label: tr('security.nav.health', 'Health') },\n ]}\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<Shield className=\"size-4\" />}>\n {tr(\n 'security.dashboard.purpose',\n 'This is the security health overview for your workspace. It rolls up how many vaults, secrets and members you have, flags vaults that are currently locked, and shows recent security activity — so you can spot risks (stale secrets, locked vaults, unusual access) at a glance before they become incidents.'\n )}\n </PagePurpose>\n\n <NextSteps\n storageKey=\"security-dashboard\"\n steps={[\n {\n id: 'create-vault',\n label: tr('security.dashboard.next.createVault', 'Create a vault'),\n description: tr(\n 'security.dashboard.next.createVaultDesc',\n 'Group related credentials into a secure container.'\n ),\n icon: <Plus className=\"size-4\" />,\n onClick: () => go(`${basePath}/vaults/new`),\n },\n {\n id: 'review-access',\n label: tr('security.dashboard.next.reviewAccess', 'Review who has access'),\n description: tr(\n 'security.dashboard.next.reviewAccessDesc',\n 'Check member roles across every vault.'\n ),\n icon: <Users className=\"size-4\" />,\n onClick: () => go(`${basePath}?tab=access-review`),\n },\n {\n id: 'audit',\n label: tr('security.dashboard.next.audit', 'Inspect the audit log'),\n description: tr(\n 'security.dashboard.next.auditDesc',\n 'See every security action taken recently.'\n ),\n icon: <FileSearch className=\"size-4\" />,\n onClick: () => go(`${basePath}?tab=audit`),\n },\n ]}\n />\n\n {/* Score and stats */}\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4\">\n <SecurityScoreCard score={dashboard.healthScore} glow />\n\n <GlassCard treatment=\"metric\" className=\"p-5\">\n <div className=\"flex items-center gap-2 text-text-secondary mb-1\">\n <Lock className=\"size-4\" />\n <span className=\"text-xs font-medium uppercase tracking-wider\">\n {tr('security.dashboard.vaults', 'Vaults')}\n </span>\n </div>\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">\n {dashboard.totalVaults}\n </p>\n </GlassCard>\n\n <GlassCard treatment=\"metric\" className=\"p-5\">\n <div className=\"flex items-center gap-2 text-text-secondary mb-1\">\n <KeyRound className=\"size-4\" />\n <span className=\"text-xs font-medium uppercase tracking-wider\">\n {tr('security.dashboard.secrets', 'Secrets')}\n </span>\n </div>\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">\n {dashboard.totalSecrets}\n </p>\n </GlassCard>\n\n <GlassCard treatment=\"metric\" className=\"p-5\">\n <div className=\"flex items-center gap-2 text-text-secondary mb-1\">\n <Users className=\"size-4\" />\n <span className=\"text-xs font-medium uppercase tracking-wider\">\n {tr('security.dashboard.members', 'Members')}\n </span>\n </div>\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">\n {dashboard.totalMembers}\n </p>\n </GlassCard>\n </div>\n\n {/* Locked-vault callout — a secondary attention zone. The single page\n emphasis stays on the glowing SecurityScoreCard above, so this uses\n an insight treatment rather than a competing EmphasisPanel. */}\n {dashboard.lockedVaults.length > 0 && (\n <GlassCard treatment=\"insight\" className=\"p-5\">\n <div className=\"flex items-center gap-2 mb-3\">\n <Lock className=\"size-5 text-status-warning-text\" />\n <h3 className=\"font-semibold text-text-primary\">\n {tr('security.dashboard.lockedVaults', 'Locked Vaults')}\n </h3>\n <Badge variant=\"warning\">{dashboard.lockedVaults.length}</Badge>\n </div>\n <ul className=\"space-y-2\">\n {dashboard.lockedVaults.slice(0, 5).map((v: any) => (\n <li key={v.id} className=\"text-sm text-text-secondary flex items-center gap-2\">\n <Lock className=\"size-3 text-status-warning-text shrink-0\" />\n <span className=\"truncate\">{v.name}</span>\n {v.lockedAt ? (\n <span className=\"text-xs text-text-secondary ml-auto tabular-nums\">\n since {new Date(v.lockedAt).toLocaleDateString()}\n </span>\n ) : null}\n </li>\n ))}\n </ul>\n </GlassCard>\n )}\n\n {/* Recent Activity */}\n <Card className=\"p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {tr('security.dashboard.recentActivity', 'Recent Activity')}\n </h2>\n {dashboard.recentActivity.length > 0 ? (\n <ActivityTimeline entries={dashboard.recentActivity} />\n ) : (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tr('security.dashboard.noActivity', 'No recent activity to display.')}\n glassIllustration=\"history\"\n size=\"panel\"\n />\n )}\n </Card>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;AAmBA,SAAgBA,IAAwB;CACtC,IAAM,EAAE,cAAW,KAAK,gBAAaC,EAAY,GAC3C,EAAE,cAAW,YAAS,aAAUC,EAAqB,GACrDC,IAAKC,EAAM,GACXC,KAAM,MAAiB;EAC3B,AAAIC,IAAUA,EAASC,CAAI,IACtB,OAAO,SAAS,OAAOA,CAAI;CAClC;CA0CA,OAxCIC,IAEA,kBAACC,GAAD;EACE,OAAON,EAAG,4BAA4B,iBAAiB;EACvD,aAAa,CACX;GAAE,OAAOA,EAAG,yBAAyB,UAAU;GAAG,MAAMO;EAAS,GACjE,EAAE,OAAOP,EAAG,uBAAuB,QAAQ,EAAE,CAC/C;EAEA,UAAA,kBAAC,OAAD;GAAK,WAAU;GACb,UAAA,kBAACQ,GAAD,EAAS,WAAU,mCAAoC,CAAA;EACpD,CAAA;CACK,CAAA,IAIZC,IAEA,kBAACH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ACV,CAAA,CACM;;KACR;;IAKJA,EAAU,aAAa,SAAS,KAC/B,kBAACC,GAAD;KAAW,WAAU;KAAU,WAAU;KAAzC,UAAA,CACE,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA;OACE,kBAACC,GAAD,EAAM,WAAU,kCAAmC,CAAA;OACnD,kBAAC,MAAD;QAAI,WAAU;QACX,UAAArB,EAAG,mCAAmC,eAAe;OACpD,CAAA;OACJ,kBAACuB,GAAD;QAAO,SAAQ;QAAW,UAAAJ,EAAU,aAAa;OAAc,CAAA;MAC5D;KACL,CAAA,GAAA,kBAAC,MAAD;MAAI,WAAU;MACX,UAAAA,EAAU,aAAa,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,MACvC,kBAAC,MAAD;OAAe,WAAU;OAAzB,UAAA;QACE,kBAACE,GAAD,EAAM,WAAU,2CAA4C,CAAA;QAC5D,kBAAC,QAAD;SAAM,WAAU;SAAY,UAAAG,EAAE;QAAW,CAAA;QACxCA,EAAE,WACD,kBAAC,QAAD;SAAM,WAAU;SAAhB,UAAA,CAAmE,UAC1D,IAAI,KAAKA,EAAE,QAAQ,CAAC,CAAC,mBAAmB,CAC3C;QACJ,CAAA,IAAA;OACF;MARK,GAAAA,EAAE,EAQP,CACL;KACC,CAAA,CACK;;IAIb,kBAACd,GAAD;KAAM,WAAU;KAAhB,UAAA,CACE,kBAAC,MAAD;MAAI,WAAU;MACX,UAAAV,EAAG,qCAAqC,iBAAiB;KACxD,CAAA,GACHmB,EAAU,eAAe,SAAS,IACjC,kBAACM,GAAD,EAAkB,SAASN,EAAU,eAAiB,CAAA,IAEtD,kBAACO,GAAD;MACE,cAAa;MACb,OAAO1B,EAAG,iCAAiC,gCAAgC;MAC3E,mBAAkB;MAClB,MAAK;KACN,CAAA,CAEC;;GACH;;CACK,CAAA;AAEhB"}
1
+ {"version":3,"file":"SecurityDashboardPage.js","names":["Badge","Badge$1","SecurityDashboardPage","useSecurity","useSecurityDashboard","tr","useTr","go","navigate","path","loading","PageLayout","basePath","Loader2","error","Card","AlertTriangle","PagePurpose","Shield","NextSteps","Plus","Users","FileSearch","SecurityScoreCard","dashboard","GlassCard","Lock","KeyRound","v","ActivityTimeline","IllustratedEmptyState"],"sources":["../../../src/security/pages/SecurityDashboardPage.tsx"],"sourcesContent":["import {\n Shield,\n AlertTriangle,\n KeyRound,\n Lock,\n Loader2,\n Users,\n Plus,\n FileSearch,\n} from 'lucide-react';\nimport { GlassCard, IllustratedEmptyState, PagePurpose, NextSteps } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { SecurityScoreCard } from '../components/SecurityScoreCard';\nimport { ActivityTimeline } from '../components/ActivityTimeline';\nimport { Card, Badge } from '../components/ui';\nimport { useSecurityDashboard } from '../hooks/useSecurityDashboard';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useTr } from '../hooks/useTr';\n\nexport function SecurityDashboardPage() {\n const { basePath = '/', navigate } = useSecurity();\n const { dashboard, loading, error } = useSecurityDashboard();\n const tr = useTr();\n const go = (path: string) => {\n if (navigate) navigate(path);\n else window.location.assign(path);\n };\n\n if (loading) {\n return (\n <PageLayout\n title={tr('security.dashboard.title', 'Security Health')}\n breadcrumbs={[\n { label: tr('security.nav.security', 'Security'), path: basePath },\n { label: tr('security.nav.health', 'Health') },\n ]}\n >\n <div className=\"flex items-center justify-center py-16\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n </PageLayout>\n );\n }\n\n if (error) {\n return (\n <PageLayout\n title={tr('security.dashboard.title', 'Security Health')}\n breadcrumbs={[\n { label: tr('security.nav.security', 'Security'), path: basePath },\n { label: tr('security.nav.health', 'Health') },\n ]}\n >\n <Card className=\"p-6\">\n <div className=\"flex items-start gap-4\">\n <AlertTriangle className=\"size-6 text-status-error-text\" />\n <div>\n <h3 className=\"font-semibold text-status-error-text\">\n {tr('security.dashboard.error', 'Failed to load dashboard')}\n </h3>\n <p className=\"text-sm text-text-secondary mt-1\">{error.message}</p>\n </div>\n </div>\n </Card>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={tr('security.dashboard.title', 'Security Health')}\n description={tr(\n 'security.dashboard.description',\n 'Overview of your workspace security posture.'\n )}\n breadcrumbs={[\n { label: tr('security.nav.security', 'Security'), path: basePath },\n { label: tr('security.nav.health', 'Health') },\n ]}\n >\n <div className=\"space-y-6\">\n <PagePurpose icon={<Shield className=\"size-4\" />}>\n {tr(\n 'security.dashboard.purpose',\n 'This is the security health overview for your workspace. It rolls up how many vaults, secrets and members you have, flags vaults that are currently locked, and shows recent security activity — so you can spot risks (stale secrets, locked vaults, unusual access) at a glance before they become incidents.'\n )}\n </PagePurpose>\n\n <NextSteps\n storageKey=\"security-dashboard\"\n steps={[\n {\n id: 'create-vault',\n label: tr('security.dashboard.next.createVault', 'Create a vault'),\n description: tr(\n 'security.dashboard.next.createVaultDesc',\n 'Group related credentials into a secure container.'\n ),\n icon: <Plus className=\"size-4\" />,\n onClick: () => go(`${basePath}/vaults/new`),\n },\n {\n id: 'review-access',\n label: tr('security.dashboard.next.reviewAccess', 'Review who has access'),\n description: tr(\n 'security.dashboard.next.reviewAccessDesc',\n 'Check member roles across every vault.'\n ),\n icon: <Users className=\"size-4\" />,\n onClick: () => go(`${basePath}?tab=access-review`),\n },\n {\n id: 'audit',\n label: tr('security.dashboard.next.audit', 'Inspect the audit log'),\n description: tr(\n 'security.dashboard.next.auditDesc',\n 'See every security action taken recently.'\n ),\n icon: <FileSearch className=\"size-4\" />,\n onClick: () => go(`${basePath}?tab=audit`),\n },\n ]}\n />\n\n {/* Score and stats */}\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4\">\n <SecurityScoreCard score={dashboard.healthScore} glow />\n\n <GlassCard treatment=\"metric\" className=\"p-5\">\n <div className=\"flex items-center gap-2 text-text-secondary mb-1\">\n <Lock className=\"size-4\" />\n <span className=\"text-xs font-medium uppercase tracking-wider\">\n {tr('security.dashboard.vaults', 'Vaults')}\n </span>\n </div>\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">\n {dashboard.totalVaults}\n </p>\n </GlassCard>\n\n <GlassCard treatment=\"metric\" className=\"p-5\">\n <div className=\"flex items-center gap-2 text-text-secondary mb-1\">\n <KeyRound className=\"size-4\" />\n <span className=\"text-xs font-medium uppercase tracking-wider\">\n {tr('security.dashboard.secrets', 'Secrets')}\n </span>\n </div>\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">\n {dashboard.totalSecrets}\n </p>\n </GlassCard>\n\n <GlassCard treatment=\"metric\" className=\"p-5\">\n <div className=\"flex items-center gap-2 text-text-secondary mb-1\">\n <Users className=\"size-4\" />\n <span className=\"text-xs font-medium uppercase tracking-wider\">\n {tr('security.dashboard.members', 'Members')}\n </span>\n </div>\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">\n {dashboard.totalMembers}\n </p>\n </GlassCard>\n </div>\n\n {/* Locked-vault callout — a secondary attention zone. The single page\n emphasis stays on the glowing SecurityScoreCard above, so this uses\n an insight treatment rather than a competing EmphasisPanel. */}\n {dashboard.lockedVaults.length > 0 && (\n <GlassCard treatment=\"insight\" className=\"p-5\">\n <div className=\"flex items-center gap-2 mb-3\">\n <Lock className=\"size-5 text-status-warning-text\" />\n <h3 className=\"font-semibold text-text-primary\">\n {tr('security.dashboard.lockedVaults', 'Locked Vaults')}\n </h3>\n <Badge variant=\"warning\">{dashboard.lockedVaults.length}</Badge>\n </div>\n <ul className=\"space-y-2\">\n {dashboard.lockedVaults.slice(0, 5).map((v: any) => (\n <li key={v.id} className=\"text-sm text-text-secondary flex items-center gap-2\">\n <Lock className=\"size-3 text-status-warning-text shrink-0\" />\n <span className=\"truncate\">{v.name}</span>\n {v.lockedAt ? (\n <span className=\"text-xs text-text-secondary ml-auto tabular-nums\">\n since {new Date(v.lockedAt).toLocaleDateString()}\n </span>\n ) : null}\n </li>\n ))}\n </ul>\n </GlassCard>\n )}\n\n {/* Recent Activity */}\n <Card className=\"p-6\">\n <h2 className=\"text-lg font-semibold text-text-primary mb-4\">\n {tr('security.dashboard.recentActivity', 'Recent Activity')}\n </h2>\n {dashboard.recentActivity.length > 0 ? (\n <ActivityTimeline entries={dashboard.recentActivity} />\n ) : (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tr('security.dashboard.noActivity', 'No recent activity to display.')}\n glassIllustration=\"history\"\n size=\"panel\"\n />\n )}\n </Card>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;AAmBA,SAAgBE,IAAwB;CACtC,IAAM,EAAE,cAAW,KAAK,gBAAaC,EAAY,GAC3C,EAAE,cAAW,YAAS,aAAUC,EAAqB,GACrDC,IAAKC,EAAM,GACXC,KAAM,MAAiB;EAC3B,AAAIC,IAAUA,EAASC,CAAI,IACtB,OAAO,SAAS,OAAOA,CAAI;CAClC;CA0CA,OAxCIC,IAEA,kBAACC,GAAD;EACE,OAAON,EAAG,4BAA4B,iBAAiB;EACvD,aAAa,CACX;GAAE,OAAOA,EAAG,yBAAyB,UAAU;GAAG,MAAMO;EAAS,GACjE,EAAE,OAAOP,EAAG,uBAAuB,QAAQ,EAAE,CAC/C;EAEA,UAAA,kBAAC,OAAD;GAAK,WAAU;GACb,UAAA,kBAACQ,GAAD,EAAS,WAAU,mCAAoC,CAAA;EACpD,CAAA;CACK,CAAA,IAIZC,IAEA,kBAACH,GAAD;EACE,OAAON,EAAG,4BAA4B,iBAAiB;EACvD,aAAa,CACX;GAAE,OAAOA,EAAG,yBAAyB,UAAU;GAAG,MAAMO;EAAS,GACjE,EAAE,OAAOP,EAAG,uBAAuB,QAAQ,EAAE,CAC/C;EAEA,UAAA,kBAACU,GAAD;GAAM,WAAU;GACd,UAAA,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAACC,GAAD,EAAe,WAAU,gCAAiC,CAAA,GAC1D,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;KACX,UAAAX,EAAG,4BAA4B,0BAA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ACX,UAAAA,EAAU,aAAa,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,MACvC,kBAAC,MAAD;OAAe,WAAU;OAAzB,UAAA;QACE,kBAACE,GAAD,EAAM,WAAU,2CAA4C,CAAA;QAC5D,kBAAC,QAAD;SAAM,WAAU;SAAY,UAAAE,EAAE;QAAW,CAAA;QACxCA,EAAE,WACD,kBAAC,QAAD;SAAM,WAAU;SAAhB,UAAA,CAAmE,UAC1D,IAAI,KAAKA,EAAE,QAAQ,CAAC,CAAC,mBAAmB,CAC3C;QACJ,CAAA,IAAA;OACF;MARK,GAAAA,EAAE,EAQP,CACL;KACC,CAAA,CACK;;IAIb,kBAACb,GAAD;KAAM,WAAU;KAAhB,UAAA,CACE,kBAAC,MAAD;MAAI,WAAU;MACX,UAAAV,EAAG,qCAAqC,iBAAiB;KACxD,CAAA,GACHmB,EAAU,eAAe,SAAS,IACjC,kBAACK,GAAD,EAAkB,SAASL,EAAU,eAAiB,CAAA,IAEtD,kBAACM,GAAD;MACE,cAAa;MACb,OAAOzB,EAAG,iCAAiC,gCAAgC;MAC3E,mBAAkB;MAClB,MAAK;KACN,CAAA,CAEC;;GACH;;CACK,CAAA;AAEhB"}
@@ -6,10 +6,10 @@ import { useMySharedCredentials as o, useRevealSharedCredential as s } from "../
6
6
  import { useTr as c } from "../hooks/useTr.js";
7
7
  import { useState as l } from "react";
8
8
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
- import { Check as f, Clock as p, Copy as m, Eye as h, EyeOff as g, FolderKey as _, KeyRound as v, Loader2 as y } from "lucide-react";
10
- import { IllustratedEmptyState as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
9
+ import { AlertTriangle as f, Check as p, Clock as m, Copy as h, Eye as g, EyeOff as _, FolderKey as v, KeyRound as y, Loader2 as b } from "lucide-react";
10
+ import { IllustratedEmptyState as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
11
11
  // src/security/pages/SharedWithMePage.tsx
12
- var S = ({ entry: e }) => {
12
+ var C = ({ entry: e }) => {
13
13
  let [t, n] = l(!1), [r, a] = l(!1), o = async () => {
14
14
  try {
15
15
  await navigator.clipboard.writeText(e.value), a(!0), setTimeout(() => a(!1), 1500);
@@ -29,13 +29,13 @@ var S = ({ entry: e }) => {
29
29
  onClick: () => n((e) => !e),
30
30
  className: "p-1 rounded hover:bg-accent text-text-secondary",
31
31
  "aria-label": t ? "Hide" : "Show",
32
- children: u(t ? g : h, { className: "size-3.5" })
32
+ children: u(t ? _ : g, { className: "size-3.5" })
33
33
  }), /* @__PURE__ */ u("button", {
34
34
  type: "button",
35
35
  onClick: () => void o(),
36
36
  className: "p-1 rounded hover:bg-accent text-text-secondary",
37
37
  "aria-label": "Copy",
38
- children: r ? /* @__PURE__ */ u(f, { className: "size-3.5 text-status-success-text" }) : /* @__PURE__ */ u(m, { className: "size-3.5" })
38
+ children: r ? /* @__PURE__ */ u(p, { className: "size-3.5 text-status-success-text" }) : /* @__PURE__ */ u(h, { className: "size-3.5" })
39
39
  })]
40
40
  })]
41
41
  }), /* @__PURE__ */ u("pre", {
@@ -43,7 +43,7 @@ var S = ({ entry: e }) => {
43
43
  children: t ? e.value : "••••••••••••"
44
44
  })]
45
45
  });
46
- }, C = ({ share: e }) => {
46
+ }, w = ({ share: e }) => {
47
47
  let [i, { data: a, loading: o }] = s(), c = a?.revealSharedCredential?.entries ?? [], l = a?.revealSharedCredential?.vaultName, f = c.length > 0;
48
48
  return /* @__PURE__ */ d(r, {
49
49
  className: "p-4",
@@ -53,7 +53,7 @@ var S = ({ entry: e }) => {
53
53
  className: "flex items-center gap-3 min-w-0",
54
54
  children: [/* @__PURE__ */ u("div", {
55
55
  className: "p-2 rounded-lg bg-action-primary-bg/10",
56
- children: e.scope === "VAULT" ? /* @__PURE__ */ u(_, { className: "size-5 text-primary" }) : /* @__PURE__ */ u(v, { className: "size-5 text-primary" })
56
+ children: e.scope === "VAULT" ? /* @__PURE__ */ u(v, { className: "size-5 text-primary" }) : /* @__PURE__ */ u(y, { className: "size-5 text-primary" })
57
57
  }), /* @__PURE__ */ d("div", {
58
58
  className: "min-w-0",
59
59
  children: [/* @__PURE__ */ u("p", {
@@ -66,7 +66,7 @@ var S = ({ entry: e }) => {
66
66
  children: e.role
67
67
  }), e.expiresAt && /* @__PURE__ */ d("span", {
68
68
  className: "text-xs text-text-secondary inline-flex items-center gap-1",
69
- children: [/* @__PURE__ */ u(p, { className: "size-3" }), new Date(e.expiresAt).toLocaleDateString()]
69
+ children: [/* @__PURE__ */ u(m, { className: "size-3" }), new Date(e.expiresAt).toLocaleDateString()]
70
70
  })]
71
71
  })]
72
72
  })]
@@ -75,44 +75,66 @@ var S = ({ entry: e }) => {
75
75
  variant: "outline",
76
76
  disabled: o,
77
77
  onClick: () => void i({ variables: { shareId: e.id } }),
78
- children: [o ? /* @__PURE__ */ u(y, { className: "size-4 animate-spin" }) : /* @__PURE__ */ u(h, { className: "size-4" }), "Reveal"]
78
+ children: [o ? /* @__PURE__ */ u(b, { className: "size-4 animate-spin" }) : /* @__PURE__ */ u(g, { className: "size-4" }), "Reveal"]
79
79
  })]
80
80
  }), f && /* @__PURE__ */ d("div", {
81
81
  className: "mt-3 space-y-2",
82
82
  children: [l && /* @__PURE__ */ d("p", {
83
83
  className: "text-xs text-text-secondary",
84
84
  children: ["From ", l]
85
- }), c.map((e) => /* @__PURE__ */ u(S, { entry: e }, e.id))]
85
+ }), c.map((e) => /* @__PURE__ */ u(C, { entry: e }, e.id))]
86
86
  })]
87
87
  });
88
88
  };
89
- function w() {
90
- let { basePath: t = "/" } = a(), n = c(), { data: r, loading: i } = o(), s = r?.mySharedCredentials?.items ?? [];
89
+ function T() {
90
+ let { basePath: t = "/" } = a(), i = c(), { data: s, loading: l, error: p, refetch: m } = o(), h = s?.mySharedCredentials?.items ?? [];
91
91
  return /* @__PURE__ */ d(e, {
92
- title: n("security.sharedWithMe.title", "Shared with me"),
93
- description: n("security.sharedWithMe.description", "Credentials other people have shared with your account."),
92
+ title: i("security.sharedWithMe.title", "Shared with me"),
93
+ description: i("security.sharedWithMe.description", "Credentials other people have shared with your account."),
94
94
  breadcrumbs: [{
95
- label: n("security.common.breadcrumbs.security", "Security"),
95
+ label: i("security.common.breadcrumbs.security", "Security"),
96
96
  path: t
97
- }, { label: n("security.sharedWithMe.title", "Shared with me") }],
98
- children: [/* @__PURE__ */ u(x, {
99
- icon: /* @__PURE__ */ u(_, { className: "size-4" }),
97
+ }, { label: i("security.sharedWithMe.title", "Shared with me") }],
98
+ children: [/* @__PURE__ */ u(S, {
99
+ icon: /* @__PURE__ */ u(v, { className: "size-4" }),
100
100
  className: "mb-6",
101
- children: n("security.sharedWithMe.purpose", "This is everything other people have shared directly with your account — individual secrets or whole vaults you do not own. Reveal a value only when you actually need it; each reveal is recorded, and some shares are time-limited and will stop working after they expire.")
102
- }), i ? /* @__PURE__ */ u("div", {
101
+ children: i("security.sharedWithMe.purpose", "This is everything other people have shared directly with your account — individual secrets or whole vaults you do not own. Reveal a value only when you actually need it; each reveal is recorded, and some shares are time-limited and will stop working after they expire.")
102
+ }), l ? /* @__PURE__ */ u("div", {
103
103
  className: "flex items-center justify-center py-20",
104
- children: /* @__PURE__ */ u(y, { className: "size-10 animate-spin text-primary/60" })
105
- }) : s.length === 0 ? /* @__PURE__ */ u(b, {
104
+ children: /* @__PURE__ */ u(b, { className: "size-10 animate-spin text-primary/60" })
105
+ }) : p ? /* @__PURE__ */ u(r, {
106
+ className: "p-6",
107
+ children: /* @__PURE__ */ d("div", {
108
+ className: "flex items-start gap-4",
109
+ children: [/* @__PURE__ */ u(f, { className: "size-6 text-status-error-text" }), /* @__PURE__ */ d("div", { children: [
110
+ /* @__PURE__ */ u("h3", {
111
+ className: "font-semibold text-status-error-text",
112
+ children: i("security.sharedWithMe.error", "Couldn’t load what was shared with you")
113
+ }),
114
+ /* @__PURE__ */ u("p", {
115
+ className: "text-sm text-text-secondary mt-1",
116
+ children: p.message
117
+ }),
118
+ /* @__PURE__ */ u(n, {
119
+ variant: "outline",
120
+ size: "sm",
121
+ className: "mt-3",
122
+ onClick: () => void m(),
123
+ children: i("security.sharedWithMe.retry", "Try again")
124
+ })
125
+ ] })]
126
+ })
127
+ }) : h.length === 0 ? /* @__PURE__ */ u(x, {
106
128
  illustration: "empty-files",
107
- title: n("security.sharedWithMe.empty.title", "Nothing shared with you yet"),
108
- description: n("security.sharedWithMe.empty.description", "When someone shares a credential with your account, it will appear here."),
129
+ title: i("security.sharedWithMe.empty.title", "Nothing shared with you yet"),
130
+ description: i("security.sharedWithMe.empty.description", "When someone shares a credential with your account, it will appear here."),
109
131
  glassIllustration: "security"
110
132
  }) : /* @__PURE__ */ u("div", {
111
133
  className: "space-y-3",
112
- children: s.map((e) => /* @__PURE__ */ u(C, { share: e }, e.id))
134
+ children: h.map((e) => /* @__PURE__ */ u(w, { share: e }, e.id))
113
135
  })]
114
136
  });
115
137
  }
116
- export { w as SharedWithMePage };
138
+ export { T as SharedWithMePage };
117
139
 
118
140
  //# sourceMappingURL=SharedWithMePage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SharedWithMePage.js","names":["SecretValueLine","shown","setShown","useState","copied","setCopied","copy","entry","s","jsx","EyeOff","Eye","Check","Copy","cn","SharedRow","revealCredential","useRevealSharedCredential","entries","data","vaultName","revealed","Card","share","FolderKey","KeyRound","Badge","Clock","Button","loading","Loader2","SharedWithMePage","useSecurity","tr","useTr","useMySharedCredentials","shares","PageLayout","basePath","PagePurpose","IllustratedEmptyState"],"sources":["../../../src/security/pages/SharedWithMePage.tsx"],"sourcesContent":["import { type FC, useState } from 'react';\nimport { Eye, EyeOff, Copy, Check, Loader2, Clock, FolderKey, KeyRound } from 'lucide-react';\nimport { IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { Button, Card, Badge } from '../components/ui';\nimport { cn } from '../utils/cn';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useMySharedCredentials, useRevealSharedCredential } from '../hooks/useShareQueries';\nimport { useTr } from '../hooks/useTr';\n\ninterface RevealedEntry {\n id: string;\n name: string;\n key: string;\n type: string;\n value: string;\n}\n\nconst SecretValueLine: FC<{ entry: RevealedEntry }> = ({ entry }) => {\n const [shown, setShown] = useState(false);\n const [copied, setCopied] = useState(false);\n const copy = async () => {\n try {\n await navigator.clipboard.writeText(entry.value);\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n } catch {\n /* clipboard unavailable */\n }\n };\n return (\n <div className=\"rounded-md border border-border-subtle/50 p-2.5\">\n <div className=\"flex items-center justify-between gap-2 mb-1\">\n <p className=\"text-sm font-medium text-text-primary truncate\">{entry.name}</p>\n <div className=\"flex items-center gap-1\">\n <button\n type=\"button\"\n onClick={() => setShown((s) => !s)}\n className=\"p-1 rounded hover:bg-accent text-text-secondary\"\n aria-label={shown ? 'Hide' : 'Show'}\n >\n {shown ? <EyeOff className=\"size-3.5\" /> : <Eye className=\"size-3.5\" />}\n </button>\n <button\n type=\"button\"\n onClick={() => void copy()}\n className=\"p-1 rounded hover:bg-accent text-text-secondary\"\n aria-label=\"Copy\"\n >\n {copied ? (\n <Check className=\"size-3.5 text-status-success-text\" />\n ) : (\n <Copy className=\"size-3.5\" />\n )}\n </button>\n </div>\n </div>\n <pre\n className={cn(\n 'text-sm font-mono break-all whitespace-pre-wrap rounded bg-bg-sunken/50 px-2 py-1.5 text-text-primary',\n !shown && 'select-none blur-sm'\n )}\n >\n {shown ? entry.value : '••••••••••••'}\n </pre>\n </div>\n );\n};\n\ninterface ShareItem {\n id: string;\n scope: string;\n role: string;\n label?: string | null;\n expiresAt?: string | null;\n}\n\nconst SharedRow: FC<{ share: ShareItem }> = ({ share }) => {\n const [revealCredential, { data, loading }] = useRevealSharedCredential();\n const entries = (data?.revealSharedCredential?.entries ?? []) as RevealedEntry[];\n const vaultName = data?.revealSharedCredential?.vaultName;\n const revealed = entries.length > 0;\n\n return (\n <Card className=\"p-4\">\n <div className=\"flex items-center justify-between gap-3\">\n <div className=\"flex items-center gap-3 min-w-0\">\n <div className=\"p-2 rounded-lg bg-action-primary-bg/10\">\n {share.scope === 'VAULT' ? (\n <FolderKey className=\"size-5 text-primary\" />\n ) : (\n <KeyRound className=\"size-5 text-primary\" />\n )}\n </div>\n <div className=\"min-w-0\">\n <p className=\"text-sm font-medium text-text-primary truncate\">\n {share.label || (share.scope === 'VAULT' ? 'Shared vault' : 'Shared credential')}\n </p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Badge variant=\"outline\">{share.role}</Badge>\n {share.expiresAt && (\n <span className=\"text-xs text-text-secondary inline-flex items-center gap-1\">\n <Clock className=\"size-3\" />\n {new Date(share.expiresAt).toLocaleDateString()}\n </span>\n )}\n </div>\n </div>\n </div>\n {!revealed && (\n <Button\n size=\"sm\"\n variant=\"outline\"\n disabled={loading}\n onClick={() => void revealCredential({ variables: { shareId: share.id } })}\n >\n {loading ? <Loader2 className=\"size-4 animate-spin\" /> : <Eye className=\"size-4\" />}\n Reveal\n </Button>\n )}\n </div>\n {revealed && (\n <div className=\"mt-3 space-y-2\">\n {vaultName && <p className=\"text-xs text-text-secondary\">From {vaultName}</p>}\n {entries.map((entry) => (\n <SecretValueLine key={entry.id} entry={entry} />\n ))}\n </div>\n )}\n </Card>\n );\n};\n\nexport function SharedWithMePage() {\n const { basePath = '/' } = useSecurity();\n const tr = useTr();\n const { data, loading } = useMySharedCredentials();\n const shares = (data?.mySharedCredentials?.items ?? []) as ShareItem[];\n\n return (\n <PageLayout\n title={tr('security.sharedWithMe.title', 'Shared with me')}\n description={tr(\n 'security.sharedWithMe.description',\n 'Credentials other people have shared with your account.'\n )}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.sharedWithMe.title', 'Shared with me') },\n ]}\n >\n <PagePurpose icon={<FolderKey className=\"size-4\" />} className=\"mb-6\">\n {tr(\n 'security.sharedWithMe.purpose',\n 'This is everything other people have shared directly with your account — individual secrets or whole vaults you do not own. Reveal a value only when you actually need it; each reveal is recorded, and some shares are time-limited and will stop working after they expire.'\n )}\n </PagePurpose>\n\n {loading ? (\n <div className=\"flex items-center justify-center py-20\">\n <Loader2 className=\"size-10 animate-spin text-primary/60\" />\n </div>\n ) : shares.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-files\"\n title={tr('security.sharedWithMe.empty.title', 'Nothing shared with you yet')}\n description={tr(\n 'security.sharedWithMe.empty.description',\n 'When someone shares a credential with your account, it will appear here.'\n )}\n glassIllustration=\"security\"\n />\n ) : (\n <div className=\"space-y-3\">\n {shares.map((share) => (\n <SharedRow key={share.id} share={share} />\n ))}\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;AAkBA,IAAMA,KAAiD,EAAE,eAAY;CACnE,IAAM,CAACC,GAAOC,KAAYC,EAAS,EAAK,GAClC,CAACC,GAAQC,KAAaF,EAAS,EAAK,GACpCG,IAAO,YAAY;EACvB,IAAI;GAGF,AAFA,MAAM,UAAU,UAAU,UAAUC,EAAM,KAAK,GAC/CF,EAAU,EAAI,GACd,iBAAiBA,EAAU,EAAK,GAAG,IAAI;EACzC,QAAQ,CAER;CACF;CACA,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,KAAD;IAAG,WAAU;IAAkD,UAAAE,EAAM;GAAQ,CAAA,GAC7E,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,UAAD;KACE,MAAK;KACL,eAAeL,GAAU,MAAM,CAACM,CAAC;KACjC,WAAU;KACV,cAAYP,IAAQ,SAAS;KAE5B,UAAQQ,EAARR,IAASS,IAAkCC,GAAnC,EAAQ,WAAU,WAAY,CAA+B;IAChE,CAAA,GACR,kBAAC,UAAD;KACE,MAAK;KACL,eAAe,KAAKL,EAAK;KACzB,WAAU;KACV,cAAW;KAEV,UAAAF,IACC,kBAACQ,GAAD,EAAO,WAA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;GAAK,WAAU;GACZ,UAAAG,EAAO,KAAK,MACX,kBAACrB,GAAD,EAAiC,SAAQ,GAAzBQ,EAAM,EAAmB,CAC1C;EACE,CAAA,CAEG;;AAEhB"}
1
+ {"version":3,"file":"SharedWithMePage.js","names":["Badge","Button","Badge$1","Button$1","SecretValueLine","shown","setShown","useState","copied","setCopied","copy","entry","s","jsx","EyeOff","Eye","Check","Copy","cn","SharedRow","revealCredential","useRevealSharedCredential","entries","data","vaultName","revealed","Card","share","FolderKey","KeyRound","Clock","loading","Loader2","SharedWithMePage","useSecurity","tr","useTr","useMySharedCredentials","shares","PageLayout","basePath","PagePurpose","error","AlertTriangle","refetch","IllustratedEmptyState"],"sources":["../../../src/security/pages/SharedWithMePage.tsx"],"sourcesContent":["import { type FC, useState } from 'react';\nimport {\n AlertTriangle,\n Eye,\n EyeOff,\n Copy,\n Check,\n Loader2,\n Clock,\n FolderKey,\n KeyRound,\n} from 'lucide-react';\nimport { IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { Button, Card, Badge } from '../components/ui';\nimport { cn } from '../utils/cn';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useMySharedCredentials, useRevealSharedCredential } from '../hooks/useShareQueries';\nimport { useTr } from '../hooks/useTr';\n\ninterface RevealedEntry {\n id: string;\n name: string;\n key: string;\n type: string;\n value: string;\n}\n\nconst SecretValueLine: FC<{ entry: RevealedEntry }> = ({ entry }) => {\n const [shown, setShown] = useState(false);\n const [copied, setCopied] = useState(false);\n const copy = async () => {\n try {\n await navigator.clipboard.writeText(entry.value);\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n } catch {\n /* clipboard unavailable */\n }\n };\n return (\n <div className=\"rounded-md border border-border-subtle/50 p-2.5\">\n <div className=\"flex items-center justify-between gap-2 mb-1\">\n <p className=\"text-sm font-medium text-text-primary truncate\">{entry.name}</p>\n <div className=\"flex items-center gap-1\">\n <button\n type=\"button\"\n onClick={() => setShown((s) => !s)}\n className=\"p-1 rounded hover:bg-accent text-text-secondary\"\n aria-label={shown ? 'Hide' : 'Show'}\n >\n {shown ? <EyeOff className=\"size-3.5\" /> : <Eye className=\"size-3.5\" />}\n </button>\n <button\n type=\"button\"\n onClick={() => void copy()}\n className=\"p-1 rounded hover:bg-accent text-text-secondary\"\n aria-label=\"Copy\"\n >\n {copied ? (\n <Check className=\"size-3.5 text-status-success-text\" />\n ) : (\n <Copy className=\"size-3.5\" />\n )}\n </button>\n </div>\n </div>\n <pre\n className={cn(\n 'text-sm font-mono break-all whitespace-pre-wrap rounded bg-bg-sunken/50 px-2 py-1.5 text-text-primary',\n !shown && 'select-none blur-sm'\n )}\n >\n {shown ? entry.value : '••••••••••••'}\n </pre>\n </div>\n );\n};\n\ninterface ShareItem {\n id: string;\n scope: string;\n role: string;\n label?: string | null;\n expiresAt?: string | null;\n}\n\nconst SharedRow: FC<{ share: ShareItem }> = ({ share }) => {\n const [revealCredential, { data, loading }] = useRevealSharedCredential();\n const entries = (data?.revealSharedCredential?.entries ?? []) as RevealedEntry[];\n const vaultName = data?.revealSharedCredential?.vaultName;\n const revealed = entries.length > 0;\n\n return (\n <Card className=\"p-4\">\n <div className=\"flex items-center justify-between gap-3\">\n <div className=\"flex items-center gap-3 min-w-0\">\n <div className=\"p-2 rounded-lg bg-action-primary-bg/10\">\n {share.scope === 'VAULT' ? (\n <FolderKey className=\"size-5 text-primary\" />\n ) : (\n <KeyRound className=\"size-5 text-primary\" />\n )}\n </div>\n <div className=\"min-w-0\">\n <p className=\"text-sm font-medium text-text-primary truncate\">\n {share.label || (share.scope === 'VAULT' ? 'Shared vault' : 'Shared credential')}\n </p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <Badge variant=\"outline\">{share.role}</Badge>\n {share.expiresAt && (\n <span className=\"text-xs text-text-secondary inline-flex items-center gap-1\">\n <Clock className=\"size-3\" />\n {new Date(share.expiresAt).toLocaleDateString()}\n </span>\n )}\n </div>\n </div>\n </div>\n {!revealed && (\n <Button\n size=\"sm\"\n variant=\"outline\"\n disabled={loading}\n onClick={() => void revealCredential({ variables: { shareId: share.id } })}\n >\n {loading ? <Loader2 className=\"size-4 animate-spin\" /> : <Eye className=\"size-4\" />}\n Reveal\n </Button>\n )}\n </div>\n {revealed && (\n <div className=\"mt-3 space-y-2\">\n {vaultName && <p className=\"text-xs text-text-secondary\">From {vaultName}</p>}\n {entries.map((entry) => (\n <SecretValueLine key={entry.id} entry={entry} />\n ))}\n </div>\n )}\n </Card>\n );\n};\n\nexport function SharedWithMePage() {\n const { basePath = '/' } = useSecurity();\n const tr = useTr();\n // A failed query is an error, never \"Nothing shared\" (BOFF-15820, plan §7 B2).\n const { data, loading, error, refetch } = useMySharedCredentials();\n const shares = (data?.mySharedCredentials?.items ?? []) as ShareItem[];\n\n return (\n <PageLayout\n title={tr('security.sharedWithMe.title', 'Shared with me')}\n description={tr(\n 'security.sharedWithMe.description',\n 'Credentials other people have shared with your account.'\n )}\n breadcrumbs={[\n { label: tr('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tr('security.sharedWithMe.title', 'Shared with me') },\n ]}\n >\n <PagePurpose icon={<FolderKey className=\"size-4\" />} className=\"mb-6\">\n {tr(\n 'security.sharedWithMe.purpose',\n 'This is everything other people have shared directly with your account — individual secrets or whole vaults you do not own. Reveal a value only when you actually need it; each reveal is recorded, and some shares are time-limited and will stop working after they expire.'\n )}\n </PagePurpose>\n\n {loading ? (\n <div className=\"flex items-center justify-center py-20\">\n <Loader2 className=\"size-10 animate-spin text-primary/60\" />\n </div>\n ) : error ? (\n <Card className=\"p-6\">\n <div className=\"flex items-start gap-4\">\n <AlertTriangle className=\"size-6 text-status-error-text\" />\n <div>\n <h3 className=\"font-semibold text-status-error-text\">\n {tr('security.sharedWithMe.error', 'Couldn’t load what was shared with you')}\n </h3>\n <p className=\"text-sm text-text-secondary mt-1\">{error.message}</p>\n <Button variant=\"outline\" size=\"sm\" className=\"mt-3\" onClick={() => void refetch()}>\n {tr('security.sharedWithMe.retry', 'Try again')}\n </Button>\n </div>\n </div>\n </Card>\n ) : shares.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-files\"\n title={tr('security.sharedWithMe.empty.title', 'Nothing shared with you yet')}\n description={tr(\n 'security.sharedWithMe.empty.description',\n 'When someone shares a credential with your account, it will appear here.'\n )}\n glassIllustration=\"security\"\n />\n ) : (\n <div className=\"space-y-3\">\n {shares.map((share) => (\n <SharedRow key={share.id} share={share} />\n ))}\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;AA4BA,IAAMI,KAAiD,EAAE,eAAY;CACnE,IAAM,CAACC,GAAOC,KAAYC,EAAS,EAAK,GAClC,CAACC,GAAQC,KAAaF,EAAS,EAAK,GACpCG,IAAO,YAAY;EACvB,IAAI;GAGF,AAFA,MAAM,UAAU,UAAU,UAAUC,EAAM,KAAK,GAC/CF,EAAU,EAAI,GACd,iBAAiBA,EAAU,EAAK,GAAG,IAAI;EACzC,QAAQ,CAER;CACF;CACA,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,KAAD;IAAG,WAAU;IAAkD,UAAAE,EAAM;GAAQ,CAAA,GAC7E,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,UAAD;KACE,MAAK;KACL,eAAeL,GAAU,MAAM,CAACM,CAAC;KACjC,WAAU;KACV,cAAYP,IAAQ,SAAS;KAE5B,UAAQQ,EAARR,IAASS,IAAkCC,GAAnC,EAAQ,WAAU,WAAY,CAA+B;IAChE,CAAA,GACR,kBAAC,UAAD;KACE,MAAK;KACL,eAAe,KAAKL,EAAK;KACzB,WAAU;KACV,cAAW;KAEV,UAAAF,IACC,kBAACQ,GAAD,EAAO,WAAU,oCAAqC,CAAA,IAEtD,kBAACC,GAAD,EAAM,WAAU,WAAY,CAAA;IAExB,CAAA,CACL;GACF,C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