mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-07-02 16:01:24 +02:00
f8ef1ac297
Major documentation update with new data structure: Breaking Changes: - Data storage moved from host directories to ./data/ inside project - MC_CONFIG_DIR default changed: /root/.config/meshcore → ./data/meshcore - MC_ARCHIVE_DIR default changed: /mnt/archive/meshcore → ./data/archive - Requires migration for existing installations (see MIGRATION.md) Documentation: - Add MIGRATION.md - step-by-step guide for existing users - Add FRESH_INSTALL.md - complete installation guide for new users - Update README.md - new Configuration section with ./data/ structure - Update .env.example - placeholders instead of real values, new defaults - Update .claude/CLAUDE.md - updated environment variables documentation - Change serial device detection from 'ls -l' to 'ls' (cleaner output) Code Cleanup: - Remove deprecated MC_REFRESH_INTERVAL variable (unused since intelligent refresh) - Remove MC_REFRESH_INTERVAL from app/config.py - Remove refresh_interval from app/routes/views.py (5 functions) - Remove refresh_interval from app/routes/api.py - Remove refreshInterval from app/templates/index.html - Remove refreshInterval from app/templates/dm.html - Remove MC_REFRESH_INTERVAL from docker-compose.yml Configuration: - Update .gitignore - exclude data/ and docs/github-discussion-*.md - Serial port: use /dev/serial/by-id/[YOUR_DEVICE_ID] placeholder - Device name: use [YOUR_DEVICE_NAME] placeholder Benefits: - All project data in one location (easier backups) - Better portability (no host dependencies) - Cleaner codebase (removed unused variables) - Comprehensive documentation for migration and fresh install 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
81 lines
1.7 KiB
Python
81 lines
1.7 KiB
Python
"""
|
|
HTML views for mc-webui
|
|
"""
|
|
|
|
import logging
|
|
from flask import Blueprint, render_template, request
|
|
from app.config import config
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
views_bp = Blueprint('views', __name__)
|
|
|
|
|
|
@views_bp.route('/')
|
|
def index():
|
|
"""
|
|
Main chat view - displays message list and send form.
|
|
"""
|
|
return render_template(
|
|
'index.html',
|
|
device_name=config.MC_DEVICE_NAME
|
|
)
|
|
|
|
|
|
@views_bp.route('/dm')
|
|
def direct_messages():
|
|
"""
|
|
Direct Messages view - full-page DM interface.
|
|
|
|
Query params:
|
|
conversation: Optional conversation ID to open initially
|
|
"""
|
|
initial_conversation = request.args.get('conversation', '')
|
|
|
|
return render_template(
|
|
'dm.html',
|
|
device_name=config.MC_DEVICE_NAME,
|
|
initial_conversation=initial_conversation
|
|
)
|
|
|
|
|
|
@views_bp.route('/contacts/manage')
|
|
def contact_management():
|
|
"""
|
|
Contact Management Settings - manual approval + cleanup + navigation.
|
|
"""
|
|
return render_template(
|
|
'contacts-manage.html',
|
|
device_name=config.MC_DEVICE_NAME
|
|
)
|
|
|
|
|
|
@views_bp.route('/contacts/pending')
|
|
def contact_pending_list():
|
|
"""
|
|
Full-screen pending contacts list.
|
|
"""
|
|
return render_template(
|
|
'contacts-pending.html',
|
|
device_name=config.MC_DEVICE_NAME
|
|
)
|
|
|
|
|
|
@views_bp.route('/contacts/existing')
|
|
def contact_existing_list():
|
|
"""
|
|
Full-screen existing contacts list with search, filter, sort.
|
|
"""
|
|
return render_template(
|
|
'contacts-existing.html',
|
|
device_name=config.MC_DEVICE_NAME
|
|
)
|
|
|
|
|
|
@views_bp.route('/health')
|
|
def health():
|
|
"""
|
|
Health check endpoint for monitoring.
|
|
"""
|
|
return 'OK', 200
|