Files
digiserver-v2/app/templates/dashboard.html
2025-11-12 16:07:03 +02:00

70 lines
2.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% block title %}Dashboard - DigiServer v2{% endblock %}
{% block content %}
<h1 style="margin-bottom: 2rem;">Dashboard</h1>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 2rem;">
<div class="card">
<h3 style="color: #3498db; margin-bottom: 0.5rem;">👥 Players</h3>
<p style="font-size: 2rem; font-weight: bold;">{{ total_players or 0 }}</p>
<a href="{{ url_for('players.list') }}" class="btn" style="margin-top: 1rem;">View Players</a>
</div>
<div class="card">
<h3 style="color: #9b59b6; margin-bottom: 0.5rem;">📁 Groups</h3>
<p style="font-size: 2rem; font-weight: bold;">{{ total_groups or 0 }}</p>
<a href="{{ url_for('groups.groups_list') }}" class="btn" style="margin-top: 1rem;">View Groups</a>
</div>
<div class="card">
<h3 style="color: #e67e22; margin-bottom: 0.5rem;">🎬 Content</h3>
<p style="font-size: 2rem; font-weight: bold;">{{ total_content or 0 }}</p>
<a href="{{ url_for('content.content_list') }}" class="btn" style="margin-top: 1rem;">View Content</a>
</div>
<div class="card">
<h3 style="color: #27ae60; margin-bottom: 0.5rem;">💾 Storage</h3>
<p style="font-size: 2rem; font-weight: bold;">{{ storage_mb or 0 }} MB</p>
<a href="{{ url_for('content.upload_content') }}" class="btn btn-success" style="margin-top: 1rem;">Upload Content</a>
</div>
</div>
<div class="card">
<h2>Quick Actions</h2>
<div style="display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem;">
<a href="{{ url_for('players.add_player') }}" class="btn btn-success"> Add Player</a>
<a href="{{ url_for('groups.create_group') }}" class="btn btn-success"> Create Group</a>
<a href="{{ url_for('content.upload_content') }}" class="btn btn-success">⬆️ Upload Content</a>
{% if current_user.is_admin %}
<a href="{{ url_for('admin.admin_panel') }}" class="btn">⚙️ Admin Panel</a>
{% endif %}
</div>
</div>
{% if recent_logs %}
<div class="card">
<h2>Recent Activity</h2>
<div style="margin-top: 1rem;">
{% for log in recent_logs %}
<div style="padding: 0.5rem; border-bottom: 1px solid #eee;">
<span style="color: {% if log.level == 'error' %}#e74c3c{% elif log.level == 'warning' %}#f39c12{% else %}#27ae60{% endif %}; font-weight: bold;">
[{{ log.level.upper() }}]
</span>
{{ log.message }}
<small style="color: #7f8c8d; float: right;">{{ log.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}</small>
</div>
{% endfor %}
</div>
</div>
{% endif %}
<div class="card">
<h2>System Status</h2>
<p>✅ All systems operational</p>
<p>🔄 Blueprint architecture active</p>
<p>⚡ Flask {{ config.get('FLASK_VERSION', '3.1.0') }}</p>
</div>
{% endblock %}