From 242d716f7b82638f6ef24fc4a07d9c22ade25f03 Mon Sep 17 00:00:00 2001
From: Alan Grainger <16197738+alangrainger@users.noreply.github.com>
Date: Tue, 6 Oct 2026 11:14:36 +1300
Subject: [PATCH] Add upload page and move styles to shared assets
---
CONTRIBUTING.md | 7 +-
app/public/style.css | 78 +------
app/src/view/gallery.tsx | 2 +-
shared/public/theme.css | 92 +++++++++
shared/src/view/theme.tsx | 2 +
upload-app/public/style.css | 285 ++++++++++++++++++++++++++
upload-app/src/client/upload.ts | 347 ++++++++++++++++++++++++++++++++
upload-app/src/shared/icons.ts | 18 ++
upload-app/src/view/upload.tsx | 48 ++++-
9 files changed, 788 insertions(+), 91 deletions(-)
create mode 100644 upload-app/public/style.css
create mode 100644 upload-app/src/client/upload.ts
create mode 100644 upload-app/src/shared/icons.ts
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index db1bf4b..ee80583 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -48,7 +48,7 @@ shared/ @ipp/core - read-side only, knows nothing about galler
version.ts App version from APP_VERSION or the app's package.json
utils/ log, sanitize (filenames), text (escaping), ttlLruCache, webStream (incl. streaming request bodies)
view/ Page renderer, theme script, password page
- public/ Static assets both apps serve: pico, Inter font, favicon, theme.css (tokens and page base)
+ public/ Static assets both apps serve: pico, Inter font, favicon, theme.css (tokens, page base, page header)
tests/ Vitest unit tests for core
app/
config.json Runtime configuration, overrideable via volume or inline
@@ -91,8 +91,9 @@ upload-app/ immich-public-proxy-upload - one page per share; strea
filename.ts Stored filename: sanitised, prefixed, extension kept
notify.ts Optional JSON webhook per stored file
idleTimeoutStream.ts Drops a request body that stalls
- view/upload.tsx The upload page
- shared/ Rules and types shared by the server and the page client
+ view/upload.tsx The upload page, in the look of Immich's upload UI
+ client/upload.ts The page client: queue, XHR uploads with retry, the upload panel
+ shared/ Rules, types and icons shared by the server and the page client
tests/ Vitest unit tests for the upload app
docs/ User docs site (VitePress); docs/README.md explains its structure
Dockerfile Multi-stage build; IPP runs from /app as the non-root `node` user
diff --git a/app/public/style.css b/app/public/style.css
index 5e3874c..dabb922 100644
--- a/app/public/style.css
+++ b/app/public/style.css
@@ -1,17 +1,4 @@
-/* Theme tokens, the Inter font and the page base come from @ipp/core's theme.css */
-
-:root {
- /* Horizontal inset for textual page content (title, description, group
- headers). The grid itself goes edge-to-edge on mobile so it doesn't use
- this value. */
- --gutter: 32px;
-}
-
-@media (max-width: 640px) {
- :root {
- --gutter: 8px;
- }
-}
+/* Theme tokens, the Inter font, the page base and the page header come from @ipp/core's theme.css */
/* ===== Justified-rows / square-grid gallery (tiles are absolute-positioned by JS) ===== */
@@ -193,62 +180,6 @@
height: 100%;
}
-/* ===== Header (title + asset count + download action) ===== */
-
-#header {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: 16px;
- padding: 28px var(--gutter) 12px;
- color: var(--color-fg);
-}
-
-.header-text {
- flex: 1 1 auto;
- min-width: 0;
-}
-
-#header h1 {
- margin: 0;
- font-size: 28px;
- font-weight: 500;
- line-height: 1.2;
- letter-spacing: -0.01em;
- overflow-wrap: break-word;
-}
-
-#header .subtitle {
- margin: 4px 0 0;
- font-size: 14px;
- font-weight: 400;
- opacity: 0.55;
-}
-
-#download-all {
- flex: 0 0 auto;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- width: 44px;
- height: 44px;
- border-radius: 50%;
- text-decoration: none;
- color: var(--color-fg);
- transition: background-color 0.15s;
-}
-
-#download-all:hover,
-#download-all:focus-visible {
- background-color: color-mix(in srgb, var(--color-fg) 10%, transparent);
- outline: none;
-}
-
-#download-all svg {
- width: 22px;
- height: 22px;
-}
-
#album-description {
margin: 0;
padding: 0 var(--gutter) 16px;
@@ -260,13 +191,6 @@
}
@media (max-width: 640px) {
- #header {
- padding-top: 16px;
- padding-bottom: 8px;
- }
- #header h1 {
- font-size: 22px;
- }
#album-description {
padding-bottom: 12px;
font-size: 14px;
diff --git a/app/src/view/gallery.tsx b/app/src/view/gallery.tsx
index 5ae39d5..7497e26 100644
--- a/app/src/view/gallery.tsx
+++ b/app/src/view/gallery.tsx
@@ -84,7 +84,7 @@ export function Gallery (props: GalleryProps) {
)}
{props.showDownloadZip && (
-
+