diff --git a/frontend/src/components/modals/EdgeModal.tsx b/frontend/src/components/modals/EdgeModal.tsx index e254dca..720572d 100644 --- a/frontend/src/components/modals/EdgeModal.tsx +++ b/frontend/src/components/modals/EdgeModal.tsx @@ -1,4 +1,5 @@ import { useState } from 'react' +import modalStyles from './modal-interactive.module.css' import { RotateCcw } from 'lucide-react' import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { Button } from '@/components/ui/button' @@ -68,7 +69,7 @@ export function EdgeModal({ open, onClose, onSubmit, onDelete, onClearWaypoints,
{onDelete ? ( - ) : }
- - +
diff --git a/frontend/src/components/modals/GroupRectModal.tsx b/frontend/src/components/modals/GroupRectModal.tsx index e698ce2..209b57b 100644 --- a/frontend/src/components/modals/GroupRectModal.tsx +++ b/frontend/src/components/modals/GroupRectModal.tsx @@ -1,4 +1,5 @@ import { useState } from 'react' +import modalStyles from './modal-interactive.module.css' import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' @@ -129,7 +130,7 @@ export function GroupRectModal({ open, onClose, onSubmit, onDelete, initial, tit value={form.label} onChange={(e) => set('label', e.target.value)} placeholder="Zone name…" - className="bg-[#21262d] border-[#30363d] text-sm h-8" + className={`bg-[#21262d] border-[#30363d] text-sm h-8 ${modalStyles['modal-radius']}`} />
@@ -137,7 +138,7 @@ export function GroupRectModal({ open, onClose, onSubmit, onDelete, initial, tit
set('z_order', v !== null ? Number(v) : 1)}> - + @@ -338,17 +339,17 @@ export function GroupRectModal({ open, onClose, onSubmit, onDelete, initial, tit type="button" variant="ghost" size="sm" - className="text-[#f85149] hover:text-[#f85149] hover:bg-[#f85149]/10" + className="text-[#f85149] hover:text-[#f85149] hover:bg-[#f85149]/10 cursor-pointer" onClick={() => { onDelete(); onClose() }} > Delete )}
- -
diff --git a/frontend/src/components/modals/NodeModal.tsx b/frontend/src/components/modals/NodeModal.tsx index f8cf3f1..622b51b 100644 --- a/frontend/src/components/modals/NodeModal.tsx +++ b/frontend/src/components/modals/NodeModal.tsx @@ -1,4 +1,5 @@ import { Fragment, createElement, useState } from 'react' +import modalStyles from './modal-interactive.module.css' import { RotateCcw, ChevronDown } from 'lucide-react' import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { Button } from '@/components/ui/button' @@ -96,7 +97,7 @@ export function NodeModal({ open, onClose, onSubmit, initial, title = 'Add Node'
set('ip', e.target.value)} placeholder="192.168.1.x, 2001:db8::1" - className="bg-[#21262d] border-[#30363d] font-mono text-sm h-8" + className={`bg-[#21262d] border-[#30363d] font-mono text-sm h-8 ${modalStyles['modal-radius']}`} /> + comma-separated
{/* Check method */}
set('bottom_handles', parseInt(v ?? '1', 10))} > - + @@ -383,22 +391,37 @@ export function NodeModal({ open, onClose, onSubmit, initial, title = 'Add Node' value={form.notes ?? ''} onChange={(e) => set('notes', e.target.value)} placeholder="Optional notes" - className="bg-[#21262d] border-[#30363d] text-sm h-8" + className={`bg-[#21262d] border-[#30363d] text-sm h-8 ${modalStyles['modal-radius']}`} />
-
- - +
+ {/* Show delete button only for edit mode (not add) */} + {title !== 'Add Node' ? ( + + ) : } +
+ + +
diff --git a/frontend/src/components/modals/modal-interactive.module.css b/frontend/src/components/modals/modal-interactive.module.css new file mode 100644 index 0000000..45650b5 --- /dev/null +++ b/frontend/src/components/modals/modal-interactive.module.css @@ -0,0 +1,27 @@ +/* SidebarItem pointer on hover */ +.sidebar-pointer:hover { + cursor: pointer !important; +} +/* Consistent border radius for all modal input/select/button elements */ +.modal-radius { + border-radius: 6px !important; +} + +/* Pointer cursor for close X */ +.modal-close-pointer:hover { + cursor: pointer !important; +} + +/* Subtle hover background for cancel button */ +.modal-cancel-hover:hover { + background: #21262d !important; +} +/* Shared hover/focus border effect for interactive modal elements */ +.modal-interactive { + transition: border-color 0.15s; +} +.modal-interactive:hover, +.modal-interactive:focus { + border-color: #8b949e !important; + outline: none; +} diff --git a/frontend/src/components/panels/DetailPanel.tsx b/frontend/src/components/panels/DetailPanel.tsx index 6bc8c5a..b53a8ad 100644 --- a/frontend/src/components/panels/DetailPanel.tsx +++ b/frontend/src/components/panels/DetailPanel.tsx @@ -200,7 +200,7 @@ export function DetailPanel({ onEdit }: DetailPanelProps) {