From 6f575d32480b245dc13025149c4e7db7497aae72 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 21 Apr 2026 19:50:41 +0000 Subject: [PATCH 1/2] Add LinkedIn-style profile picture adjustment (zoom + pan) Uploading or re-opening a profile picture now opens a circular cropper (Cropper.js via CDN) with drag-to-reposition and a zoom slider. The original upload stays untouched on disk; only normalized crop metadata is stored in a new profile.picture_crop column and applied on render via CSS object-position + transform: scale(). A new "Adjust" button in the profile modal lets users re-frame the saved picture at any time without re-uploading. New PUT /api/profile/picture/crop endpoint (clamps values server-side); uploading/selecting/removing a picture resets the crop. Crop propagation mirrors the existing picture_propagate semantics: ON writes into every dataset, OFF into language siblings only. Seven new i18n keys translated across all 8 locales. Bump to 1.47.0. --- CHANGELOG.md | 5 + package-lock.json | 4 +- package.json | 2 +- public/index.html | 28 +++++ public/shared/admin.css | 58 ++++++++++ public/shared/admin.js | 222 +++++++++++++++++++++++++++++++++++-- public/shared/i18n/de.json | 7 ++ public/shared/i18n/en.json | 7 ++ public/shared/i18n/es.json | 7 ++ public/shared/i18n/fr.json | 7 ++ public/shared/i18n/it.json | 7 ++ public/shared/i18n/nl.json | 7 ++ public/shared/i18n/pt.json | 7 ++ public/shared/i18n/zh.json | 7 ++ public/shared/scripts.js | 34 ++++++ src/server.js | 141 ++++++++++++++++++++--- tests/backend.test.js | 176 +++++++++++++++++++++++++++++ tests/frontend.test.js | 76 +++++++++++++ version.json | 2 +- 19 files changed, 778 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9da3084..23f96950 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to CV Manager will be documented in this file. Format follows [Keep a Changelog](https://keepachangelog.com/), versioning follows [Semantic Versioning](https://semver.org/). +## [1.47.0] - 2026-04-21 + +### Added +- **LinkedIn-style profile-picture adjustment (zoom + pan).** Uploading or re-opening a profile picture now opens a circular cropper (powered by [Cropper.js](https://github.com/fengyuanchen/cropperjs), loaded via CDN) with a drag-to-reposition stage and a zoom slider (1× to 4×). The original upload is preserved untouched on disk; only normalized crop metadata (`offsetX`, `offsetY`, `zoom`) is stored, applied on every render via CSS `object-position` + `transform: scale()`, and honoured by both the admin page and the public read-only page. A new **Adjust** button in the profile modal lets users re-frame the saved picture at any time without re-uploading. New `picture_crop TEXT` column on `profile` with auto-migration; new `PUT /api/profile/picture/crop` endpoint (values are clamped server-side); uploading, selecting, or removing a picture resets the crop to defaults. Crop propagation follows the existing `picture_propagate` flag semantics: ON mirrors into every dataset snapshot, OFF mirrors only into language siblings of the active dataset, exactly mirroring how the filename already propagates. Seven new i18n keys (`form.adjust_picture`, `form.adjust_hint`, `form.zoom`, `modal.adjust_picture`, `btn.reset_crop`, `toast.crop_saved`, `toast.no_picture`) translated across all 8 supported locales. Existing installs render exactly as before because the default crop `{offsetX:0, offsetY:0, zoom:1}` is visually identical to today's centered `object-fit: cover` baseline. + ## [1.46.0] - 2026-04-21 ### Added diff --git a/package-lock.json b/package-lock.json index 3b604c00..2c2f5707 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cv-manager", - "version": "1.46.0", + "version": "1.47.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cv-manager", - "version": "1.46.0", + "version": "1.47.0", "dependencies": { "archiver": "^7.0.1", "better-sqlite3": "^9.4.3", diff --git a/package.json b/package.json index 4365d6cc..4fa38661 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cv-manager", - "version": "1.46.0", + "version": "1.47.0", "description": "Professional CV Management System", "main": "src/server.js", "scripts": { diff --git a/public/index.html b/public/index.html index e347dc70..c01c3a44 100644 --- a/public/index.html +++ b/public/index.html @@ -12,6 +12,9 @@ + + + @@ -500,6 +503,31 @@

Featured Projects

+ + +