diff --git a/.env.example b/.env.example index 29c036c..876a95b 100644 --- a/.env.example +++ b/.env.example @@ -7,7 +7,7 @@ TZ=UTC # Copy this file to .env and customize # Image version to run (set by build.sh, or use 'latest') -JAMA_VERSION=0.7.7 +JAMA_VERSION=0.7.8 # Default admin credentials (used on FIRST RUN only) ADMIN_NAME=Admin User diff --git a/backend/package.json b/backend/package.json index 55bf090..946c1d0 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "jama-backend", - "version": "0.7.7", + "version": "0.7.8", "description": "TeamChat backend server", "main": "src/index.js", "scripts": { diff --git a/build.sh b/build.sh index ce7bbd3..43d53e0 100644 --- a/build.sh +++ b/build.sh @@ -13,7 +13,7 @@ # ───────────────────────────────────────────────────────────── set -euo pipefail -VERSION="${1:-0.7.7}" +VERSION="${1:-0.7.8}" ACTION="${2:-}" REGISTRY="${REGISTRY:-}" IMAGE_NAME="jama" diff --git a/frontend/package.json b/frontend/package.json index 1783964..4864008 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "jama-frontend", - "version": "0.7.7", + "version": "0.7.8", "private": true, "scripts": { "dev": "vite", diff --git a/frontend/src/components/Message.css b/frontend/src/components/Message.css index 1f43a28..1cbaa93 100644 --- a/frontend/src/components/Message.css +++ b/frontend/src/components/Message.css @@ -334,72 +334,46 @@ user-select: text; } -/* Triple-dot pin button wrapper */ -.msg-pin-wrap { - position: relative; +/* Pinned state highlight for toolbar pin button */ +.action-pinned { + color: var(--primary) !important; +} + +/* Mobile bottom-sheet overlay for long-press / right-click pin */ +.msg-sheet-overlay { + position: fixed; + inset: 0; + z-index: 500; + background: rgba(0,0,0,0.35); display: flex; - align-items: center; - align-self: flex-end; - margin-bottom: 2px; + align-items: flex-end; + justify-content: center; } -.msg-pin-btn { - opacity: 0; - transition: opacity 0.15s; - color: var(--text-tertiary); - padding: 2px 4px; - border-radius: 4px; -} - -.msg-pin-btn:hover, -.msg-pin-btn.active { - opacity: 1 !important; - color: var(--text-primary); - background: var(--surface-variant); -} - -/* Show pin button on message row hover */ -.msg-bubble-wrap:hover .msg-pin-btn, -.msg-pin-btn.active { - opacity: 1; -} - -/* On touch devices always show it so users know it's there */ -@media (hover: none) { - .msg-pin-btn { - opacity: 0.45; - } -} - -/* Message pin/options popup menu */ -.msg-options-menu { - position: absolute; - z-index: 200; +.msg-sheet { background: var(--surface); - border: 1px solid var(--border); - border-radius: var(--radius); - box-shadow: var(--shadow-md); - padding: 4px 0; - min-width: 170px; - bottom: calc(100% + 4px); - white-space: nowrap; + border-radius: 16px 16px 0 0; + padding: 8px 0 max(16px, env(safe-area-inset-bottom)) 0; + width: 100%; + max-width: 480px; + box-shadow: 0 -4px 24px rgba(0,0,0,0.18); } -.msg-options-menu.options-left { - right: 0; +.msg-sheet-handle { + width: 36px; + height: 4px; + border-radius: 2px; + background: var(--border); + margin: 0 auto 12px; } -.msg-options-menu.options-right { - left: 0; -} - -.msg-options-menu button { +.msg-sheet-btn { display: flex; align-items: center; - gap: 8px; + gap: 14px; width: 100%; - padding: 8px 14px; - font-size: 13px; + padding: 14px 24px; + font-size: 15px; color: var(--text-primary); background: none; border: none; @@ -408,11 +382,20 @@ transition: background var(--transition); } -.msg-options-menu button:hover:not(:disabled) { +.msg-sheet-btn:hover:not(:disabled) { background: var(--surface-variant); } -.msg-options-menu button:disabled { +.msg-sheet-btn:disabled { opacity: 0.45; cursor: not-allowed; } + +.msg-sheet-cancel { + color: var(--text-secondary); + font-weight: 500; + border-top: 1px solid var(--border); + margin-top: 4px; + justify-content: center; + gap: 0; +} diff --git a/frontend/src/components/Message.jsx b/frontend/src/components/Message.jsx index f43891e..87b3534 100644 --- a/frontend/src/components/Message.jsx +++ b/frontend/src/components/Message.jsx @@ -216,6 +216,7 @@ export default function Message({ message: msg, prevMessage, currentUser, onRepl onTouchStart={handleTouchStart} onTouchEnd={handleTouchEnd} onTouchMove={handleTouchEnd} + onContextMenu={isDirect ? (e => { e.preventDefault(); setShowOptionsMenu(true); }) : undefined} > {/* Actions toolbar — floats above the bubble, aligned to correct side */} {!isDeleted && (showActions || showEmojiPicker) && ( @@ -239,6 +240,16 @@ export default function Message({ message: msg, prevMessage, currentUser, onRepl )} + {isDirect && ( + + )} {/* Emoji picker anchored to the toolbar */} {showEmojiPicker && (
{formatTime(msg.created_at)} - {/* Triple-dot pin button — sits outside the hover toolbar so mouse-leave doesn't race */} - {isDirect && ( -
- - {showOptionsMenu && ( -
e.stopPropagation()} - > - {isPinned ? ( - - ) : ( - - )} -
- )} +
+ {isPinned ? ( + + ) : ( + + )} + +
)}