From 010ef22f6263c2e74475ff66747442ccaf364b6d Mon Sep 17 00:00:00 2001 From: spark Date: Fri, 6 Nov 2026 21:48:45 +0000 Subject: [PATCH] feat(library): put colour and selection where the cull happens The chips and the right-click menu did not show how to mark or filter, and a short drag list was uploaded as if it were the whole drop. --- apps/app/src/i18n.ts | 3 + apps/app/src/library/FilterBar.tsx | 13 ++++- apps/app/src/library/Grid.tsx | 2 +- apps/app/src/library/LibraryMenus.tsx | 4 ++ apps/app/src/library/PhotoContextMenu.tsx | 48 +++++++++++++++- apps/app/src/library/SelectionBar.tsx | 54 ++++++++++++++++++ apps/app/src/pages/LibraryPage.tsx | 65 ++++++++++++++-------- infra/deploy-receiver/src/receiver.test.ts | 4 ++ infra/deploy-receiver/src/webhook.ts | 2 + 9 files changed, 168 insertions(+), 27 deletions(-) create mode 100644 apps/app/src/library/SelectionBar.tsx diff --git a/apps/app/src/i18n.ts b/apps/app/src/i18n.ts index 6d8f73b..5d1dc60 100644 --- a/apps/app/src/i18n.ts +++ b/apps/app/src/i18n.ts @@ -105,6 +105,9 @@ export const t = { colorWithout: (name: string) => `Sem ${name.toLowerCase()}`, colorUncolored: "Só sem cor", colorNone: "Sem cor", + menuSelectColor: (name: string) => `Selecionar ${name.toLowerCase()}`, + dropPartial: "O arrasto não trouxe o lote todo. Escolhe as fotografias aqui.", + dropChoose: "Escolher fotografias", menuSelection: "Seleção", menuSelectAll: "Selecionar todas", menuSelectNone: "Limpar seleção", diff --git a/apps/app/src/library/FilterBar.tsx b/apps/app/src/library/FilterBar.tsx index f78d799..355aebf 100644 --- a/apps/app/src/library/FilterBar.tsx +++ b/apps/app/src/library/FilterBar.tsx @@ -50,7 +50,7 @@ export function FilterBar(props: { filter: LibraryFilter; onChange: (f: LibraryF aria-pressed={on} aria-label={hiding ? t.colorWithout(t.colors[c]) : on ? t.colorOnly(t.colors[c]) : t.colors[c]} title={hiding ? t.colorWithout(t.colors[c]) : on ? t.colorOnly(t.colors[c]) : t.colors[c]} - className={`relative h-3 w-3 rounded-[2px] ${on ? "outline outline-1 outline-offset-1 outline-white" : "opacity-60 hover:opacity-100"}`} + className={`relative h-5 w-6 rounded-[2px] ${on ? "outline outline-2 outline-offset-1 outline-white" : "opacity-80 hover:opacity-100"}`} style={{ background: LABEL_COLOR[c] ?? undefined }} > {hiding &&