@burdenoff/microfe-security 2026.608.1 → 2026.624.2
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.
- package/dist/security/components/ActivityTimeline.js +4 -4
- package/dist/security/components/ActivityTimeline.js.map +1 -1
- package/dist/security/components/BulkActionBar.js +3 -3
- package/dist/security/components/BulkActionBar.js.map +1 -1
- package/dist/security/components/ConfirmDialog.js +29 -38
- package/dist/security/components/ConfirmDialog.js.map +1 -1
- package/dist/security/components/CopyButton.js +2 -2
- package/dist/security/components/CopyButton.js.map +1 -1
- package/dist/security/components/ExportDialog.js +13 -13
- package/dist/security/components/ExportDialog.js.map +1 -1
- package/dist/security/components/ImportWizard.js +98 -105
- package/dist/security/components/ImportWizard.js.map +1 -1
- package/dist/security/components/PageLayout.js +2 -2
- package/dist/security/components/PageLayout.js.map +1 -1
- package/dist/security/components/PasswordGenerator.js +6 -6
- package/dist/security/components/PasswordGenerator.js.map +1 -1
- package/dist/security/components/SecretFormFields.js +12 -12
- package/dist/security/components/SecretFormFields.js.map +1 -1
- package/dist/security/components/SecretRow.js +4 -4
- package/dist/security/components/SecretRow.js.map +1 -1
- package/dist/security/components/SecretShareDialog.js +94 -105
- package/dist/security/components/SecretShareDialog.js.map +1 -1
- package/dist/security/components/SecretTypeBadge.js +1 -1
- package/dist/security/components/SecretTypeBadge.js.map +1 -1
- package/dist/security/components/SecretValueDisplay.js +5 -5
- package/dist/security/components/SecretValueDisplay.js.map +1 -1
- package/dist/security/components/SecurityScoreCard.js +2 -2
- package/dist/security/components/SecurityScoreCard.js.map +1 -1
- package/dist/security/components/VaultCard.js +5 -5
- package/dist/security/components/VaultCard.js.map +1 -1
- package/dist/security/components/VaultFormFields.js +6 -6
- package/dist/security/components/VaultFormFields.js.map +1 -1
- package/dist/security/components/VaultShareDialog.js +27 -41
- package/dist/security/components/VaultShareDialog.js.map +1 -1
- package/dist/security/components/ui.js +13 -13
- package/dist/security/components/ui.js.map +1 -1
- package/dist/security/pages/AccessReviewPage.js +59 -74
- package/dist/security/pages/AccessReviewPage.js.map +1 -1
- package/dist/security/pages/AuditLogPage.js +13 -13
- package/dist/security/pages/AuditLogPage.js.map +1 -1
- package/dist/security/pages/ImportExportPage.js +3 -3
- package/dist/security/pages/ImportExportPage.js.map +1 -1
- package/dist/security/pages/ProviderDetailPage.js +141 -156
- package/dist/security/pages/ProviderDetailPage.js.map +1 -1
- package/dist/security/pages/ProvidersPage.js +12 -12
- package/dist/security/pages/ProvidersPage.js.map +1 -1
- package/dist/security/pages/SecretCreatePage.js +9 -9
- package/dist/security/pages/SecretCreatePage.js.map +1 -1
- package/dist/security/pages/SecretDetailPage.js +222 -227
- package/dist/security/pages/SecretDetailPage.js.map +1 -1
- package/dist/security/pages/SecurityDashboardPage.js +14 -14
- package/dist/security/pages/SecurityDashboardPage.js.map +1 -1
- package/dist/security/pages/SharedWithMePage.js +10 -10
- package/dist/security/pages/SharedWithMePage.js.map +1 -1
- package/dist/security/pages/VaultCreatePage.js +2 -2
- package/dist/security/pages/VaultCreatePage.js.map +1 -1
- package/dist/security/pages/VaultDetailPage.js +9 -9
- package/dist/security/pages/VaultDetailPage.js.map +1 -1
- package/dist/security/pages/VaultSettingsPage.js +28 -28
- package/dist/security/pages/VaultSettingsPage.js.map +1 -1
- package/dist/security/pages/VaultShareViewer.js +21 -21
- package/dist/security/pages/VaultShareViewer.js.map +1 -1
- package/dist/security/pages/VaultsDashboardPage.js +17 -17
- package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
- package/dist/security/routes/routeUtils.js +5 -5
- package/dist/security/routes/routeUtils.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecretDetailPage.js","names":[],"sources":["../../../src/security/pages/SecretDetailPage.tsx"],"sourcesContent":["import { useState, useRef } from 'react';\nimport { useParams, useNavigate } from 'react-router-dom';\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 X,\n} from 'lucide-react';\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} 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 } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { cn } from '../utils/cn';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\nimport { translateWithFallback } from '../utils/i18n';\nimport { SECURITY_FEATURE_FLAGS } from '../constants/featureFlags';\nimport type { SecretType, RotationStatus } from '../types';\n\nexport function SecretDetailPage() {\n const { vaultId, secretId } = useParams<{ vaultId: string; secretId: string }>();\n const { basePath = '/', navigate: shellNavigate } = useSecurity();\n const { t } = useI18n();\n const routerNavigate = useNavigate();\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: rotating }] = useRotateSecret();\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\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 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 const tx = (key: string, fallback: string, params?: Record<string, string | number>) =>\n translateWithFallback(t, key, fallback, params);\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 try {\n await rotateSecret({ variables: { id: secretId, newValue: newRotationValue.trim() } });\n emit('secret.rotated', { secretId, vaultId });\n setShowRotatePrompt(false);\n setNewRotationValue('');\n refetch();\n } catch (err) {\n console.error('Failed to rotate secret:', err);\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={tx('security.secretDetail.loading.title', 'Loading Secret...')}\n breadcrumbs={[\n { label: tx('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tx('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={tx('security.common.errorPage.title', 'Error')}\n breadcrumbs={[\n { label: tx('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tx('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-destructive/10\">\n <AlertTriangle className=\"size-8 text-destructive\" />\n </div>\n <div>\n <h3 className=\"text-lg font-bold text-foreground\">\n {tx('security.secretDetail.error.title', 'Failed to load secret')}\n </h3>\n <p className=\"text-sm text-muted-foreground mt-2\">\n {error?.message ??\n tx(\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 {tx('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: RotationStatus | undefined = secret.lastRotatedAt ? 'healthy' : undefined;\n\n return (\n <PageLayout\n title={secret.name}\n description={\n secret.description ??\n tx('security.secretDetail.description', 'View and manage this secret.')\n }\n breadcrumbs={[\n { label: tx('security.common.breadcrumbs.security', 'Security'), path: basePath },\n {\n label: tx('security.common.breadcrumbs.vault', 'Vault'),\n path: `${basePath}/vaults/${vaultId}`,\n },\n { label: secret.name },\n ]}\n actions={\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 {tx('security.secretDetail.actions.backToVault', 'Back to Vault')}\n </span>\n <span className=\"sm:hidden\">{tx('security.common.actions.back', 'Back')}</span>\n </Button>\n {canUpdateSecret && (\n <Button variant=\"outline\" size=\"sm\" onClick={() => setShowShareDialog(true)}>\n <Share2 className=\"size-4\" />\n {tx('security.common.actions.share', 'Share')}\n </Button>\n )}\n <SecurityPermissionGuard\n permission=\"secret:update\"\n featureFlagKey={SECURITY_FEATURE_FLAGS.SECRET_ROTATE}\n featureFlagDefault={false}\n >\n <Button variant=\"outline\" size=\"sm\" onClick={openRotatePrompt}>\n <RefreshCw className=\"size-4\" />\n {tx('security.secretDetail.actions.rotate', 'Rotate')}\n </Button>\n </SecurityPermissionGuard>\n {canDeleteSecret && (\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"text-destructive hover:bg-destructive/10 border-destructive/20\"\n onClick={() => void requestDelete()}\n >\n <Trash2 className=\"size-4\" />\n {tx('security.common.actions.delete', 'Delete')}\n </Button>\n )}\n </div>\n }\n >\n <div className=\"space-y-6\">\n {/* Status and Info */}\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-background/50\">\n {tx('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 <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 */}\n <Card className=\"p-6 shadow-sm border-border/60\">\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-bold text-foreground flex items-center gap-2\">\n <KeyRound className=\"size-5 text-primary\" />\n {tx('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 {tx('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-muted-foreground mt-4 italic\">\n {tx(\n 'security.secretDetail.value.note',\n 'Secret values are decrypted on-demand and never stored in plain text.'\n )}\n </p>\n </Card>\n\n {/* Version History Summary */}\n <Card className=\"p-6 shadow-sm border-border/60\">\n <div className=\"flex items-center justify-between mb-6\">\n <h2 className=\"text-lg font-bold text-foreground flex items-center gap-2\">\n <History className=\"size-5 text-primary\" />\n {tx('security.secretDetail.history.title', 'Version History')}\n </h2>\n <Badge variant=\"outline\" className=\"bg-muted font-mono\">\n {tx('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-primary/5 border border-primary/10\">\n <div className=\"flex items-center gap-3\">\n <div className=\"size-8 rounded-full bg-primary/10 flex items-center justify-center text-primary text-xs font-bold\">\n v{secret.version ?? versionCount}\n </div>\n <div>\n <p className=\"text-sm font-semibold\">\n {tx(\n 'security.secretDetail.history.currentVersion',\n 'Current Active Version'\n )}\n </p>\n <p className=\"text-xs text-muted-foreground\">\n {tx('security.secretDetail.history.lastUpdated', 'Last updated {date}', {\n date: new Date(secret.updatedAt).toLocaleString(),\n })}\n </p>\n </div>\n </div>\n <Badge variant=\"success\" className=\"text-[10px] uppercase\">\n {tx('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/40 rounded-lg bg-muted/20\">\n <p className=\"text-sm text-muted-foreground\">\n {tx(\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 {tx('security.secretDetail.history.viewFull', 'View Full History')}\n </Button>\n </div>\n )}\n </div>\n </Card>\n </div>\n\n {/* Sidebar Info */}\n <div className=\"space-y-6\">\n <Card className=\"p-6 shadow-sm border-border/60 space-y-4\">\n <h3 className=\"font-bold text-sm uppercase tracking-wider text-muted-foreground\">\n {tx('security.secretDetail.details.title', 'Details')}\n </h3>\n\n <div className=\"space-y-3\">\n <div>\n <p className=\"text-xs text-muted-foreground\">\n {tx('security.secretDetail.details.keyIdentifier', 'Key Identifier')}\n </p>\n <code className=\"text-xs font-mono bg-muted px-1.5 py-0.5 rounded block mt-1 overflow-hidden text-ellipsis whitespace-nowrap\">\n {secret.key}\n </code>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">\n {tx('security.secretDetail.details.createdBy', 'Created By')}\n </p>\n <p className=\"text-sm font-medium mt-1\">{secret.createdBy}</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">\n {tx('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 && (\n <div>\n <p className=\"text-xs text-muted-foreground\">\n {tx('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 <Card className=\"p-6 shadow-sm border-border/60 space-y-4 bg-primary/5 border-primary/10\">\n <h3 className=\"font-bold text-sm text-primary flex items-center gap-2\">\n <Shield className=\"size-4\" />\n {tx('security.secretDetail.security.title', 'Security')}\n </h3>\n <p className=\"text-xs text-muted-foreground leading-relaxed\">\n {tx(\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 </Card>\n </div>\n </div>\n </div>\n\n {/* Version History Modal */}\n {showHistoryModal && (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center p-4\">\n <button\n type=\"button\"\n aria-label=\"Close version history\"\n className=\"absolute inset-0 bg-background/80 backdrop-blur-sm animate-in fade-in duration-200 cursor-default\"\n onClick={() => setShowHistoryModal(false)}\n />\n <Card className=\"relative z-10 w-full max-w-2xl shadow-2xl animate-in zoom-in-95 duration-200 border-primary/20 max-h-[80vh] flex flex-col\">\n <div className=\"flex items-center justify-between p-6 border-b border-border\">\n <div className=\"flex items-center gap-3\">\n <div className=\"p-2 rounded-full bg-primary/10 text-primary\">\n <History className=\"size-5\" />\n </div>\n <h2 className=\"text-xl font-bold text-foreground\">\n {tx('security.secretDetail.history.modalTitle', 'Version History')}\n </h2>\n </div>\n <button\n type=\"button\"\n onClick={() => setShowHistoryModal(false)}\n className=\"p-2 rounded-md hover:bg-muted text-muted-foreground transition-colors\"\n >\n <X className=\"size-5\" />\n </button>\n </div>\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-primary/5 border-primary/20'\n : 'bg-card border-border'\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 {tx(\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 {tx('security.common.status.active', 'Active')}\n </Badge>\n )}\n </div>\n <p className=\"text-xs text-muted-foreground mt-1\">\n {tx(\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 {tx('security.secretDetail.actions.rollback', 'Rollback')}\n </Button>\n </SecurityPermissionGuard>\n )}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n </Card>\n </div>\n )}\n\n {/* Delete confirmation */}\n <ConfirmDialog\n isOpen={showDeleteConfirm}\n onClose={() => setShowDeleteConfirm(false)}\n onConfirm={handleDelete}\n title={tx('security.secretDetail.delete.title', 'Delete Secret')}\n description={tx(\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 ? tx('security.secretDetail.delete.deleting', 'Deleting...')\n : tx('security.secretDetail.delete.confirm', 'Delete Secret')\n }\n variant=\"destructive\"\n />\n\n {/* Rotate prompt */}\n {showRotatePrompt && (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center p-4\">\n <button\n type=\"button\"\n aria-label=\"Close rotate dialog\"\n className=\"absolute inset-0 bg-background/80 backdrop-blur-sm animate-in fade-in duration-200 cursor-default\"\n onClick={() => setShowRotatePrompt(false)}\n />\n <Card className=\"relative z-10 w-full max-w-md shadow-2xl animate-in zoom-in-95 duration-200 border-primary/20\">\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center gap-3\">\n <div className=\"p-2 rounded-full bg-primary/10 text-primary\">\n <RefreshCw className=\"size-5\" />\n </div>\n <h2 className=\"text-xl font-bold text-foreground\">\n {tx('security.secretDetail.rotate.title', 'Rotate Secret')}\n </h2>\n </div>\n\n <p className=\"text-sm text-muted-foreground\">\n {tx(\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 {tx('security.secretDetail.rotate.newValue', 'New Secret Value')}\n </label>\n <textarea\n id=\"new-secret-value\"\n aria-label={tx('security.secretDetail.rotate.newValue', 'New Secret Value')}\n ref={rotateValueRef}\n value={newRotationValue}\n onChange={(e) => setNewRotationValue(e.target.value)}\n placeholder={tx(\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 bg-background 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-muted-foreground/50'\n )}\n />\n </div>\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 {tx('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 ? tx('security.secretDetail.rotate.loading', 'Rotating...')\n : tx('security.secretDetail.rotate.confirm', 'Rotate Secret')}\n </Button>\n </div>\n </div>\n </Card>\n </div>\n )}\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":";;;;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAgB,IAAmB;CACjC,IAAM,EAAE,YAAS,gBAAa,IAAkD,EAC1E,EAAE,cAAW,KAAK,UAAU,MAAkB,GAAa,EAC3D,EAAE,SAAM,GAAS,EACjB,IAAiB,IAAa,EAE9B,EAAE,MAAM,GAAY,YAAS,UAAO,eAAY,GAAa,KAAY,KAAK,EAC9E,IAAS,GAAY,WAErB,EAAE,MAAM,IAAc,SAAS,OAAoB,GAA0B;EACjF,WAAW;GAAE,UAAU,KAAY;GAAI,YAAY,EAAE,OAAO,IAAI;GAAE;EAClE,MAAM,CAAC;EACP,aAAa;EACd,CAAC,EACI,KAAW,IAAc,4BAA4B,SAAS,EAAE,EAEhE,EACJ,OAAO,IACP,YACA,UACA,SAAS,IACT,kBACE,EAAe,KAAY,GAAG,EAE5B,CAAC,IAAc,EAAE,SAAS,QAAoB,IAAiB,EAC/D,CAAC,IAAc,EAAE,SAAS,OAAc,IAAiB,EACzD,CAAC,IAAgB,EAAE,SAAS,QAAiB,IAAmB,EAChE,EAAE,YAAS,IAAyB,EAEpC,KAAkB,EAAc,gBAAgB,EAChD,KAAkB,EAAc,gBAAgB,EAChD,KAAmB,EAAc,iBAAiB,EAElD,CAAC,IAAmB,KAAwB,EAAS,GAAM,EAC3D,CAAC,IAAiB,KAAsB,EAAS,GAAM,EACvD,CAAC,IAAkB,KAAuB,EAAS,GAAM,EACzD,IAAiB,GAA4B,KAAK,EAClD,WAAyB;AAG7B,EAFA,EAAoB,GAAK,EAEzB,4BAA4B,EAAe,SAAS,OAAO,CAA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AA7E,CACG,IACC,kBAAC,GAAD,EAAS,WAAU,uBAAwB,CAAA,GAE3C,kBAAC,GAAD,EAAW,WAAU,UAAW,CAAA,EAEjC,IACG,EAAG,wCAAwC,cAAc,GACzD,EAAG,wCAAwC,gBAAgB,CACxD;WACL;;OACF;;KACD,CAAA,CACH;;GAGP,KAAW,KACV,kBAAC,GAAD;IACE,QAAQ;IACR,eAAe,EAAmB,GAAM;IAC/B;IACC;IACV,MAAM,EAAO;IACb,CAAA;GAEO"}
|
|
1
|
+
{"version":3,"file":"SecretDetailPage.js","names":[],"sources":["../../../src/security/pages/SecretDetailPage.tsx"],"sourcesContent":["import { useState, useRef } from 'react';\nimport { useParams, useNavigate } from 'react-router-dom';\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 { Dialog, DialogContent, DialogHeader, DialogTitle } 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} 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 } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { cn } from '../utils/cn';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\nimport { translateWithFallback } from '../utils/i18n';\nimport { SECURITY_FEATURE_FLAGS } from '../constants/featureFlags';\nimport type { SecretType, RotationStatus } from '../types';\n\nexport function SecretDetailPage() {\n const { vaultId, secretId } = useParams<{ vaultId: string; secretId: string }>();\n const { basePath = '/', navigate: shellNavigate } = useSecurity();\n const { t } = useI18n();\n const routerNavigate = useNavigate();\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: rotating }] = useRotateSecret();\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\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 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 const tx = (key: string, fallback: string, params?: Record<string, string | number>) =>\n translateWithFallback(t, key, fallback, params);\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 try {\n await rotateSecret({ variables: { id: secretId, newValue: newRotationValue.trim() } });\n emit('secret.rotated', { secretId, vaultId });\n setShowRotatePrompt(false);\n setNewRotationValue('');\n refetch();\n } catch (err) {\n console.error('Failed to rotate secret:', err);\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={tx('security.secretDetail.loading.title', 'Loading Secret...')}\n breadcrumbs={[\n { label: tx('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tx('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={tx('security.common.errorPage.title', 'Error')}\n breadcrumbs={[\n { label: tx('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tx('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 {tx('security.secretDetail.error.title', 'Failed to load secret')}\n </h3>\n <p className=\"text-sm text-text-secondary mt-2\">\n {error?.message ??\n tx(\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 {tx('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: RotationStatus | undefined = secret.lastRotatedAt ? 'healthy' : undefined;\n\n return (\n <PageLayout\n title={secret.name}\n description={\n secret.description ??\n tx('security.secretDetail.description', 'View and manage this secret.')\n }\n breadcrumbs={[\n { label: tx('security.common.breadcrumbs.security', 'Security'), path: basePath },\n {\n label: tx('security.common.breadcrumbs.vault', 'Vault'),\n path: `${basePath}/vaults/${vaultId}`,\n },\n { label: secret.name },\n ]}\n actions={\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 {tx('security.secretDetail.actions.backToVault', 'Back to Vault')}\n </span>\n <span className=\"sm:hidden\">{tx('security.common.actions.back', 'Back')}</span>\n </Button>\n {canUpdateSecret && (\n <Button variant=\"outline\" size=\"sm\" onClick={() => setShowShareDialog(true)}>\n <Share2 className=\"size-4\" />\n {tx('security.common.actions.share', 'Share')}\n </Button>\n )}\n <SecurityPermissionGuard\n permission=\"secret:update\"\n featureFlagKey={SECURITY_FEATURE_FLAGS.SECRET_ROTATE}\n featureFlagDefault={false}\n >\n <Button variant=\"outline\" size=\"sm\" onClick={openRotatePrompt}>\n <RefreshCw className=\"size-4\" />\n {tx('security.secretDetail.actions.rotate', 'Rotate')}\n </Button>\n </SecurityPermissionGuard>\n {canDeleteSecret && (\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"text-status-error-text hover:bg-status-error-bg/10 border-status-error-border/20\"\n onClick={() => void requestDelete()}\n >\n <Trash2 className=\"size-4\" />\n {tx('security.common.actions.delete', 'Delete')}\n </Button>\n )}\n </div>\n }\n >\n <div className=\"space-y-6\">\n {/* Status and Info */}\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 {tx('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 <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 */}\n <Card className=\"p-6 shadow-sm border-border-subtle/60\">\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 {tx('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 {tx('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 {tx(\n 'security.secretDetail.value.note',\n 'Secret values are decrypted on-demand and never stored in plain text.'\n )}\n </p>\n </Card>\n\n {/* Version History Summary */}\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 {tx('security.secretDetail.history.title', 'Version History')}\n </h2>\n <Badge variant=\"outline\" className=\"bg-bg-sunken font-mono\">\n {tx('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\">\n v{secret.version ?? versionCount}\n </div>\n <div>\n <p className=\"text-sm font-semibold\">\n {tx(\n 'security.secretDetail.history.currentVersion',\n 'Current Active Version'\n )}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {tx('security.secretDetail.history.lastUpdated', 'Last updated {date}', {\n date: new Date(secret.updatedAt).toLocaleString(),\n })}\n </p>\n </div>\n </div>\n <Badge variant=\"success\" className=\"text-[10px] uppercase\">\n {tx('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 {tx(\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 {tx('security.secretDetail.history.viewFull', 'View Full History')}\n </Button>\n </div>\n )}\n </div>\n </Card>\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 {tx('security.secretDetail.details.title', 'Details')}\n </h3>\n\n <div className=\"space-y-3\">\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tx('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 <div>\n <p className=\"text-xs text-text-secondary\">\n {tx('security.secretDetail.details.createdBy', 'Created By')}\n </p>\n <p className=\"text-sm font-medium mt-1\">{secret.createdBy}</p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tx('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 && (\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tx('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 <Card className=\"p-6 shadow-sm border-border-subtle/60 space-y-4 bg-action-primary-bg/5 border-primary/10\">\n <h3 className=\"font-bold text-sm text-primary flex items-center gap-2\">\n <Shield className=\"size-4\" />\n {tx('security.secretDetail.security.title', 'Security')}\n </h3>\n <p className=\"text-xs text-text-secondary leading-relaxed\">\n {tx(\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 </Card>\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 {tx('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 {tx(\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 {tx('security.common.status.active', 'Active')}\n </Badge>\n )}\n </div>\n <p className=\"text-xs text-text-secondary mt-1\">\n {tx(\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 {tx('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={tx('security.secretDetail.delete.title', 'Delete Secret')}\n description={tx(\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 ? tx('security.secretDetail.delete.deleting', 'Deleting...')\n : tx('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 {tx('security.secretDetail.rotate.title', 'Rotate Secret')}\n </DialogTitle>\n </div>\n </DialogHeader>\n\n <p className=\"text-sm text-text-secondary\">\n {tx(\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 {tx('security.secretDetail.rotate.newValue', 'New Secret Value')}\n </label>\n <textarea\n id=\"new-secret-value\"\n aria-label={tx('security.secretDetail.rotate.newValue', 'New Secret Value')}\n ref={rotateValueRef}\n value={newRotationValue}\n onChange={(e) => setNewRotationValue(e.target.value)}\n placeholder={tx(\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 <div className=\"flex justify-end gap-3 pt-2\">\n <Button\n variant=\"outline\"\n onClick={() => setShowRotatePrompt(false)}\n disabled={rotating}\n >\n {tx('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 ? tx('security.secretDetail.rotate.loading', 'Rotating...')\n : tx('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":";;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAgB,IAAmB;CACjC,IAAM,EAAE,YAAS,gBAAa,IAAkD,EAC1E,EAAE,cAAW,KAAK,UAAU,MAAkB,GAAa,EAC3D,EAAE,SAAM,GAAS,EACjB,IAAiB,IAAa,EAE9B,EAAE,MAAM,GAAY,YAAS,UAAO,eAAY,GAAa,KAAY,KAAK,EAC9E,IAAS,GAAY,WAErB,EAAE,MAAM,IAAc,SAAS,OAAoB,GAA0B;EACjF,WAAW;GAAE,UAAU,KAAY;GAAI,YAAY,EAAE,OAAO,IAAI;GAAE;EAClE,MAAM,CAAC;EACP,aAAa;EACd,CAAC,EACI,KAAW,IAAc,4BAA4B,SAAS,EAAE,EAEhE,EACJ,OAAO,IACP,YACA,SACA,SAAS,IACT,kBACE,GAAe,KAAY,GAAG,EAE5B,CAAC,IAAc,EAAE,SAAS,QAAoB,IAAiB,EAC/D,CAAC,IAAc,EAAE,SAAS,OAAc,GAAiB,EACzD,CAAC,IAAgB,EAAE,SAAS,QAAiB,GAAmB,EAChE,EAAE,YAAS,GAAyB,EA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AAe,EAAoB,GAAM;SACzC,UAAU;mBAET,EAAG,kCAAkC,SAAS;SACxC,CAAA,EACT,kBAAC,GAAD;SAAQ,SAAS;SAAc,UAAU,KAAY,CAAC,EAAiB,MAAM;mBAA7E,CACG,IACC,kBAAC,GAAD,EAAS,WAAU,uBAAwB,CAAA,GAE3C,kBAAC,GAAD,EAAW,WAAU,UAAW,CAAA,EAEjC,IACG,EAAG,wCAAwC,cAAc,GACzD,EAAG,wCAAwC,gBAAgB,CACxD;WACL;;OACF;;KACM,CAAA;IACT,CAAA;GAER,KAAW,KACV,kBAAC,IAAD;IACE,QAAQ;IACR,eAAe,EAAmB,GAAM;IAC/B;IACC;IACV,MAAM,EAAO;IACb,CAAA;GAEO"}
|
|
@@ -31,11 +31,11 @@ function g() {
|
|
|
31
31
|
className: "p-6",
|
|
32
32
|
children: /* @__PURE__ */ l("div", {
|
|
33
33
|
className: "flex items-start gap-4",
|
|
34
|
-
children: [/* @__PURE__ */ c(u, { className: "size-6 text-
|
|
35
|
-
className: "font-semibold text-
|
|
34
|
+
children: [/* @__PURE__ */ c(u, { className: "size-6 text-status-error-text" }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h3", {
|
|
35
|
+
className: "font-semibold text-status-error-text",
|
|
36
36
|
children: x("security.dashboard.error", "Failed to load dashboard")
|
|
37
37
|
}), /* @__PURE__ */ c("p", {
|
|
38
|
-
className: "text-sm text-
|
|
38
|
+
className: "text-sm text-text-secondary mt-1",
|
|
39
39
|
children: y.message
|
|
40
40
|
})] })]
|
|
41
41
|
})
|
|
@@ -55,39 +55,39 @@ function g() {
|
|
|
55
55
|
/* @__PURE__ */ l(r, {
|
|
56
56
|
className: "p-5",
|
|
57
57
|
children: [/* @__PURE__ */ l("div", {
|
|
58
|
-
className: "flex items-center gap-2 text-
|
|
58
|
+
className: "flex items-center gap-2 text-text-secondary mb-1",
|
|
59
59
|
children: [/* @__PURE__ */ c(p, { className: "size-4" }), /* @__PURE__ */ c("span", {
|
|
60
60
|
className: "text-xs font-medium uppercase tracking-wider",
|
|
61
61
|
children: x("security.dashboard.vaults", "Vaults")
|
|
62
62
|
})]
|
|
63
63
|
}), /* @__PURE__ */ c("p", {
|
|
64
|
-
className: "text-2xl font-bold text-
|
|
64
|
+
className: "text-2xl font-bold text-text-primary",
|
|
65
65
|
children: _.totalVaults
|
|
66
66
|
})]
|
|
67
67
|
}),
|
|
68
68
|
/* @__PURE__ */ l(r, {
|
|
69
69
|
className: "p-5",
|
|
70
70
|
children: [/* @__PURE__ */ l("div", {
|
|
71
|
-
className: "flex items-center gap-2 text-
|
|
71
|
+
className: "flex items-center gap-2 text-text-secondary mb-1",
|
|
72
72
|
children: [/* @__PURE__ */ c(d, { className: "size-4" }), /* @__PURE__ */ c("span", {
|
|
73
73
|
className: "text-xs font-medium uppercase tracking-wider",
|
|
74
74
|
children: x("security.dashboard.secrets", "Secrets")
|
|
75
75
|
})]
|
|
76
76
|
}), /* @__PURE__ */ c("p", {
|
|
77
|
-
className: "text-2xl font-bold text-
|
|
77
|
+
className: "text-2xl font-bold text-text-primary",
|
|
78
78
|
children: _.totalSecrets
|
|
79
79
|
})]
|
|
80
80
|
}),
|
|
81
81
|
/* @__PURE__ */ l(r, {
|
|
82
82
|
className: "p-5",
|
|
83
83
|
children: [/* @__PURE__ */ l("div", {
|
|
84
|
-
className: "flex items-center gap-2 text-
|
|
84
|
+
className: "flex items-center gap-2 text-text-secondary mb-1",
|
|
85
85
|
children: [/* @__PURE__ */ c(m, { className: "size-4" }), /* @__PURE__ */ c("span", {
|
|
86
86
|
className: "text-xs font-medium uppercase tracking-wider",
|
|
87
87
|
children: x("security.dashboard.members", "Members")
|
|
88
88
|
})]
|
|
89
89
|
}), /* @__PURE__ */ c("p", {
|
|
90
|
-
className: "text-2xl font-bold text-
|
|
90
|
+
className: "text-2xl font-bold text-text-primary",
|
|
91
91
|
children: _.totalMembers
|
|
92
92
|
})]
|
|
93
93
|
})
|
|
@@ -100,7 +100,7 @@ function g() {
|
|
|
100
100
|
children: [
|
|
101
101
|
/* @__PURE__ */ c(p, { className: "size-5 text-status-warning-text" }),
|
|
102
102
|
/* @__PURE__ */ c("h3", {
|
|
103
|
-
className: "font-semibold text-
|
|
103
|
+
className: "font-semibold text-text-primary",
|
|
104
104
|
children: x("security.dashboard.lockedVaults", "Locked Vaults")
|
|
105
105
|
}),
|
|
106
106
|
/* @__PURE__ */ c(n, {
|
|
@@ -111,7 +111,7 @@ function g() {
|
|
|
111
111
|
}), /* @__PURE__ */ c("ul", {
|
|
112
112
|
className: "space-y-2",
|
|
113
113
|
children: _.lockedVaults.slice(0, 5).map((e) => /* @__PURE__ */ l("li", {
|
|
114
|
-
className: "text-sm text-
|
|
114
|
+
className: "text-sm text-text-secondary flex items-center gap-2",
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ c(p, { className: "size-3 text-status-warning-text shrink-0" }),
|
|
117
117
|
/* @__PURE__ */ c("span", {
|
|
@@ -119,7 +119,7 @@ function g() {
|
|
|
119
119
|
children: e.name
|
|
120
120
|
}),
|
|
121
121
|
e.lockedAt ? /* @__PURE__ */ l("span", {
|
|
122
|
-
className: "text-xs text-
|
|
122
|
+
className: "text-xs text-text-secondary ml-auto",
|
|
123
123
|
children: ["since ", new Date(e.lockedAt).toLocaleDateString()]
|
|
124
124
|
}) : null
|
|
125
125
|
]
|
|
@@ -129,10 +129,10 @@ function g() {
|
|
|
129
129
|
/* @__PURE__ */ l(r, {
|
|
130
130
|
className: "p-6",
|
|
131
131
|
children: [/* @__PURE__ */ c("h2", {
|
|
132
|
-
className: "text-lg font-semibold text-
|
|
132
|
+
className: "text-lg font-semibold text-text-primary mb-4",
|
|
133
133
|
children: x("security.dashboard.recentActivity", "Recent Activity")
|
|
134
134
|
}), _.recentActivity.length > 0 ? /* @__PURE__ */ c(o, { entries: _.recentActivity }) : /* @__PURE__ */ c("p", {
|
|
135
|
-
className: "text-sm text-
|
|
135
|
+
className: "text-sm text-text-secondary text-center py-8",
|
|
136
136
|
children: x("security.dashboard.noActivity", "No recent activity to display.")
|
|
137
137
|
})]
|
|
138
138
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityDashboardPage.js","names":[],"sources":["../../../src/security/pages/SecurityDashboardPage.tsx"],"sourcesContent":["import { Shield, AlertTriangle, KeyRound, Lock, Loader2, Users } from 'lucide-react';\nimport { PageLayout } from '../components/PageLayout';\nimport { SecurityScoreCard } from '../components/SecurityScoreCard';\nimport { ActivityTimeline } from '../components/ActivityTimeline';\nimport { Button, Card, Badge, EmptyState } from '../components/ui';\nimport { useSecurityDashboard } from '../hooks/useSecurityDashboard';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { translateWithFallback } from '../utils/i18n';\n\nexport function SecurityDashboardPage() {\n const { basePath = '/' } = useSecurity();\n const { dashboard, loading, error } = useSecurityDashboard();\n const { t } = useI18n();\n const tr = (key: string, fallback: string) => translateWithFallback(t, key, fallback);\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-
|
|
1
|
+
{"version":3,"file":"SecurityDashboardPage.js","names":[],"sources":["../../../src/security/pages/SecurityDashboardPage.tsx"],"sourcesContent":["import { Shield, AlertTriangle, KeyRound, Lock, Loader2, Users } from 'lucide-react';\nimport { PageLayout } from '../components/PageLayout';\nimport { SecurityScoreCard } from '../components/SecurityScoreCard';\nimport { ActivityTimeline } from '../components/ActivityTimeline';\nimport { Button, Card, Badge, EmptyState } from '../components/ui';\nimport { useSecurityDashboard } from '../hooks/useSecurityDashboard';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { translateWithFallback } from '../utils/i18n';\n\nexport function SecurityDashboardPage() {\n const { basePath = '/' } = useSecurity();\n const { dashboard, loading, error } = useSecurityDashboard();\n const { t } = useI18n();\n const tr = (key: string, fallback: string) => translateWithFallback(t, key, fallback);\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 {/* 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} />\n\n <Card 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\">{dashboard.totalVaults}</p>\n </Card>\n\n <Card 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\">{dashboard.totalSecrets}</p>\n </Card>\n\n <Card 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\">{dashboard.totalMembers}</p>\n </Card>\n </div>\n\n {/* Vault status overview */}\n {dashboard.lockedVaults.length > 0 && (\n <Card 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\">\n since {new Date(v.lockedAt).toLocaleDateString()}\n </span>\n ) : null}\n </li>\n ))}\n </ul>\n </Card>\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 <p className=\"text-sm text-text-secondary text-center py-8\">\n {tr('security.dashboard.noActivity', 'No recent activity to display.')}\n </p>\n )}\n </Card>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;AAUA,SAAgB,IAAwB;CACtC,IAAM,EAAE,cAAW,QAAQ,GAAa,EAClC,EAAE,cAAW,YAAS,aAAU,GAAsB,EACtD,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAAqB,EAAsB,GAAG,GAAK,EAAS;AA0CrF,QAxCI,IAEA,kBAAC,GAAD;EACE,OAAO,EAAG,4BAA4B,kBAAkB;EACxD,aAAa,CACX;GAAE,OAAO,EAAG,yBAAyB,WAAW;GAAE,MAAM;GAAU,EAClE,EAAE,OAAO,EAAG,uBAAuB,SAAS,EAAE,CAC/C;YAED,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,GAAD,EAAS,WAAU,oCAAqC,CAAA;GACpD,CAAA;EACK,CAAA,GAIb,IAEA,kBAAC,GAAD;EACE,OAAO,EAAG,4BAA4B,kBAAkB;EACxD,aAAa,CACX;GAAE,OAAO,EAAG,yBAAyB,WAAW;GAAE,MAAM;GAAU,EAClE,EAAE,OAAO,EAAG,uBAAuB,SAAS,EAAE,CAC/C;YAED,kBAAC,GAAD;GAAM,WAAU;aACd,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAe,WAAU,iCAAkC,CAAA,EAC3D,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eACX,EAAG,4BAA4B,2BAA2B;KACxD,CAAA,EACL,kBAAC,KAAD;KAAG,WAAU;eAAoC,EAAM;KAAY,CAAA,CAC/D,EAAA,CAAA,CACF;;GACD,CAAA;EACI,CAAA,GAKf,kBAAC,GAAD;EACE,OAAO,EAAG,4BAA4B,kBAAk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gB;OACpD,CAAA;MACL,kBAAC,GAAD;OAAO,SAAQ;iBAAW,EAAU,aAAa;OAAe,CAAA;MAC5D;QACN,kBAAC,MAAD;KAAI,WAAU;eACX,EAAU,aAAa,MAAM,GAAG,EAAE,CAAC,KAAK,MACvC,kBAAC,MAAD;MAAe,WAAU;gBAAzB;OACE,kBAAC,GAAD,EAAM,WAAU,4CAA6C,CAAA;OAC7D,kBAAC,QAAD;QAAM,WAAU;kBAAY,EAAE;QAAY,CAAA;OACzC,EAAE,WACD,kBAAC,QAAD;QAAM,WAAU;kBAAhB,CAAsD,UAC7C,IAAI,KAAK,EAAE,SAAS,CAAC,oBAAoB,CAC3C;YACL;OACD;QARI,EAAE,GAQN,CACL;KACC,CAAA,CACA;;GAIT,kBAAC,GAAD;IAAM,WAAU;cAAhB,CACE,kBAAC,MAAD;KAAI,WAAU;eACX,EAAG,qCAAqC,kBAAkB;KACxD,CAAA,EACJ,EAAU,eAAe,SAAS,IACjC,kBAAC,GAAD,EAAkB,SAAS,EAAU,gBAAkB,CAAA,GAEvD,kBAAC,KAAD;KAAG,WAAU;eACV,EAAG,iCAAiC,iCAAiC;KACpE,CAAA,CAED;;GACI"}
|
|
@@ -16,30 +16,30 @@ var C = ({ entry: e }) => {
|
|
|
16
16
|
} catch {}
|
|
17
17
|
};
|
|
18
18
|
return /* @__PURE__ */ f("div", {
|
|
19
|
-
className: "rounded-md border border-border/50 p-2.5",
|
|
19
|
+
className: "rounded-md border border-border-subtle/50 p-2.5",
|
|
20
20
|
children: [/* @__PURE__ */ f("div", {
|
|
21
21
|
className: "flex items-center justify-between gap-2 mb-1",
|
|
22
22
|
children: [/* @__PURE__ */ d("p", {
|
|
23
|
-
className: "text-sm font-medium text-
|
|
23
|
+
className: "text-sm font-medium text-text-primary truncate",
|
|
24
24
|
children: e.name
|
|
25
25
|
}), /* @__PURE__ */ f("div", {
|
|
26
26
|
className: "flex items-center gap-1",
|
|
27
27
|
children: [/* @__PURE__ */ d("button", {
|
|
28
28
|
type: "button",
|
|
29
29
|
onClick: () => r((e) => !e),
|
|
30
|
-
className: "p-1 rounded hover:bg-accent text-
|
|
30
|
+
className: "p-1 rounded hover:bg-accent text-text-secondary",
|
|
31
31
|
"aria-label": n ? "Hide" : "Show",
|
|
32
32
|
children: d(n ? _ : g, { className: "size-3.5" })
|
|
33
33
|
}), /* @__PURE__ */ d("button", {
|
|
34
34
|
type: "button",
|
|
35
35
|
onClick: () => void o(),
|
|
36
|
-
className: "p-1 rounded hover:bg-accent text-
|
|
36
|
+
className: "p-1 rounded hover:bg-accent text-text-secondary",
|
|
37
37
|
"aria-label": "Copy",
|
|
38
38
|
children: i ? /* @__PURE__ */ d(p, { className: "size-3.5 text-status-success-text" }) : /* @__PURE__ */ d(h, { className: "size-3.5" })
|
|
39
39
|
})]
|
|
40
40
|
})]
|
|
41
41
|
}), /* @__PURE__ */ d("pre", {
|
|
42
|
-
className: t("text-sm font-mono break-all whitespace-pre-wrap rounded bg-
|
|
42
|
+
className: t("text-sm font-mono break-all whitespace-pre-wrap rounded bg-bg-sunken/50 px-2 py-1.5 text-text-primary", !n && "select-none blur-sm"),
|
|
43
43
|
children: n ? e.value : "••••••••••••"
|
|
44
44
|
})]
|
|
45
45
|
});
|
|
@@ -52,12 +52,12 @@ var C = ({ entry: e }) => {
|
|
|
52
52
|
children: [/* @__PURE__ */ f("div", {
|
|
53
53
|
className: "flex items-center gap-3 min-w-0",
|
|
54
54
|
children: [/* @__PURE__ */ d("div", {
|
|
55
|
-
className: "p-2 rounded-lg bg-primary/10",
|
|
55
|
+
className: "p-2 rounded-lg bg-action-primary-bg/10",
|
|
56
56
|
children: e.scope === "VAULT" ? /* @__PURE__ */ d(v, { className: "size-5 text-primary" }) : /* @__PURE__ */ d(y, { className: "size-5 text-primary" })
|
|
57
57
|
}), /* @__PURE__ */ f("div", {
|
|
58
58
|
className: "min-w-0",
|
|
59
59
|
children: [/* @__PURE__ */ d("p", {
|
|
60
|
-
className: "text-sm font-medium text-
|
|
60
|
+
className: "text-sm font-medium text-text-primary truncate",
|
|
61
61
|
children: e.label || (e.scope === "VAULT" ? "Shared vault" : "Shared credential")
|
|
62
62
|
}), /* @__PURE__ */ f("div", {
|
|
63
63
|
className: "flex items-center gap-2 mt-0.5",
|
|
@@ -65,7 +65,7 @@ var C = ({ entry: e }) => {
|
|
|
65
65
|
variant: "outline",
|
|
66
66
|
children: e.role
|
|
67
67
|
}), e.expiresAt && /* @__PURE__ */ f("span", {
|
|
68
|
-
className: "text-xs text-
|
|
68
|
+
className: "text-xs text-text-secondary inline-flex items-center gap-1",
|
|
69
69
|
children: [/* @__PURE__ */ d(m, { className: "size-3" }), new Date(e.expiresAt).toLocaleDateString()]
|
|
70
70
|
})]
|
|
71
71
|
})]
|
|
@@ -80,7 +80,7 @@ var C = ({ entry: e }) => {
|
|
|
80
80
|
}), u && /* @__PURE__ */ f("div", {
|
|
81
81
|
className: "mt-3 space-y-2",
|
|
82
82
|
children: [c && /* @__PURE__ */ f("p", {
|
|
83
|
-
className: "text-xs text-
|
|
83
|
+
className: "text-xs text-text-secondary",
|
|
84
84
|
children: ["From ", c]
|
|
85
85
|
}), s.map((e) => /* @__PURE__ */ d(C, { entry: e }, e.id))]
|
|
86
86
|
})]
|
|
@@ -99,7 +99,7 @@ function T() {
|
|
|
99
99
|
className: "flex items-center justify-center py-20",
|
|
100
100
|
children: /* @__PURE__ */ d(b, { className: "size-10 animate-spin text-primary/60" })
|
|
101
101
|
}) : u.length === 0 ? /* @__PURE__ */ d(o, {
|
|
102
|
-
icon: /* @__PURE__ */ d(x, { className: "size-16 text-
|
|
102
|
+
icon: /* @__PURE__ */ d(x, { className: "size-16 text-text-secondary/30" }),
|
|
103
103
|
title: i("security.sharedWithMe.empty.title", "Nothing shared with you yet"),
|
|
104
104
|
description: i("security.sharedWithMe.empty.description", "When someone shares a credential with your account, it will appear here."),
|
|
105
105
|
className: "py-20"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SharedWithMePage.js","names":[],"sources":["../../../src/security/pages/SharedWithMePage.tsx"],"sourcesContent":["import { type FC, useState } from 'react';\nimport {\n Share2,\n Eye,\n EyeOff,\n Copy,\n Check,\n Loader2,\n Clock,\n FolderKey,\n KeyRound,\n} from 'lucide-react';\nimport { PageLayout } from '../components/PageLayout';\nimport { Button, Card, Badge, EmptyState } from '../components/ui';\nimport { cn } from '../utils/cn';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useMySharedCredentials, useRevealSharedCredential } from '../hooks/useShareQueries';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { translateWithFallback } from '../utils/i18n';\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/50 p-2.5\">\n <div className=\"flex items-center justify-between gap-2 mb-1\">\n <p className=\"text-sm font-medium text-
|
|
1
|
+
{"version":3,"file":"SharedWithMePage.js","names":[],"sources":["../../../src/security/pages/SharedWithMePage.tsx"],"sourcesContent":["import { type FC, useState } from 'react';\nimport {\n Share2,\n Eye,\n EyeOff,\n Copy,\n Check,\n Loader2,\n Clock,\n FolderKey,\n KeyRound,\n} from 'lucide-react';\nimport { PageLayout } from '../components/PageLayout';\nimport { Button, Card, Badge, EmptyState } from '../components/ui';\nimport { cn } from '../utils/cn';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useMySharedCredentials, useRevealSharedCredential } from '../hooks/useShareQueries';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { translateWithFallback } from '../utils/i18n';\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 { t } = useI18n();\n const tx = (key: string, fallback: string) => translateWithFallback(t, key, fallback);\n const { data, loading } = useMySharedCredentials();\n const shares = (data?.mySharedCredentials?.items ?? []) as ShareItem[];\n\n return (\n <PageLayout\n title={tx('security.sharedWithMe.title', 'Shared with me')}\n description={tx(\n 'security.sharedWithMe.description',\n 'Credentials other people have shared with your account.'\n )}\n breadcrumbs={[\n { label: tx('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tx('security.sharedWithMe.title', 'Shared with me') },\n ]}\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 <EmptyState\n icon={<Share2 className=\"size-16 text-text-secondary/30\" />}\n title={tx('security.sharedWithMe.empty.title', 'Nothing shared with you yet')}\n description={tx(\n 'security.sharedWithMe.empty.description',\n 'When someone shares a credential with your account, it will appear here.'\n )}\n className=\"py-20\"\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,IAAM,KAAiD,EAAE,eAAY;CACnE,IAAM,CAAC,GAAO,KAAY,EAAS,GAAM,EACnC,CAAC,GAAQ,KAAa,EAAS,GAAM,EACrC,IAAO,YAAY;AACvB,MAAI;AAGF,GAFA,MAAM,UAAU,UAAU,UAAU,EAAM,MAAM,EAChD,EAAU,GAAK,EACf,iBAAiB,EAAU,GAAM,EAAE,KAAK;UAClC;;AAIV,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cAAkD,EAAM;IAAS,CAAA,EAC9E,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,UAAD;KACE,MAAK;KACL,eAAe,GAAU,MAAM,CAAC,EAAE;KAClC,WAAU;KACV,cAAY,IAAQ,SAAS;eAEpB,EAAR,IAAS,IAAkC,GAAnC,EAAQ,WAAU,YAAa,CAA+B;KAChE,CAAA,EACT,kBAAC,UAAD;KACE,MAAK;KACL,eAAe,KAAK,GAAM;KAC1B,WAAU;KACV,cAAW;eAEV,IACC,kBAAC,GAAD,EAAO,WAAU,qCAAsC,CAAA,GAEvD,kBAAC,GAAD,EAAM,WAAU,YAAa,CAAA;KAExB,CAAA,CACL;MACF;MACN,kBAAC,OAAD;GACE,WAAW,EACT,yGACA,CAAC,KAAS,sBACX;aAEA,IAAQ,EAAM,QAAQ;GACnB,CAAA,CACF;;GAYJ,KAAuC,EAAE,eAAY;CACzD,IAAM,CAAC,GAAkB,EAAE,SAAM,gBAAa,GAA2B,EACnE,IAAW,GAAM,wBAAwB,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AAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAAqB,EAAsB,GAAG,GAAK,EAAS,EAC/E,EAAE,SAAM,eAAY,GAAwB,EAC5C,IAAU,GAAM,qBAAqB,SAAS,EAAE;AAEtD,QACE,kBAAC,GAAD;EACE,OAAO,EAAG,+BAA+B,iBAAiB;EAC1D,aAAa,EACX,qCACA,0DACD;EACD,aAAa,CACX;GAAE,OAAO,EAAG,wCAAwC,WAAW;GAAE,MAAM;GAAU,EACjF,EAAE,OAAO,EAAG,+BAA+B,iBAAiB,EAAE,CAC/D;YAEA,IACC,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,GAAD,EAAS,WAAU,wCAAyC,CAAA;GACxD,CAAA,GACJ,EAAO,WAAW,IACpB,kBAAC,GAAD;GACE,MAAM,kBAAC,GAAD,EAAQ,WAAU,kCAAmC,CAAA;GAC3D,OAAO,EAAG,qCAAqC,8BAA8B;GAC7E,aAAa,EACX,2CACA,2EACD;GACD,WAAU;GACV,CAAA,GAEF,kBAAC,OAAD;GAAK,WAAU;aACZ,EAAO,KAAK,MACX,kBAAC,GAAD,EAAiC,UAAS,EAA1B,EAAM,GAAoB,CAC1C;GACE,CAAA;EAEG,CAAA"}
|
|
@@ -45,11 +45,11 @@ function y() {
|
|
|
45
45
|
onScopeChange: M
|
|
46
46
|
}),
|
|
47
47
|
N && /* @__PURE__ */ f("div", {
|
|
48
|
-
className: "mt-4 p-3 rounded-md bg-
|
|
48
|
+
className: "mt-4 p-3 rounded-md bg-status-error-bg/10 text-status-error-text text-sm border border-status-error-border/20",
|
|
49
49
|
children: N
|
|
50
50
|
}),
|
|
51
51
|
/* @__PURE__ */ p("div", {
|
|
52
|
-
className: "flex justify-end gap-2 mt-8 pt-4 border-t border-border",
|
|
52
|
+
className: "flex justify-end gap-2 mt-8 pt-4 border-t border-border-subtle",
|
|
53
53
|
children: [/* @__PURE__ */ f(n, {
|
|
54
54
|
variant: "outline",
|
|
55
55
|
onClick: I,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VaultCreatePage.js","names":[],"sources":["../../../src/security/pages/VaultCreatePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { Save, ArrowLeft, Loader2 } from 'lucide-react';\nimport { PageLayout } from '../components/PageLayout';\nimport { VaultFormFields } from '../components/VaultFormFields';\nimport { Button, Card } from '../components/ui';\nimport { useCreateVault } from '../hooks/useVaultQueries';\nimport { useSecurityEventEmitter } from '../hooks/useSecurityEventEmitter';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { translateWithFallback } from '../utils/i18n';\nimport { nativeImpact, nativeNotify } from '../../utils/nativeBridge';\n\n/**\n * Detect Apollo-shaped errors structurally (works across Apollo v3 and v4\n * where the `ApolloError` class either lives under different paths or is\n * replaced by categorized error types). Apollo errors carry `graphQLErrors`,\n * `networkError`, or `clientErrors` on the Error instance — those messages\n * are already shaped for client display.\n */\nfunction isApolloError(err: unknown): err is Error {\n return (\n err instanceof Error &&\n ('graphQLErrors' in err || 'networkError' in err || 'clientErrors' in err)\n );\n}\n\nexport function VaultCreatePage() {\n const { basePath = '/', navigate: shellNavigate } = useSecurity();\n const routerNavigate = useNavigate();\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) =>\n translateWithFallback(t, key, fallback, params);\n\n const [createVault, { loading: creating }] = useCreateVault();\n const { emit } = useSecurityEventEmitter();\n\n const [name, setName] = useState('');\n const [description, setDescription] = useState('');\n const [scope, setScope] = useState('WORKSPACE');\n const [error, setError] = useState<string | null>(null);\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);\n };\n\n const handleSave = async () => {\n void nativeImpact('light');\n if (!name.trim()) {\n setError(tx('security.vaultCreate.error.nameRequired', 'Name is required.'));\n return;\n }\n\n setError(null);\n\n try {\n const result = await createVault({\n variables: {\n input: {\n name: name.trim(),\n description: description.trim() || undefined,\n scope,\n scopeId: scope === 'WORKSPACE' ? undefined : undefined,\n },\n },\n });\n\n // Apollo v4 returns a single aggregated `error` on result instead of throwing.\n // Surface it as an inline error so the user knows what failed.\n if (result.error) {\n setError(\n result.error.message ??\n tx('security.vaultCreate.error.createFailed', 'Failed to create vault')\n );\n void nativeNotify('error');\n return;\n }\n\n if (result.data?.createVault?.id) {\n emit('vault.created', { vaultId: result.data.createVault.id });\n void nativeNotify('success');\n handleNavigate(`${basePath}/vaults/${result.data.createVault.id}`);\n return;\n }\n\n // No data and no errors — unexpected; surface generic failure rather than silently navigating away.\n setError(tx('security.vaultCreate.error.createFailed', 'Failed to create vault'));\n void nativeNotify('error');\n } catch (err) {\n // Only surface raw error messages that come from Apollo — those are\n // already shaped for client consumption. Anything else (random thrown\n // Error from network internals, unexpected JS exception) falls back to\n // the generic translation to avoid leaking internal details into the UI.\n setError(\n isApolloError(err)\n ? err.message\n : tx('security.vaultCreate.error.createFailed', 'Failed to create vault')\n );\n void nativeNotify('error');\n }\n };\n\n return (\n <PageLayout\n title={tx('security.vaultCreate.title', 'Create Vault')}\n description={tx(\n 'security.vaultCreate.description',\n 'Create a new secure container for your secrets.'\n )}\n breadcrumbs={[\n { label: tx('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tx('security.vaultCreate.breadcrumb', 'New Vault') },\n ]}\n actions={\n <Button variant=\"outline\" onClick={handleBack}>\n <ArrowLeft className=\"size-4\" />\n {tx('security.common.actions.back', 'Back')}\n </Button>\n }\n >\n <Card className=\"p-6 max-w-2xl mx-auto\">\n <VaultFormFields\n name={name}\n onNameChange={setName}\n description={description}\n onDescriptionChange={setDescription}\n scope={scope}\n onScopeChange={setScope}\n />\n\n {error && (\n <div className=\"mt-4 p-3 rounded-md bg-
|
|
1
|
+
{"version":3,"file":"VaultCreatePage.js","names":[],"sources":["../../../src/security/pages/VaultCreatePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { Save, ArrowLeft, Loader2 } from 'lucide-react';\nimport { PageLayout } from '../components/PageLayout';\nimport { VaultFormFields } from '../components/VaultFormFields';\nimport { Button, Card } from '../components/ui';\nimport { useCreateVault } from '../hooks/useVaultQueries';\nimport { useSecurityEventEmitter } from '../hooks/useSecurityEventEmitter';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { translateWithFallback } from '../utils/i18n';\nimport { nativeImpact, nativeNotify } from '../../utils/nativeBridge';\n\n/**\n * Detect Apollo-shaped errors structurally (works across Apollo v3 and v4\n * where the `ApolloError` class either lives under different paths or is\n * replaced by categorized error types). Apollo errors carry `graphQLErrors`,\n * `networkError`, or `clientErrors` on the Error instance — those messages\n * are already shaped for client display.\n */\nfunction isApolloError(err: unknown): err is Error {\n return (\n err instanceof Error &&\n ('graphQLErrors' in err || 'networkError' in err || 'clientErrors' in err)\n );\n}\n\nexport function VaultCreatePage() {\n const { basePath = '/', navigate: shellNavigate } = useSecurity();\n const routerNavigate = useNavigate();\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) =>\n translateWithFallback(t, key, fallback, params);\n\n const [createVault, { loading: creating }] = useCreateVault();\n const { emit } = useSecurityEventEmitter();\n\n const [name, setName] = useState('');\n const [description, setDescription] = useState('');\n const [scope, setScope] = useState('WORKSPACE');\n const [error, setError] = useState<string | null>(null);\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);\n };\n\n const handleSave = async () => {\n void nativeImpact('light');\n if (!name.trim()) {\n setError(tx('security.vaultCreate.error.nameRequired', 'Name is required.'));\n return;\n }\n\n setError(null);\n\n try {\n const result = await createVault({\n variables: {\n input: {\n name: name.trim(),\n description: description.trim() || undefined,\n scope,\n scopeId: scope === 'WORKSPACE' ? undefined : undefined,\n },\n },\n });\n\n // Apollo v4 returns a single aggregated `error` on result instead of throwing.\n // Surface it as an inline error so the user knows what failed.\n if (result.error) {\n setError(\n result.error.message ??\n tx('security.vaultCreate.error.createFailed', 'Failed to create vault')\n );\n void nativeNotify('error');\n return;\n }\n\n if (result.data?.createVault?.id) {\n emit('vault.created', { vaultId: result.data.createVault.id });\n void nativeNotify('success');\n handleNavigate(`${basePath}/vaults/${result.data.createVault.id}`);\n return;\n }\n\n // No data and no errors — unexpected; surface generic failure rather than silently navigating away.\n setError(tx('security.vaultCreate.error.createFailed', 'Failed to create vault'));\n void nativeNotify('error');\n } catch (err) {\n // Only surface raw error messages that come from Apollo — those are\n // already shaped for client consumption. Anything else (random thrown\n // Error from network internals, unexpected JS exception) falls back to\n // the generic translation to avoid leaking internal details into the UI.\n setError(\n isApolloError(err)\n ? err.message\n : tx('security.vaultCreate.error.createFailed', 'Failed to create vault')\n );\n void nativeNotify('error');\n }\n };\n\n return (\n <PageLayout\n title={tx('security.vaultCreate.title', 'Create Vault')}\n description={tx(\n 'security.vaultCreate.description',\n 'Create a new secure container for your secrets.'\n )}\n breadcrumbs={[\n { label: tx('security.common.breadcrumbs.security', 'Security'), path: basePath },\n { label: tx('security.vaultCreate.breadcrumb', 'New Vault') },\n ]}\n actions={\n <Button variant=\"outline\" onClick={handleBack}>\n <ArrowLeft className=\"size-4\" />\n {tx('security.common.actions.back', 'Back')}\n </Button>\n }\n >\n <Card className=\"p-6 max-w-2xl mx-auto\">\n <VaultFormFields\n name={name}\n onNameChange={setName}\n description={description}\n onDescriptionChange={setDescription}\n scope={scope}\n onScopeChange={setScope}\n />\n\n {error && (\n <div className=\"mt-4 p-3 rounded-md bg-status-error-bg/10 text-status-error-text text-sm border border-status-error-border/20\">\n {error}\n </div>\n )}\n\n <div className=\"flex justify-end gap-2 mt-8 pt-4 border-t border-border-subtle\">\n <Button\n variant=\"outline\"\n onClick={handleBack}\n disabled={creating}\n aria-label={tx('security.vaultCreate.actions.cancel', 'Cancel')}\n >\n {tx('security.common.actions.cancel', 'Cancel')}\n </Button>\n <Button\n onClick={handleSave}\n disabled={creating || !name.trim()}\n aria-label={tx(\n 'security.vaultCreate.actions.create',\n creating\n ? tx('security.vaultCreate.actions.creating', 'Creating...')\n : tx('security.vaultCreate.actions.createVault', 'Create Vault')\n )}\n >\n {creating ? <Loader2 className=\"size-4 animate-spin\" /> : <Save className=\"size-4\" />}\n {creating\n ? tx('security.vaultCreate.actions.creating', 'Creating...')\n : tx('security.vaultCreate.actions.createVault', 'Create Vault')}\n </Button>\n </div>\n </Card>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAoBA,SAAS,EAAc,GAA4B;AACjD,QACE,aAAe,UACd,mBAAmB,KAAO,kBAAkB,KAAO,kBAAkB;;AAI1E,SAAgB,IAAkB;CAChC,IAAM,EAAE,cAAW,KAAK,UAAU,MAAkB,GAAa,EAC3D,IAAiB,GAAa,EAC9B,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,GAAkB,MACzC,EAAsB,GAAG,GAAK,GAAU,EAAO,EAE3C,CAAC,GAAa,EAAE,SAAS,OAAc,GAAgB,EACvD,EAAE,YAAS,GAAyB,EAEpC,CAAC,GAAM,KAAW,EAAS,GAAG,EAC9B,CAAC,GAAa,KAAkB,EAAS,GAAG,EAC5C,CAAC,GAAO,KAAY,EAAS,YAAY,EACzC,CAAC,GAAO,KAAY,EAAwB,KAAK,EAEjD,KAAkB,MAAiB;AACvC,EAAI,IACF,EAAc,EAAK,GAEnB,EAAe,EAAK;IAIlB,UAAmB;AACvB,IAAe,EAAS;;AA2D1B,QACE,kBAAC,GAAD;EACE,OAAO,EAAG,8BAA8B,eAAe;EACvD,aAAa,EACX,oCACA,kDACD;EACD,aAAa,CACX;GAAE,OAAO,EAAG,wCAAwC,WAAW;GAAE,MAAM;GAAU,EACjF,EAAE,OAAO,EAAG,mCAAmC,YAAY,EAAE,CAC9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,yBAAyB,CAC5E,EACI,EAAa,QAAQ;;;MAiDpB,UAAU,KAAY,CAAC,EAAK,MAAM;MAClC,cAAY,EACV,uCACA,IACI,EAAG,yCAAyC,cAAc,GAC1D,EAAG,4CAA4C,eAAe,CACnE;gBARH,CAUG,IAAW,kBAAC,GAAD,EAAS,WAAU,uBAAwB,CAAA,GAAG,kBAAC,GAAD,EAAM,WAAU,UAAW,CAAA,EACpF,IACG,EAAG,yCAAyC,cAAc,GAC1D,EAAG,4CAA4C,eAAe,CAC3D;QACL;;IACD;;EACI,CAAA"}
|
|
@@ -91,14 +91,14 @@ function O() {
|
|
|
91
91
|
className: "flex flex-col items-center gap-4",
|
|
92
92
|
children: [
|
|
93
93
|
/* @__PURE__ */ y("div", {
|
|
94
|
-
className: "p-3 rounded-full bg-
|
|
95
|
-
children: /* @__PURE__ */ y(x, { className: "size-8 text-
|
|
94
|
+
className: "p-3 rounded-full bg-status-error-bg/10",
|
|
95
|
+
children: /* @__PURE__ */ y(x, { className: "size-8 text-status-error-text" })
|
|
96
96
|
}),
|
|
97
97
|
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
|
|
98
|
-
className: "text-lg font-bold text-
|
|
98
|
+
className: "text-lg font-bold text-text-primary",
|
|
99
99
|
children: Y("security.vaultDetail.error.title", "Failed to load vault")
|
|
100
100
|
}), /* @__PURE__ */ y("p", {
|
|
101
|
-
className: "text-sm text-
|
|
101
|
+
className: "text-sm text-text-secondary mt-2",
|
|
102
102
|
children: B.message
|
|
103
103
|
})] }),
|
|
104
104
|
/* @__PURE__ */ b("div", {
|
|
@@ -175,7 +175,7 @@ function O() {
|
|
|
175
175
|
children: /* @__PURE__ */ b(a, {
|
|
176
176
|
variant: "outline",
|
|
177
177
|
size: "sm",
|
|
178
|
-
className: "text-
|
|
178
|
+
className: "text-status-error-text hover:bg-status-error-bg/10 border-status-error-border/20 hover:border-status-error-border/30",
|
|
179
179
|
onClick: () => void je(),
|
|
180
180
|
disabled: we,
|
|
181
181
|
children: [/* @__PURE__ */ y(ge, { className: "size-4" }), /* @__PURE__ */ y("span", {
|
|
@@ -217,7 +217,7 @@ function O() {
|
|
|
217
217
|
}),
|
|
218
218
|
/* @__PURE__ */ y(i, {
|
|
219
219
|
variant: "outline",
|
|
220
|
-
className: "px-3 py-1 text-sm bg-
|
|
220
|
+
className: "px-3 py-1 text-sm bg-bg-surface/50",
|
|
221
221
|
children: Y("security.vaultDetail.stats.secrets", "{count} secret{suffix}", {
|
|
222
222
|
count: W,
|
|
223
223
|
suffix: W === 1 ? "" : "s"
|
|
@@ -225,7 +225,7 @@ function O() {
|
|
|
225
225
|
}),
|
|
226
226
|
H?.lastRotatedAt && /* @__PURE__ */ y(i, {
|
|
227
227
|
variant: "outline",
|
|
228
|
-
className: "px-3 py-1 text-sm bg-
|
|
228
|
+
className: "px-3 py-1 text-sm bg-bg-surface/50 text-text-secondary",
|
|
229
229
|
children: Y("security.vaultDetail.stats.lastRotated", "Last rotated: {date}", { date: new Date(H.lastRotatedAt).toLocaleDateString() })
|
|
230
230
|
})
|
|
231
231
|
]
|
|
@@ -237,7 +237,7 @@ function O() {
|
|
|
237
237
|
}), U.length > 0 ? /* @__PURE__ */ b("div", {
|
|
238
238
|
className: "space-y-4",
|
|
239
239
|
children: [/* @__PURE__ */ y(o, {
|
|
240
|
-
className: "overflow-hidden border-border/60",
|
|
240
|
+
className: "overflow-hidden border-border-subtle/60",
|
|
241
241
|
children: /* @__PURE__ */ y("div", {
|
|
242
242
|
className: "divide-y divide-border/40",
|
|
243
243
|
children: U.map((e) => /* @__PURE__ */ y(se, {
|
|
@@ -273,7 +273,7 @@ function O() {
|
|
|
273
273
|
})
|
|
274
274
|
})]
|
|
275
275
|
}) : /* @__PURE__ */ y(ee, {
|
|
276
|
-
icon: /* @__PURE__ */ y(pe, { className: "size-16 text-
|
|
276
|
+
icon: /* @__PURE__ */ y(pe, { className: "size-16 text-text-secondary/30" }),
|
|
277
277
|
title: Y("security.vaultDetail.empty.title", "This vault is empty"),
|
|
278
278
|
description: Y("security.vaultDetail.empty.description", "Get started by adding your first secret to keep it secure."),
|
|
279
279
|
action: /* @__PURE__ */ b(a, {
|