From 938cee689c0ea72f2da18f168d3b43df59433915 Mon Sep 17 00:00:00 2001 From: "MEGASOL\\simon.adams" Date: Mon, 15 Sep 2025 18:03:48 +0200 Subject: [PATCH] responsive-app v1 --- frontend/app.js | 13 +++++++++++++ frontend/index.html | 33 ++++++++++++++++++++------------- frontend/invite.html | 24 ++++++++++++++++-------- frontend/menu.html | 22 +++++++++++----------- 4 files changed, 60 insertions(+), 32 deletions(-) diff --git a/frontend/app.js b/frontend/app.js index c6e8c09..71d064b 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -173,12 +173,14 @@ async function runQueue(){ // --- DOM refs --- const dz = document.getElementById('dropzone'); const fi = document.getElementById('fileInput'); +const btnMobilePick = document.getElementById('btnMobilePick'); const btnClearFinished = document.getElementById('btnClearFinished'); const btnClearAll = document.getElementById('btnClearAll'); const btnPing = document.getElementById('btnPing'); const pingStatus = document.getElementById('pingStatus'); const banner = document.getElementById('topBanner'); const btnTheme = document.getElementById('btnTheme'); +const dropHint = document.getElementById('dropHint'); // --- Simple banner helper --- function showBanner(text, kind='ok'){ @@ -245,6 +247,9 @@ dz.addEventListener('drop', (e)=>{ // --- Mobile-safe file input change handler --- const isTouch = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0); let suppressClicksUntil = 0; +if (isTouch && dropHint) { + try { dropHint.classList.add('hidden'); } catch {} +} fi.addEventListener('click', (e) => { // prevent bubbling to parents (extra safety) @@ -278,6 +283,14 @@ if (!isTouch) { }); } +// Mobile sticky CTA: trigger system file picker +if (btnMobilePick) { + btnMobilePick.onclick = () => { + try { fi.value = ''; } catch {} + fi.click(); + }; +} + // --- Clear buttons --- btnClearFinished.onclick = ()=>{ items = items.filter(i => !['done','duplicate'].includes(i.status)); diff --git a/frontend/index.html b/frontend/index.html index 01facbf..f73f723 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -7,21 +7,20 @@ +
-
+

Immich Drop Uploader

- Login - - - + +
-
-
+
+ -

Drop images or videos here

-

...or

+ +
-
@@ -85,6 +85,13 @@
+ +
+
+ +
+
+ diff --git a/frontend/invite.html b/frontend/invite.html index d23dea5..9680429 100644 --- a/frontend/invite.html +++ b/frontend/invite.html @@ -9,7 +9,9 @@ - + @@ -18,7 +20,7 @@
-
+

Immich Drop Uploader

@@ -52,16 +54,16 @@
-
-
+
+ -

Drop images or videos here

-

...or

+ +
-
@@ -86,6 +88,12 @@ Invite upload page
+ +
+
+ +
+
diff --git a/frontend/menu.html b/frontend/menu.html index 250fd4a..caa73f6 100644 --- a/frontend/menu.html +++ b/frontend/menu.html @@ -31,16 +31,16 @@
-
+
Target album
@@ -48,26 +48,26 @@
Usage
-
Expires in days
- +
- +