bak
This commit is contained in:
1 parent
0d4d369870
commit
9c71e65041
9 files changed
+423
-16
No files matched your search
@@ -77,7 +77,7 @@ export async function openGallery() {
|
||||
if (linked.length) {
|
||||
if (orphaned.length) html += `<div class="col-span-full font-pixel text-[10px] text-t-muted flex items-center gap-1.5 pt-3"><i class="ph ph-link text-xs"></i>linked to cards</div>`;
|
||||
html += linked.map(img => `
|
||||
<div class="gallery-item group relative cursor-pointer" data-card-id="${img.cardId}">
|
||||
<div class="gallery-item group relative cursor-pointer" data-card-id="${img.cardId}" data-gallery-origin="${encodeURIComponent(img.url)}">
|
||||
<div class="aspect-square bg-t-bg border border-t-border rounded overflow-hidden">
|
||||
<img src="${img.url}" class="w-full h-full object-cover" loading="lazy">
|
||||
</div>
|
||||
@@ -94,7 +94,12 @@ export async function openGallery() {
|
||||
|
||||
// Linked image clicks → open card
|
||||
grid.querySelectorAll('[data-card-id]').forEach(item => {
|
||||
item.addEventListener('click', () => { closeGallery(); window._openDetail(item.dataset.cardId); });
|
||||
item.addEventListener('click', () => {
|
||||
window._openDetail(item.dataset.cardId, {
|
||||
fromGallery: true,
|
||||
galleryOrigin: item.dataset.galleryOrigin || null,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Orphan: create card from image
|
||||
|
||||
Reference in new issue
Block a user