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:
@@ -23,7 +23,9 @@ def create_app(config_name=None):
|
||||
Returns:
|
||||
Flask application instance
|
||||
"""
|
||||
app = Flask(__name__)
|
||||
# Set instance path to absolute path
|
||||
instance_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'instance'))
|
||||
app = Flask(__name__, instance_path=instance_path, instance_relative_config=True)
|
||||
|
||||
# Load configuration
|
||||
if config_name == 'production':
|
||||
@@ -129,7 +131,7 @@ def register_commands(app):
|
||||
@click.option('--password', prompt=True, hide_input=True, help='Admin password')
|
||||
def create_admin(username, password):
|
||||
"""Create an admin user"""
|
||||
from models.user import User
|
||||
from app.models.user import User
|
||||
|
||||
# Check if user exists
|
||||
if User.query.filter_by(username=username).first():
|
||||
|
||||
Reference in New Issue
Block a user