diff options
| author | dax <me@dax.ist> | 2026-08-04 16:54:07 +0100 |
|---|---|---|
| committer | dax <me@dax.ist> | 2026-08-04 16:54:07 +0100 |
| commit | dadf0909dd235a7764a59a63d2b51861fa81e385 (patch) | |
| tree | fad8563b7c2d9f7f9216b001a1f89ba5db5f5479 /public/index.html | |
| parent | 6a0dc37b2e5580987df8fd11becdff53b32c9836 (diff) | |
add photo import: upload -> photoprism, fix desktop file dialog
- POST /api/import with native multipart parser (no new deps); stages files
then delegates indexing+thumbnailing to PhotoPrism via `photoprism cp`
- pathways reflects new photos immediately via refresh()
- upload UI shown only in empty-library state
- nixos: PHOTOPRISM_READONLY=false; pathways service gets STAGING_ROOT and
photoprism env; PATH includes /run/wrappers/bin so sudo is found
- fix: stage.setPointerCapture was swallowing the import label's click on
desktop, preventing the native file dialog from opening
Diffstat (limited to 'public/index.html')
| -rw-r--r-- | public/index.html | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/public/index.html b/public/index.html index 549ca5d..0f44c6b 100644 --- a/public/index.html +++ b/public/index.html @@ -5,17 +5,25 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="color-scheme" content="dark"> <title>pathways</title> - <link rel="stylesheet" href="/app.css?v=26"> + <link rel="stylesheet" href="/app.css?v=43"> </head> <body> <main id="stage"> <div id="world"></div> + <div id="import-state" hidden> + <h1>pathways<span class="dot">.</span></h1> + <p>your library is empty — add some photos to begin.</p> + <label id="import" for="file"> + <svg viewBox="0 0 24 24" aria-hidden="true"> + <path d="M12 16V4m0 0L7.5 8.5M12 4l4.5 4.5M4 16v2.5A1.5 1.5 0 0 0 5.5 20h13a1.5 1.5 0 0 0 1.5-1.5V16"/> + </svg> + <span>import photos</span> + </label> + </div> </main> - <div id="splash"> - <h1>pathways<span class="dot">.</span></h1> - <p>four paths, one per direction. walk them.</p> - <button id="start">start</button> - </div> - <script src="/app.js?v=27"></script> + <input id="file" type="file" accept="image/jpeg,image/png,image/webp" multiple> + <div id="drop"><span>drop photos to import</span></div> + <div id="toast" role="status" aria-live="polite"></div> + <script src="/app.js?v=43"></script> </body> </html> |
