Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions chat-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ document.addEventListener("DOMContentLoaded", () => {
const gallery = document.getElementById('past-image-gallery');
if (!gallery) return;
if ([...gallery.querySelectorAll('img.thumbnail')].some(img => img.src === imageUrl)) return;
const wrapper = gallery.parentElement;
const img = document.createElement('img');
img.src = imageUrl;
img.className = 'thumbnail';
img.addEventListener('click', () => {
openImageModal(imageUrl);
});
gallery.appendChild(img);
if (wrapper && wrapper.classList.contains('hidden')) {
wrapper.classList.remove('hidden');
}
if (window.Memory && typeof window.Memory.saveImage === 'function') {
window.Memory.saveImage(imageUrl);
}
Expand Down
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ <h2>Sessions</h2>
</button>
</div>
</div>
<div class="gallery-wrapper">
<div id="past-image-gallery" class="screensaver-thumbnails">
<!-- JS will populate thumbnails here -->
</div>
</div>
<div class="gallery-wrapper hidden">
<div id="past-image-gallery" class="screensaver-thumbnails">
<!-- JS will populate thumbnails here -->
</div>
</div>
</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,7 @@ body {
padding: 8px;
border-top: 2px solid #505050;
z-index: 50;
pointer-events: none;
}

#past-image-gallery {
Expand All @@ -980,6 +981,7 @@ body {
gap: 10px;
overflow-x: auto;
scrollbar-width: thin;
pointer-events: auto;
}

#past-image-gallery img.thumbnail {
Expand Down