diff --git a/src/app.css b/src/app.css index af6e075..98f41a0 100644 --- a/src/app.css +++ b/src/app.css @@ -92,7 +92,7 @@ body { background-color: #1e293b; } -/* Anon aesthetic: Pure gray to slightly bluish tints for profile pics */ +/* Profile pictures - display in full color */ /* Profile pictures - all instances */ img.profile-picture, .profile-badge img, @@ -101,18 +101,7 @@ img[alt*="profile" i], img[alt*="avatar" i], img[src*="avatar" i], img[src*="profile" i] { - filter: grayscale(100%) sepia(10%) hue-rotate(200deg) saturate(30%) !important; - transition: filter 0.3s ease; -} - -.dark img.profile-picture, -.dark .profile-badge img, -.dark .profile-picture, -.dark img[alt*="profile" i], -.dark img[alt*="avatar" i], -.dark img[src*="avatar" i], -.dark img[src*="profile" i] { - filter: grayscale(100%) sepia(12%) hue-rotate(200deg) saturate(35%) !important; + /* No grayscale filter - profile pictures should be in full color */ } /* Emoji images - no grayscale filter, display in full color */ diff --git a/src/lib/components/content/EmojiPicker.svelte b/src/lib/components/content/EmojiPicker.svelte index c3fdb46..4d2d653 100644 --- a/src/lib/components/content/EmojiPicker.svelte +++ b/src/lib/components/content/EmojiPicker.svelte @@ -45,7 +45,7 @@ try { await loadAllEmojiPacks(); const allEmojis = getAllCustomEmojis(); - console.log(`[EmojiPicker] Loaded ${allEmojis.length} custom emojis`); + console.debug(`[EmojiPicker] Loaded ${allEmojis.length} custom emojis`); customEmojis = allEmojis; } catch (error) { console.error('Error loading custom emojis:', error); diff --git a/src/lib/components/content/GifPicker.svelte b/src/lib/components/content/GifPicker.svelte index d7d50ec..a6dc64f 100644 --- a/src/lib/components/content/GifPicker.svelte +++ b/src/lib/components/content/GifPicker.svelte @@ -15,21 +15,32 @@ let searchQuery = $state(''); let searchInput: HTMLInputElement | null = $state(null); let selectedGif: GifMetadata | null = $state(null); + let error: string | null = $state(null); // Debounce search let searchTimeout: ReturnType | null = null; async function loadGifs(query?: string) { loading = true; + error = null; try { + console.log('[GifPicker] Loading GIFs, query:', query || 'none'); + let results: GifMetadata[]; if (query && query.trim()) { - gifs = await searchGifs(query.trim(), 50); + results = await searchGifs(query.trim(), 50); } else { - gifs = await fetchGifs(undefined, 50); + results = await fetchGifs(undefined, 50); + } + console.log('[GifPicker] Loaded', results.length, 'GIFs'); + gifs = results; + if (results.length === 0 && !query) { + error = 'No GIFs found. Try searching for a specific term, or there may be no GIF events on the relays.'; } } catch (error) { console.error('[GifPicker] Error loading GIFs:', error); + const errorMessage = error instanceof Error ? error.message : String(error); gifs = []; + error = `Failed to load GIFs: ${errorMessage}`; } finally { loading = false; } @@ -118,12 +129,22 @@
{#if loading}
Loading GIFs...
+ {:else if error} +
+

{error}

+ +
{:else if gifs.length === 0}
{#if searchQuery} - No GIFs found for "{searchQuery}" +

No GIFs found for "{searchQuery}"

+

Try a different search term. The relays were queried but returned no matching kind 94 (NIP94) GIF events.

{:else} - No GIFs available +

No GIFs available

+

The relays were queried successfully, but no kind 94 (NIP94) GIF events were found. This means there are currently no GIFs published as NIP94 file attachments on the connected relays.

+

You can try searching for a specific term, or the relays may not have any GIF events available at this time.

{/if}
{:else} @@ -139,6 +160,11 @@ alt="GIF" loading="lazy" class="gif-thumbnail" + onerror={(e) => { + console.warn('[GifPicker] Failed to load image:', gif.url); + const target = e.target as HTMLImageElement; + target.style.display = 'none'; + }} /> {/each} @@ -297,7 +323,8 @@ } .gif-loading, - .gif-empty { + .gif-empty, + .gif-error { text-align: center; padding: 2rem; color: var(--fog-text-light, #9ca3af); @@ -305,9 +332,40 @@ } :global(.dark) .gif-loading, - :global(.dark) .gif-empty { + :global(.dark) .gif-empty, + :global(.dark) .gif-error { color: var(--fog-dark-text-light, #6b7280); } + + .gif-hint { + margin-top: 0.5rem; + font-size: 0.75rem; + opacity: 0.8; + } + + .gif-error { + color: var(--fog-error, #dc2626); + } + + :global(.dark) .gif-error { + color: var(--fog-dark-error, #ef4444); + } + + .retry-button { + margin-top: 1rem; + padding: 0.5rem 1rem; + background: var(--fog-accent, #64748b); + color: white; + border: none; + border-radius: 0.375rem; + cursor: pointer; + font-size: 0.875rem; + transition: opacity 0.2s; + } + + .retry-button:hover { + opacity: 0.9; + } .gif-grid { display: grid; diff --git a/src/lib/components/layout/ProfileBadge.svelte b/src/lib/components/layout/ProfileBadge.svelte index d5783b0..7711288 100644 --- a/src/lib/components/layout/ProfileBadge.svelte +++ b/src/lib/components/layout/ProfileBadge.svelte @@ -104,7 +104,7 @@ {:else}
{avatarInitials} @@ -122,13 +122,12 @@ text-decoration: none; color: inherit; max-width: 100%; - filter: grayscale(100%) opacity(0.7); - transition: filter 0.2s; + transition: opacity 0.2s; } .profile-badge:hover { text-decoration: underline; - filter: grayscale(100%) opacity(0.9); + opacity: 0.9; } .profile-picture { diff --git a/src/lib/modules/comments/CommentForm.svelte b/src/lib/modules/comments/CommentForm.svelte index 292e51b..3ffcd34 100644 --- a/src/lib/modules/comments/CommentForm.svelte +++ b/src/lib/modules/comments/CommentForm.svelte @@ -191,7 +191,10 @@