added user registration and login
This commit is contained in:
@@ -10,6 +10,23 @@
|
||||
<div class="container py-5">
|
||||
<h1 class="text-center mb-4">Dashboard</h1>
|
||||
|
||||
<!-- Sign Out Button -->
|
||||
<div class="text-end mb-4">
|
||||
<a href="{{ url_for('logout') }}" class="btn btn-danger">Sign Out</a>
|
||||
</div>
|
||||
|
||||
<!-- Users Management Section -->
|
||||
{% if current_user.role == 'admin' %}
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-info text-white">
|
||||
<h2>Users Management</h2>
|
||||
</div>
|
||||
<div class="card-body text-center">
|
||||
<a href="{{ url_for('admin') }}" class="btn btn-info btn-lg">Manage Users</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Players Section -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-primary text-white">
|
||||
@@ -18,8 +35,6 @@
|
||||
<div class="card-body">
|
||||
<ul class="list-group">
|
||||
{% for player in players %}
|
||||
<!-- ...existing code... -->
|
||||
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<strong>{{ player.username }}</strong> ({{ player.ip }})
|
||||
@@ -27,18 +42,20 @@
|
||||
<div>
|
||||
<a href="{{ url_for('player_page', player_id=player.id) }}" class="btn btn-sm btn-secondary">View Schedule</a>
|
||||
<a href="{{ url_for('player_fullscreen', player_id=player.id) }}" class="btn btn-sm btn-primary">Full Screen</a>
|
||||
{% if current_user.role == 'admin' %}
|
||||
<form action="{{ url_for('delete_player', player_id=player.id) }}" method="post" style="display:inline;">
|
||||
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure you want to delete this player?');">Delete</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<!-- ...existing code... -->
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if current_user.role == 'admin' %}
|
||||
<div class="mt-3">
|
||||
<a href="{{ url_for('add_player') }}" class="btn btn-success">Add Player</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -55,9 +72,11 @@
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if current_user.role == 'admin' %}
|
||||
<div class="mt-3">
|
||||
<a href="{{ url_for('add_group') }}" class="btn btn-primary">Add Group</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user