From 9cd23081edf760273430fa21b4e5dab2fd4af70e Mon Sep 17 00:00:00 2001 From: Christopher Date: Wed, 28 Jan 2026 13:17:36 -0800 Subject: [PATCH] fixed modal --- src/components/IdentityUnlockPrompt.tsx | 399 +++++++++++++----------- 1 file changed, 211 insertions(+), 188 deletions(-) diff --git a/src/components/IdentityUnlockPrompt.tsx b/src/components/IdentityUnlockPrompt.tsx index bd759b8..e97ec04 100644 --- a/src/components/IdentityUnlockPrompt.tsx +++ b/src/components/IdentityUnlockPrompt.tsx @@ -59,209 +59,232 @@ export function IdentityUnlockPrompt({ onUnlock, onCancel }: IdentityUnlockPromp }; return ( -
-
e.stopPropagation()} - > - + to { + transform: translateY(0); + } + } - {/* Drag indicator */} -
+ .identity-unlock-container { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.8); + display: flex; + align-items: center; + justify-content: center; + z-index: 99999; + padding: 20px; + } - {/* Header */} -
-
- -
-

- Identity Required -

-

- Enter your password to unlock your identity -

-
+ .identity-unlock-sheet { + width: 100%; + max-width: 400px; + background: var(--background-secondary); + border-radius: 12px; + padding: 24px; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); + } - {/* Form */} -
-
- - { - setPassword(e.target.value); - setError(null); - }} - disabled={isUnlocking} - placeholder="Enter your password" - autoFocus - style={{ - width: '100%', - padding: '14px 16px', - borderRadius: '12px', - border: error ? '2px solid var(--error)' : '2px solid var(--border)', - background: 'var(--background)', - color: 'var(--foreground)', - fontSize: '16px', - outline: 'none', - transition: 'border-color 0.2s' - }} - onFocus={(e) => { - if (!error) { - e.target.style.borderColor = 'var(--accent)'; - } - }} - onBlur={(e) => { - if (!error) { - e.target.style.borderColor = 'var(--border)'; - } - }} - /> -
+ .drag-indicator { + display: none; + } - {/* Error Message */} - {error && ( + @media (max-width: 768px) { + .identity-unlock-container { + align-items: flex-end; + padding: 0; + } + + .identity-unlock-sheet { + max-width: 100%; + border-radius: 0; + border-top-left-radius: 20px; + border-top-right-radius: 20px; + padding: 24px; + padding-bottom: calc(24px + env(safe-area-inset-bottom)); + animation: slideUp 0.3s ease-out; + } + + .drag-indicator { + display: block; + width: 40px; + height: 4px; + background: var(--border); + border-radius: 2px; + margin: 0 auto 20px; + } + } + `} + +
+
e.stopPropagation()} + > + {/* Drag indicator - only visible on mobile */} +
+ + {/* Header */} +
- - {error} +
- )} +

+ Identity Required +

+
- {/* Buttons */} -
- - -
- + padding: '12px 14px', + borderRadius: '8px', + background: 'rgba(239, 68, 68, 0.1)', + color: 'var(--error)', + fontSize: '14px', + marginBottom: '16px' + }}> + + {error} +
+ )} - {/* Info Note */} -

- Your password never leaves this device -

+ {/* Buttons */} +
+ + +
+ + + {/* Info Note */} +

+ Your password never leaves this device +

+
-
+ ); }