81a93a489b
Backend — Photos timeline now groups by real capture date instead of upload time. New MediaMetadataService (FileLifecycleHook) extracts EXIF DateTimeOriginal from images and container creation_time from videos (mov/mp4/mkv) via nom-exif, timezone-correct (OffsetTimeOriginal), persisting captured_at so the existing media_sort_date trigger takes over. Adds POST /admin/photos/metadata/reextract to backfill existing media. Falls back to upload date when no embedded date exists. Frontend — premium grid cards: combined metadata line (relative date · size, owner avatar when shared), custom selection checkbox with a clear checked state, uniform full-width 4:3 thumbnail tiles independent of filename length, centered file-type icons, and a hit-test fix so checkbox/star/kebab clicks reach the controls (the decorative thumbnail no longer captures pointer events). Notification messages internationalised across all 16 locales. Broader polish: design tokens, a11y/focus-visible states, brand + PWA assets. Chore — bump semver-compatible dependencies (cargo upgrade); add nom-exif 3.6.1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
125 lines
3.1 KiB
Makefile
125 lines
3.1 KiB
Makefile
set dotenv-load
|
|
|
|
default:
|
|
@just --list
|
|
|
|
build:
|
|
cargo build
|
|
|
|
release:
|
|
cargo build --release
|
|
# check that app is clean
|
|
node --check static-dist/js/app.*.js
|
|
|
|
run:
|
|
cargo run
|
|
|
|
run-debug:
|
|
RUST_LOG=debug cargo run
|
|
|
|
test:
|
|
cargo test --workspace
|
|
|
|
test-mocks:
|
|
cargo test --features test_utils
|
|
|
|
# DB-dependent integration tests gated on `--cfg integration_tests`.
|
|
# Spins up the test postgres on port 5433 first. Requires one row in
|
|
# auth.users on the test DB (start the server against it once to seed).
|
|
#
|
|
# IMPORTANT: DATABASE_URL is pinned to the test container on port 5433
|
|
# so a stray DATABASE_URL in `.env` (which `set dotenv-load` at the top
|
|
# of this file would otherwise leak in) cannot point the tests at the
|
|
# real dev DB. The test pool helpers also refuse non-`oxicloud_test`
|
|
# URLs as defence in depth.
|
|
test-integration:
|
|
bash tests/common/spawn-db.sh
|
|
PGHOST=localhost PGPORT=5433 PGUSER=oxicloud_test PGPASSWORD=oxicloud_test \
|
|
PGDATABASE=oxicloud_test \
|
|
bash tests/common/init-test-schema.sh
|
|
DATABASE_URL='postgres://oxicloud_test:oxicloud_test@localhost:5433/oxicloud_test' \
|
|
RUSTFLAGS='--cfg integration_tests' \
|
|
cargo test --workspace --tests
|
|
|
|
test-one name:
|
|
cargo test {{name}}
|
|
|
|
fmt:
|
|
cargo fmt --all
|
|
|
|
fmt-check:
|
|
cargo fmt --all --check
|
|
|
|
lint:
|
|
cargo clippy --all-features --all-targets -- -D warnings
|
|
|
|
check:
|
|
cargo fmt --all
|
|
cargo clippy --all-features --all-targets -- -D warnings
|
|
|
|
# Frontend design-system / a11y guardrails — pure Node, no extra deps.
|
|
# Single gate: WCAG contrast, heading order, locale completeness, dead tokens,
|
|
# brand-mark drift.
|
|
# (Also run `stylelint static/css/**/*.css`, `biome check`, `tsc -p jsconfig.json
|
|
# --noEmit` once node_modules is installed — those need devDependencies.)
|
|
frontend-check:
|
|
node scripts/check-contrast.mjs
|
|
node scripts/check-headings.mjs
|
|
node scripts/check-locales.mjs
|
|
node scripts/check-dead-tokens.mjs
|
|
node scripts/check-brand-drift.mjs
|
|
|
|
# audit security (condition: cargo install cargo-audit)
|
|
audit:
|
|
cargo audit
|
|
|
|
openapi:
|
|
cargo run --bin generate-openapi
|
|
|
|
db:
|
|
docker compose up -d postgres
|
|
|
|
db-down:
|
|
docker compose down
|
|
|
|
# start OxiCloud with static assets in no-cache mode
|
|
front-dev:
|
|
PROFILE=dev cargo run
|
|
|
|
# front: check all (linter, format, type, icons, translations...)
|
|
front-check: front-fmt front-lint front-type front-rules front-check-icons front-check-i18n
|
|
|
|
front-fmt:
|
|
biome format static/
|
|
|
|
front-lint:
|
|
biome lint static/
|
|
|
|
# test types (JSDOC), using typescript
|
|
front-type:
|
|
tsc -p jsconfig.json --noEmit
|
|
|
|
# check CSS rules
|
|
front-rules:
|
|
stylelint static/css/
|
|
|
|
front-check-icons:
|
|
tools/check-icons.py --check-only
|
|
|
|
front-check-i18n:
|
|
tools/check-missing-translations.py --check-only
|
|
|
|
|
|
# end-to-end Playwright tests
|
|
front-test:
|
|
cd tests/e2e && npm test
|
|
|
|
# update images snapshots
|
|
front-test-update-snapshot:
|
|
cd tests/e2e && npm test -- --update-snapshots=all
|
|
|
|
# Hurl API functional tests (starts postgres + server, tears down after)
|
|
api-test:
|
|
bash tests/api/run.sh
|
|
bash tests/webdav/run.sh
|