diff --git a/.env.example b/.env.example index 69cef98..a9af81f 100644 --- a/.env.example +++ b/.env.example @@ -10,7 +10,7 @@ PROJECT_NAME=jama # Image version to run (set by build.sh, or use 'latest') -JAMA_VERSION=0.9.16 +JAMA_VERSION=0.9.17 # App port — the host port Docker maps to the container PORT=3000 diff --git a/backend/package.json b/backend/package.json index b897f61..07c237b 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "jama-backend", - "version": "0.9.16", + "version": "0.9.17", "description": "TeamChat backend server", "main": "src/index.js", "scripts": { diff --git a/build.sh b/build.sh index 3a0ba63..904ca8b 100644 --- a/build.sh +++ b/build.sh @@ -13,7 +13,7 @@ # ───────────────────────────────────────────────────────────── set -euo pipefail -VERSION="${1:-0.9.16}" +VERSION="${1:-0.9.17}" ACTION="${2:-}" REGISTRY="${REGISTRY:-}" IMAGE_NAME="jama" diff --git a/frontend/package.json b/frontend/package.json index e322eb5..9184c83 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "jama-frontend", - "version": "0.9.16", + "version": "0.9.17", "private": true, "scripts": { "dev": "vite", diff --git a/frontend/src/components/BrandingModal.jsx b/frontend/src/components/BrandingModal.jsx index 97dbee5..f1a48c3 100644 --- a/frontend/src/components/BrandingModal.jsx +++ b/frontend/src/components/BrandingModal.jsx @@ -7,28 +7,33 @@ const DEFAULT_PUBLIC_COLOR = '#1a73e8'; const DEFAULT_DM_COLOR = '#a142f4'; const COLOUR_SUGGESTIONS = [ - '#1a73e8','#a142f4','#e53935','#34a853','#fa7b17', - '#00897b','#e91e8c','#0097a7','#5c6bc0','#f4511e', - '#616161','#795548','#00acc1','#43a047','#fdd835', + '#1a73e8', '#a142f4', '#e53935', '#fa7b17', '#fdd835', '#34a853', ]; // A single colour picker card: shows suggestions by default, Custom button opens native picker -function ColourPicker({ label, description, value, onChange, preview }) { +function ColourPicker({ label, value, onChange, preview }) { const [mode, setMode] = useState('suggestions'); // 'suggestions' | 'custom' const inputRef = useRef(null); - const handleCustomClick = () => { - setMode('custom'); - // Open native colour picker immediately after switching - setTimeout(() => inputRef.current?.click(), 50); + // Auto-close custom mode as soon as a new colour is committed + const handleCustomChange = (e) => { + onChange(e.target.value); + // 'change' fires on close of native picker on most platforms; + // we also listen to 'input' for live preview but only close on 'change' + }; + + const handleCustomInput = (e) => { + onChange(e.target.value); + }; + + const handleCustomChangeClose = (e) => { + onChange(e.target.value); + setMode('suggestions'); }; return (
{description}
- )} {/* Current colour preview */}