mirror of
https://github.com/dergigi/boris.git
synced 2026-02-10 09:34:49 +01:00
refactor: improve delete dialog UI and simplify message
- Reduce verbose warning text to simple 'This will delete your highlight' - Add proper CSS styling for confirm dialog with backdrop blur - Center-aligned text and circular icon with color-coded background - Modern button styling with proper hover states - Full-width buttons in action row - Theme-aware colors using CSS variables
This commit is contained in:
@@ -575,7 +575,7 @@ export const HighlightItem: React.FC<HighlightItemProps> = ({
|
||||
<ConfirmDialog
|
||||
isOpen={showDeleteConfirm}
|
||||
title="Delete Highlight?"
|
||||
message="This will request deletion of your highlight. It may still be visible on some relays that don't honor deletion requests."
|
||||
message="This will delete your highlight."
|
||||
confirmText="Delete"
|
||||
cancelText="Cancel"
|
||||
variant="danger"
|
||||
|
||||
@@ -25,3 +25,23 @@
|
||||
.btn-primary:hover:not(:disabled) { background: var(--color-primary-hover); }
|
||||
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
|
||||
|
||||
/* Confirm Dialog */
|
||||
.confirm-dialog-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 10000; padding: 1rem; }
|
||||
.confirm-dialog { background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: 12px; max-width: 400px; width: 100%; padding: 1.5rem; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }
|
||||
.confirm-dialog-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 1rem; font-size: 1.5rem; }
|
||||
.confirm-dialog-icon.danger { background: rgba(220, 38, 38, 0.1); color: rgb(220 38 38); }
|
||||
.confirm-dialog-icon.warning { background: rgba(251, 191, 36, 0.1); color: rgb(251 191 36); }
|
||||
.confirm-dialog-icon.info { background: rgba(59, 130, 246, 0.1); color: rgb(59 130 246); }
|
||||
.confirm-dialog-title { margin: 0 0 0.5rem 0; font-size: 1.25rem; font-weight: 600; color: var(--color-text); text-align: center; }
|
||||
.confirm-dialog-message { margin: 0 0 1.5rem 0; font-size: 0.9rem; color: var(--color-text-secondary); text-align: center; line-height: 1.5; }
|
||||
.confirm-dialog-actions { display: flex; gap: 0.75rem; }
|
||||
.confirm-dialog-btn { flex: 1; padding: 0.75rem 1rem; border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
|
||||
.confirm-dialog-btn.cancel { background: var(--color-bg); border: 1px solid var(--color-border); color: var(--color-text); }
|
||||
.confirm-dialog-btn.cancel:hover { background: var(--color-border); }
|
||||
.confirm-dialog-btn.confirm.danger { background: rgb(220 38 38); color: white; }
|
||||
.confirm-dialog-btn.confirm.danger:hover { background: rgb(185 28 28); }
|
||||
.confirm-dialog-btn.confirm.warning { background: rgb(251 191 36); color: rgb(17 24 39); }
|
||||
.confirm-dialog-btn.confirm.warning:hover { background: rgb(245 158 11); }
|
||||
.confirm-dialog-btn.confirm.info { background: rgb(59 130 246); color: white; }
|
||||
.confirm-dialog-btn.confirm.info:hover { background: rgb(37 99 235); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user