From 698f693700d54abcc509acafc9a306993533f640 Mon Sep 17 00:00:00 2001 From: Kibi Kelburton Date: Thu, 16 Jul 2026 02:16:17 +0200 Subject: [PATCH] hdf --- public/s/css/f0ckm.css | 35 +++++++++++++++++++++++++++++++++++ public/s/js/comments.js | 20 ++++++++++++++++++-- 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/public/s/css/f0ckm.css b/public/s/css/f0ckm.css index 2a3809a..fd7a1c5 100644 --- a/public/s/css/f0ckm.css +++ b/public/s/css/f0ckm.css @@ -5652,6 +5652,41 @@ body[type='login'] { } /* Hold-to-preview sticker overlay */ +/* Sticker favorites toast notification */ +.emoji-fav-toast { + position: fixed; + bottom: 80px; + left: 50%; + transform: translateX(-50%) translateY(20px); + background: rgba(20,20,20,0.92); + border: 1px solid var(--emoji-fav-color, #f5c518); + color: var(--white, #fff); + padding: 10px 20px; + border-radius: 24px; + font-size: 0.875em; + font-weight: 600; + white-space: nowrap; + pointer-events: none; + opacity: 0; + z-index: 100000; + backdrop-filter: blur(8px); + transition: none; +} +.emoji-fav-toast.toast-in { + animation: emojiToastIn 0.22s ease forwards; +} +.emoji-fav-toast.toast-out { + animation: emojiToastOut 0.3s ease forwards; +} +@keyframes emojiToastIn { + from { opacity: 0; transform: translateX(-50%) translateY(20px); } + to { opacity: 1; transform: translateX(-50%) translateY(0); } +} +@keyframes emojiToastOut { + from { opacity: 1; transform: translateX(-50%) translateY(0); } + to { opacity: 0; transform: translateX(-50%) translateY(10px); } +} + .sticker-preview-overlay { position: fixed; inset: 0; diff --git a/public/s/js/comments.js b/public/s/js/comments.js index 55be762..a31d6ad 100644 --- a/public/s/js/comments.js +++ b/public/s/js/comments.js @@ -4016,6 +4016,21 @@ class CommentSystem { // ── Shared sticker hold-to-preview overlay ──────────────────────── if (!window.stickerPreview) { + // ── Toast notification (singleton) ── + const toastEl = document.createElement('div'); + toastEl.className = 'emoji-fav-toast'; + document.body.appendChild(toastEl); + let _toastTimer = null; + const showToast = (msg) => { + clearTimeout(_toastTimer); + toastEl.textContent = msg; + toastEl.classList.remove('toast-out'); + toastEl.classList.add('toast-in'); + _toastTimer = setTimeout(() => { + toastEl.classList.replace('toast-in', 'toast-out'); + }, 2000); + }; + const overlay = document.createElement('div'); overlay.className = 'sticker-preview-overlay'; document.body.appendChild(overlay); @@ -4041,8 +4056,9 @@ class CommentSystem { e.stopPropagation(); window._emojiPickerFavUtils.toggle(name, url); const nowFav = window._emojiPickerFavUtils.has(name); - favBtn.classList.toggle('is-fav', nowFav); - favBtn.innerHTML = ''; + // Close preview immediately and show toast + window.stickerPreview.hide(); + showToast(nowFav ? 'Emoji added to Favorites' : 'Emoji removed from Favorites'); window._emojiPickerRefresh?.(); }); favBtn.addEventListener('touchend', (e) => { e.preventDefault(); e.stopPropagation(); favBtn.click(); });