diff --git a/public/index.html b/public/index.html index c8b157e..483ac4d 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ Web OSCAR Chat - +
@@ -50,7 +50,7 @@
- - + diff --git a/public/js/ui.js b/public/js/ui.js index 6d2b980..bae5e6e 100644 --- a/public/js/ui.js +++ b/public/js/ui.js @@ -162,9 +162,15 @@ export function renderBuddies(buddies, onOpen) { export function renderInvites(invites, onAccept, onIgnore) { const list = document.getElementById('invites'); + const card = document.getElementById('invitesCard'); if (!list) return; clear(list); - for (const inv of invites || []) { + const items = invites || []; + if (card) { + card.classList.toggle('hidden', items.length === 0); + card.classList.toggle('invite-attention', items.length > 0); + } + for (const inv of items) { const li = document.createElement('li'); li.className = 'invite'; const title = document.createElement('div'); diff --git a/public/style.css b/public/style.css index 71d0300..c330181 100644 --- a/public/style.css +++ b/public/style.css @@ -263,3 +263,12 @@ main { padding: 1rem; max-width: 1600px; margin: 0 auto; } .sidebar { order: 2; overflow: visible; } .chat-panel { min-height: 55vh; height: 70vh; } } + +#invitesCard.invite-attention { + animation: invite-pulse 2.4s ease-in-out infinite; + border-color: rgba(255, 209, 102, 0.7); +} +@keyframes invite-pulse { + 0%, 100% { box-shadow: 0 0 0 rgba(255, 209, 102, 0); border-color: rgba(255, 209, 102, 0.35); } + 50% { box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.12), 0 0 18px rgba(255, 209, 102, 0.18); border-color: rgba(255, 209, 102, 0.9); } +}