v0.6.4 fixed help.md display
This commit is contained in:
@@ -7,7 +7,7 @@ TZ=UTC
|
|||||||
# Copy this file to .env and customize
|
# Copy this file to .env and customize
|
||||||
|
|
||||||
# Image version to run (set by build.sh, or use 'latest')
|
# Image version to run (set by build.sh, or use 'latest')
|
||||||
JAMA_VERSION=0.6.3
|
JAMA_VERSION=0.6.4
|
||||||
|
|
||||||
# Default admin credentials (used on FIRST RUN only)
|
# Default admin credentials (used on FIRST RUN only)
|
||||||
ADMIN_NAME=Admin User
|
ADMIN_NAME=Admin User
|
||||||
|
|||||||
@@ -42,8 +42,6 @@ COPY --from=builder /app/frontend/dist ./public
|
|||||||
# Create data and uploads directories
|
# Create data and uploads directories
|
||||||
RUN mkdir -p /app/data /app/uploads/avatars /app/uploads/logos /app/uploads/images
|
RUN mkdir -p /app/data /app/uploads/avatars /app/uploads/logos /app/uploads/images
|
||||||
|
|
||||||
# Copy default help.md (can be overridden by mounting /app/data/help.md)
|
|
||||||
COPY data/help.md /app/data/help.md
|
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jama-backend",
|
"name": "jama-backend",
|
||||||
"version": "0.6.3",
|
"version": "0.6.4",
|
||||||
"description": "TeamChat backend server",
|
"description": "TeamChat backend server",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
105
backend/src/data/help.md
Normal file
105
backend/src/data/help.md
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
# Getting Started with Jama
|
||||||
|
|
||||||
|
Welcome to **Jama** — your private, self-hosted team messaging app.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Navigating Jama
|
||||||
|
|
||||||
|
### Message List (Left Sidebar)
|
||||||
|
The sidebar shows all your message groups and direct conversations. Tap or click any group to open it.
|
||||||
|
|
||||||
|
- **#** prefix indicates a **Public** group — visible to all users
|
||||||
|
- **Lock** icon indicates a **Private** group — invite only
|
||||||
|
- **Bold** group names have unread messages
|
||||||
|
- The last message preview shows **You:** if you sent it
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Sending Messages
|
||||||
|
|
||||||
|
Type your message in the input box at the bottom and press **Enter** to send.
|
||||||
|
|
||||||
|
- **Shift + Enter** adds a new line without sending
|
||||||
|
- Tap the **+** button to attach a photo or emoji
|
||||||
|
- Use the **camera** icon to take a photo directly (mobile)
|
||||||
|
|
||||||
|
### Mentioning Someone
|
||||||
|
Type **@** followed by the person's name to mention them. Select from the dropdown that appears. Mentioned users receive a notification.
|
||||||
|
|
||||||
|
Example: `@[John Smith]` will notify John.
|
||||||
|
|
||||||
|
### Replying to a Message
|
||||||
|
Hover over any message and click the **reply arrow** to quote and reply to it.
|
||||||
|
|
||||||
|
### Reacting to a Message
|
||||||
|
Hover over any message and click the **emoji** button to react with an emoji.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Direct Messages
|
||||||
|
|
||||||
|
To start a private conversation with one person:
|
||||||
|
|
||||||
|
1. Click the **pencil / new chat** icon in the sidebar
|
||||||
|
2. Select one user from the list
|
||||||
|
3. Click **Start Conversation**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Group Messages
|
||||||
|
|
||||||
|
To create a group conversation:
|
||||||
|
|
||||||
|
1. Click the **pencil / new chat** icon
|
||||||
|
2. Select two or more users
|
||||||
|
3. Enter a **Group Name**
|
||||||
|
4. Click **Create**
|
||||||
|
|
||||||
|
> If a group with the exact same members already exists, you will be redirected to it automatically.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Your Profile
|
||||||
|
|
||||||
|
Click your name or avatar at the bottom of the sidebar to:
|
||||||
|
|
||||||
|
- Update your **display name** (shown to others instead of your username)
|
||||||
|
- Add an **about me** note
|
||||||
|
- Upload a **profile photo**
|
||||||
|
- Change your **password**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Customising Group Names
|
||||||
|
|
||||||
|
You can set a personal display name for any group that only you will see:
|
||||||
|
|
||||||
|
1. Open the group
|
||||||
|
2. Click the **ⓘ info** icon in the top bar
|
||||||
|
3. Enter your custom name under **Your custom name**
|
||||||
|
4. Click **Save**
|
||||||
|
|
||||||
|
Other members still see the original group name.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
|
||||||
|
Admins can access **Settings** from the user menu to configure:
|
||||||
|
|
||||||
|
- App name and logo
|
||||||
|
- Default user password
|
||||||
|
- Notification preferences
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
|
||||||
|
- 🌙 Toggle **dark mode** from the user menu
|
||||||
|
- 🔔 Enable **push notifications** when prompted to receive alerts when the app is closed
|
||||||
|
- 📱 Install Jama as a **PWA** on your device — tap *Add to Home Screen* in your browser menu for an app-like experience
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*This help file can be updated by your administrator at any time.*
|
||||||
@@ -5,13 +5,14 @@ const path = require('path');
|
|||||||
const { getDb } = require('../models/db');
|
const { getDb } = require('../models/db');
|
||||||
const { authMiddleware } = require('../middleware/auth');
|
const { authMiddleware } = require('../middleware/auth');
|
||||||
|
|
||||||
const HELP_FILE = '/app/data/help.md';
|
// help.md lives inside the backend source tree — NOT in /app/data which is
|
||||||
const HELP_FALLBACK = path.join(__dirname, '../../data/help.md');
|
// volume-mounted and would hide files baked into the image at build time.
|
||||||
|
const HELP_FILE = path.join(__dirname, '../data/help.md');
|
||||||
|
|
||||||
// GET /api/help — returns markdown content
|
// GET /api/help — returns markdown content
|
||||||
router.get('/', authMiddleware, (req, res) => {
|
router.get('/', authMiddleware, (req, res) => {
|
||||||
let content = '';
|
let content = '';
|
||||||
const filePath = fs.existsSync(HELP_FILE) ? HELP_FILE : HELP_FALLBACK;
|
const filePath = HELP_FILE;
|
||||||
try {
|
try {
|
||||||
content = fs.readFileSync(filePath, 'utf8');
|
content = fs.readFileSync(filePath, 'utf8');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
2
build.sh
2
build.sh
@@ -13,7 +13,7 @@
|
|||||||
# ─────────────────────────────────────────────────────────────
|
# ─────────────────────────────────────────────────────────────
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
VERSION="${1:-0.6.3}"
|
VERSION="${1:-0.6.4}"
|
||||||
ACTION="${2:-}"
|
ACTION="${2:-}"
|
||||||
REGISTRY="${REGISTRY:-}"
|
REGISTRY="${REGISTRY:-}"
|
||||||
IMAGE_NAME="jama"
|
IMAGE_NAME="jama"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jama-frontend",
|
"name": "jama-frontend",
|
||||||
"version": "0.6.3",
|
"version": "0.6.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
Reference in New Issue
Block a user