Add dark mode support and replace group assignment with playlist assignment

- Added comprehensive dark mode styling to all pages:
  * Dashboard (workflow guide, secondary text, log items)
  * Admin panel with user management system
  * Content/playlist management page
  * Upload media page
  * Add player page

- Implemented user management system:
  * Create/edit/delete users
  * Two role types (user/admin)
  * Reset password functionality
  * Role-based permissions

- Replaced group assignment with playlist assignment:
  * Players now directly assigned to playlists
  * Updated add player form and backend
  * Removed group selection from player creation

- Fixed bugs:
  * Updated instance_path configuration for SQLite
  * Fixed import path in app factory
  * Updated dependencies (Pillow 11.0.0, removed gevent)

- Added start.sh script for easy development server launch
This commit is contained in:
DigiServer Developer
2025-11-14 22:16:52 +02:00
parent 498c03ef00
commit 9d4f932a95
13 changed files with 1070 additions and 65 deletions

View File

@@ -43,7 +43,8 @@ def list():
def add_player():
"""Add a new player."""
if request.method == 'GET':
return render_template('players/add_player.html')
playlists = Playlist.query.filter_by(is_active=True).order_by(Playlist.name).all()
return render_template('players/add_player.html', playlists=playlists)
try:
name = request.form.get('name', '').strip()
@@ -52,6 +53,7 @@ def add_player():
password = request.form.get('password', '').strip()
quickconnect_code = request.form.get('quickconnect_code', '').strip()
orientation = request.form.get('orientation', 'Landscape')
playlist_id = request.form.get('playlist_id', '').strip()
# Validation
if not name or len(name) < 3:
@@ -81,7 +83,8 @@ def add_player():
hostname=hostname,
location=location or None,
auth_code=auth_code,
orientation=orientation
orientation=orientation,
playlist_id=int(playlist_id) if playlist_id else None
)
# Set password if provided