Files
skywatch/client/src/NotificationCenter.css
nmemmertandClaude Sonnet 4.6 b83a19e9cf Add 10 UX/feature improvements across dashboard, status page, and API
- Incident acknowledge: Ack button in dashboard rail and ResourceDetail incidents table
- Status page 90-day uptime history bars (teal ≥99%, amber ≥95%, red <95%, grey = no data)
- Theme setting applied: data-theme attribute wired to saved setting with CSS variables + light mode overrides
- Sparkline replaced with colored status bars (teal=up, red=down, grey=unknown) per check tick
- ResourceDetail chart time-range selector: 1h / 6h / 24h / 7d toggle fetches from checks endpoint
- Bulk actions: checkbox per row, select-all header, bulk delete and maintenance toggle bar
- CSV export adds 6 new fields (http_method, http_body, heartbeat_timeout, is_public, consecutive_failures_threshold, response_time_threshold)
- CSV import handles those 6 new fields on INSERT
- Check detail expansion: click expandable rows in Recent Checks to show full details JSON
- Browser push notifications: request permission opt-in, new Notification() on WS message when tab unfocused

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-31 11:01:24 -04:00

308 lines
5.0 KiB
CSS

.notification-center {
position: relative;
}
.notification-bell-container {
display: flex;
align-items: center;
}
.notification-bell {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
position: relative;
padding: 0.5rem;
transition: transform 0.2s;
}
.notification-bell:hover {
transform: scale(1.1);
}
.notification-badge {
position: absolute;
top: 0;
right: 0;
background: #ef4444;
color: #fff;
border-radius: 50%;
width: 1.2rem;
height: 1.2rem;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.6rem;
font-weight: 700;
line-height: 1;
}
/* ── Panel ── */
.notification-popup {
position: fixed;
top: 60px;
right: 20px;
width: 420px;
max-height: 600px;
background: #1e293b;
border: 1px solid #334155;
border-radius: 10px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
z-index: 1000;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* ── Header ── */
.notification-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.875rem 1rem;
border-bottom: 1px solid #334155;
background: #0f172a;
}
.notification-header h3 {
margin: 0;
font-size: 1rem;
font-weight: 600;
color: #f1f5f9;
letter-spacing: 0.01em;
}
.close-btn {
background: none;
border: none;
font-size: 1.1rem;
cursor: pointer;
color: #64748b;
padding: 0;
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: color 0.15s, background 0.15s;
}
.close-btn:hover {
color: #e2e8f0;
background: #334155;
}
/* ── Filters ── */
.notification-filters {
display: flex;
gap: 0.4rem;
padding: 0.6rem 0.875rem;
border-bottom: 1px solid #334155;
background: #1e293b;
flex-wrap: wrap;
}
.filter-btn {
padding: 0.3rem 0.65rem;
border: 1px solid #334155;
background: transparent;
color: #94a3b8;
border-radius: 5px;
cursor: pointer;
font-size: 0.8rem;
font-weight: 500;
transition: all 0.15s;
}
.filter-btn:hover {
border-color: #14b8a6;
color: #14b8a6;
}
.filter-btn.active {
background: #14b8a6;
color: #0f172a;
border-color: #14b8a6;
font-weight: 600;
}
.clear-btn {
margin-left: auto;
background: transparent;
color: #f87171;
border-color: #f87171;
}
.clear-btn:hover {
background: #f87171;
color: #0f172a;
border-color: #f87171;
}
/* ── List ── */
.notification-list {
flex: 1;
overflow-y: auto;
max-height: 460px;
}
.notification-item {
padding: 0.875rem 1rem;
border-bottom: 1px solid #1e293b;
display: flex;
gap: 0.75rem;
background: #1e293b;
transition: background 0.15s;
cursor: default;
}
.notification-item:last-child {
border-bottom: none;
}
.notification-item:hover {
background: #263347;
}
.notification-item.unread {
background: #162032;
border-left: 3px solid #14b8a6;
}
.notification-item.unread:hover {
background: #1c2a40;
}
/* ── Content ── */
.notification-content {
flex: 1;
min-width: 0;
}
.notification-title {
font-weight: 600;
margin-bottom: 0.3rem;
font-size: 0.875rem;
color: #f1f5f9;
line-height: 1.3;
}
.notification-message {
font-size: 0.8rem;
color: #94a3b8;
margin-bottom: 0.5rem;
word-break: break-word;
line-height: 1.45;
}
.notification-meta {
display: flex;
gap: 0.5rem;
font-size: 0.72rem;
color: #64748b;
flex-wrap: wrap;
align-items: center;
}
.notification-resource {
background: #0f172a;
color: #94a3b8;
padding: 0.15rem 0.45rem;
border-radius: 3px;
border: 1px solid #334155;
font-size: 0.7rem;
}
.notification-time {
white-space: nowrap;
}
/* ── Actions ── */
.notification-actions {
display: flex;
gap: 0.25rem;
align-items: flex-start;
flex-shrink: 0;
}
.action-btn {
background: none;
border: none;
cursor: pointer;
font-size: 0.9rem;
padding: 0.25rem 0.4rem;
color: #475569;
border-radius: 4px;
transition: color 0.15s, background 0.15s;
}
.action-btn:hover {
background: #334155;
color: #e2e8f0;
}
.action-btn.mark-read:hover {
color: #4ade80;
}
.action-btn.delete:hover {
color: #f87171;
}
/* ── Empty state ── */
.notification-empty {
padding: 2.5rem 1rem;
text-align: center;
color: #475569;
font-size: 0.875rem;
}
/* ── Scrollbar ── */
.notification-list::-webkit-scrollbar {
width: 5px;
}
.notification-list::-webkit-scrollbar-track {
background: #0f172a;
}
.notification-list::-webkit-scrollbar-thumb {
background: #334155;
border-radius: 3px;
}
.notification-list::-webkit-scrollbar-thumb:hover {
background: #475569;
}
/* ── Push prompt ── */
.push-prompt {
padding: 0.4rem 0.875rem 0;
}
/* ── Mobile ── */
@media (max-width: 600px) {
.notification-popup {
position: fixed;
top: 60px;
right: 10px;
left: 10px;
width: auto;
max-height: 70vh;
}
.notification-filters {
flex-direction: column;
}
.filter-btn {
flex: 1;
}
.clear-btn {
margin-left: 0;
}
}