← Commit history

Publish 0.24.1

John Lauer ·ab37b1aeb9 ·2mo ago ·parent e0ec86d
7 files changed +27−12
Cargo.lock+1−1
@@ -10,7 +10,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"  [[package]] name = "adom-shotlog"-version = "0.24.0"+version = "0.24.1" dependencies = [  "axum",  "base64",
Cargo.toml+1−1
@@ -1,6 +1,6 @@ [package] name = "adom-shotlog"-version = "0.24.0"+version = "0.24.1" edition = "2021" description = "Screenshot log viewer and CLI for Adom" license = "MIT"
VERSION+1−1
@@ -1 +1 @@-0.24.0+0.24.1
bin/adom-shotlog
⋯ 1 unchanged line ⋯
package.json+1−1
@@ -1,6 +1,6 @@ {   "slug": "adom-shotlog",-  "version": "0.24.0",+  "version": "0.24.1",   "type": "app",   "title": "Adom Shotlog",   "description": "See the shots your AI never showed you, and know it actually SAW them. adom-shotlog streams every screenshot the AI gathers into a live gallery (webview/pup/browser/phone), reports whether a human is really watching and on which surface, and ingests Adom Desktop child-window arrays via --meta.",
page.json+1−1
@@ -1,6 +1,6 @@ {   "slug": "adom-shotlog",-  "version": "0.24.0",+  "version": "0.24.1",   "type": "app",   "title": "Adom Shotlog",   "description": "See the shots your AI never showed you, and know it actually SAW them. adom-shotlog streams every screenshot the AI gathers into a live gallery (webview/pup/browser/phone), reports whether a human is really watching and on which surface, and ingests Adom Desktop child-window arrays via --meta.",
src/html/index.html+22−7
@@ -872,6 +872,7 @@ header {   }    function openModal(e) {+    backFromFill=false; mImg.style.cursor='';   // fresh shot: click 1 = fill     mImg.src=imgUrl(e); mImg.alt=e.description||e.filename;     const isAutoM=(e.source||'').startsWith('read-hook');     mDesc.textContent=(isAutoM&&e.context)?e.context:(e.description||'');@@ -966,25 +967,39 @@ header {   const rfs = lightbox.requestFullscreen || lightbox.webkitRequestFullscreen;   const xfs = document.exitFullscreen || document.webkitExitFullscreen;   function fsElement(){ return document.fullscreenElement || document.webkitFullscreenElement || null; }+  // Clicking the maxed image is a TOGGLE STACK: list -> maxed -> fill -> maxed+  // -> list. On the way up a click fills; once you've filled and come BACK to+  // the maxed modal, the next image click un-maxes (closes the modal). This+  // flag records "we just returned from fill", so the 4th click closes instead+  // of re-filling. The cursor flips to zoom-out to signal it.+  let backFromFill = false;+  function landOnMaxed(){ backFromFill = true; mImg.style.cursor = 'zoom-out'; }   function fillWindow(src, alt){     // The click that called this IS the user gesture the API requires.+    backFromFill = false; mImg.style.cursor = '';   // going INTO fill     lbImg.src = src; lbImg.alt = alt || '';     lightbox.classList.add('open');           // fallback overlay + backdrop, always     if (rfs) { try { const p = rfs.call(lightbox); if (p && p.catch) p.catch(()=>{}); } catch {} }   }   function exitFill(){     // If the host granted fullscreen, leaving it fires fullscreenchange, which-    // clears .open. Otherwise (fallback overlay) clear it here directly.-    if (fsElement() === lightbox && xfs) { try { xfs.call(document); } catch { lightbox.classList.remove('open'); } }-    else { lightbox.classList.remove('open'); }+    // clears .open + lands us on maxed. Otherwise (fallback overlay) do it here.+    if (fsElement() === lightbox && xfs) { try { xfs.call(document); } catch { lightbox.classList.remove('open'); landOnMaxed(); } }+    else { lightbox.classList.remove('open'); landOnMaxed(); }   }   // Keep DOM state in lockstep with the host: if the user exits fullscreen by-  // any means (Esc, host chrome), drop the lightbox too.-  const onFsChange = () => { if (!fsElement()) lightbox.classList.remove('open'); };+  // any means (Esc, host chrome), drop the lightbox and arm the un-max click.+  const onFsChange = () => {+    if (fsElement()) return;                        // entering/switching: nothing to do+    if (lightbox.classList.contains('open')) { lightbox.classList.remove('open'); landOnMaxed(); }+  };   document.addEventListener('fullscreenchange', onFsChange);   document.addEventListener('webkitfullscreenchange', onFsChange);-  // Clicking the image (or the ⛶ button) fills the window; backdrop/× exits.-  mImg.addEventListener('click', e => { e.stopPropagation(); fillWindow(mImg.src, mImg.alt); });+  // Clicking the image: fills the window, OR un-maxes if we just came back from+  // fill (the 4th click in the stack). The ⛶ button ALWAYS fills (explicit).+  mImg.addEventListener('click', e => { e.stopPropagation();+    if (backFromFill) { backFromFill = false; mImg.style.cursor = ''; closeModal(); }+    else fillWindow(mImg.src, mImg.alt); });   $('mFillBtn').addEventListener('click', e => { e.stopPropagation(); fillWindow(mImg.src, mImg.alt); });   lightbox.addEventListener('click', e => { if (e.target === lightbox || e.target === lbImg) exitFill(); });   $('lbClose').addEventListener('click', e => { e.stopPropagation(); exitFill(); });