modified: templates/edit_giveaway.html

modified:   templates/edit_user.html
	modified:   templates/global_admin_dashboard.html
	modified:   templates/landing.html
	modified:   templates/login.html
	modified:   templates/logs.html
	modified:   templates/navigation.html
	modified:   templates/server_admin_dashboard.html
	modified:   templates/user_dashboard.html
	modified:   templates/user_giveaways.html
	new file:   templates/user_giveaways_old.html
	modified:   templates/user_landing_page.html
This commit is contained in:
SimolZimol
2025-08-18 23:49:22 +02:00
parent 916b5d5131
commit 61f824a8c5
12 changed files with 2870 additions and 325 deletions

View File

@@ -5,100 +5,324 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Server Admin Dashboard</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<style>
.scrollable-table {
max-height: 400px;
overflow-y: auto;
body {
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
min-height: 100vh;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: #e0e0e0;
}
.admin-container {
background: rgba(30, 30, 46, 0.95);
border-radius: 20px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
padding: 2rem;
margin-top: 2rem;
}
.admin-header {
text-align: center;
margin-bottom: 3rem;
}
.admin-title {
color: #f8f9fa;
font-weight: 700;
font-size: 2.5rem;
margin-bottom: 0.5rem;
text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}
.admin-subtitle {
color: #a0a0a0;
font-size: 1.2rem;
font-weight: 400;
}
.admin-card {
background: rgba(45, 55, 72, 0.8);
border-radius: 15px;
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
margin-bottom: 2rem;
}
.admin-card:hover {
transform: translateY(-5px);
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}
.admin-card .card-body {
padding: 2rem;
}
.card-title {
color: #f7fafc;
font-weight: 600;
font-size: 1.5rem;
margin-bottom: 1rem;
}
.card-text {
color: #cbd5e0;
font-size: 1rem;
margin-bottom: 1.5rem;
}
.scrollable-table {
max-height: 500px;
overflow-y: auto;
border-radius: 10px;
background: rgba(40, 40, 56, 0.9);
}
.table {
margin-bottom: 0;
color: #e0e0e0;
}
.table thead th {
background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
color: #f7fafc;
border: none;
padding: 1rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 1px;
font-size: 0.9rem;
position: sticky;
top: 0;
z-index: 10;
}
.table tbody tr {
background: rgba(45, 55, 72, 0.6);
transition: all 0.3s ease;
border: none;
}
.table tbody tr:hover {
background: rgba(74, 85, 104, 0.8);
transform: translateY(-1px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.table tbody td {
padding: 1rem;
vertical-align: middle;
border: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
color: #e0e0e0;
}
.status-badge {
font-size: 0.9rem;
padding: 0.5em;
border-radius: 5px;
padding: 0.5rem 1rem;
border-radius: 25px;
font-weight: 600;
}
.badge-success-custom {
background: linear-gradient(135deg, #48bb78, #38a169);
color: white;
box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}
.badge-warning-custom {
background: linear-gradient(135deg, #ffa500, #ff8c00);
color: white;
box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}
.badge-danger-custom {
background: linear-gradient(135deg, #e53e3e, #c53030);
color: white;
box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}
.admin-btn {
background: linear-gradient(135deg, #4299e1, #3182ce);
border: none;
border-radius: 20px;
padding: 0.5rem 1rem;
color: #ffffff;
font-weight: 600;
text-decoration: none;
font-size: 0.85rem;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}
.admin-btn:hover {
background: linear-gradient(135deg, #3182ce, #2c5282);
color: #ffffff;
text-decoration: none;
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
}
.section-icon {
font-size: 1.3rem;
margin-right: 0.5rem;
}
.giveaway-icon { color: #ffd700; }
.user-icon { color: #4299e1; }
/* Responsive Design */
@media (max-width: 768px) {
.admin-title {
font-size: 2rem;
}
.admin-container {
padding: 1rem;
margin-top: 1rem;
}
.table thead th,
.table tbody td {
padding: 0.75rem 0.5rem;
font-size: 0.9rem;
}
.scrollable-table {
max-height: 400px;
}
}
</style>
</head>
<body>
{% include 'navigation.html' %}
<div class="container mt-5">
<h1 class="text-center">Server Admin Dashboard for {{ guild_name }}</h1>
<p class="text-center text-muted">Manage server-specific settings and data for server <strong>{{ guild_id }}</strong>.</p>
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-lg-12 col-xl-10">
<div class="admin-container">
<div class="admin-header">
<h1 class="admin-title">
<i class="fas fa-cogs"></i> Server Admin Dashboard
</h1>
<p class="admin-subtitle">{{ guild_name }} • Manage server settings and data</p>
</div>
<!-- Giveaway Management Section -->
<div class="card mt-4">
<div class="card-body">
<h5 class="card-title">Giveaway Management</h5>
<p class="card-text">View and manage all active giveaways for this server.</p>
<div class="table-responsive scrollable-table">
<table class="table table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Platform</th>
<th>Winner</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for giveaway in giveaways %}
<tr>
<td>{{ giveaway.name }}</td>
<td>{{ giveaway.platform }}</td>
<td>{{ giveaway.winner_dc_id }}</td>
<td>
{% if giveaway.aktiv %}
<span class="badge badge-success status-badge">Redeemed</span>
{% else %}
<span class="badge badge-warning status-badge">Not Redeemed</span>
{% endif %}
</td>
<td>
<a href="{{ url_for('edit_giveaway', guild_id=guild_id, uuid=giveaway['uuid']) }}" class="btn btn-primary btn-sm">Edit</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
<!-- Giveaway Management Section -->
<div class="admin-card">
<div class="card-body">
<h5 class="card-title">
<i class="fas fa-gift section-icon giveaway-icon"></i>Giveaway Management
</h5>
<p class="card-text">View and manage all active giveaways for this server.</p>
<div class="table-responsive scrollable-table">
<table class="table">
<thead>
<tr>
<th><i class="fas fa-tag"></i> Name</th>
<th><i class="fas fa-gamepad"></i> Platform</th>
<th><i class="fas fa-crown"></i> Winner</th>
<th><i class="fas fa-info-circle"></i> Status</th>
<th><i class="fas fa-cog"></i> Actions</th>
</tr>
</thead>
<tbody>
{% if giveaways %}
{% for giveaway in giveaways %}
<tr>
<td><strong>{{ giveaway.name }}</strong></td>
<td>{{ giveaway.platform }}</td>
<td>{{ giveaway.winner_dc_id or 'Not Assigned' }}</td>
<td>
{% if giveaway.aktiv %}
<span class="badge badge-success-custom status-badge">
<i class="fas fa-check"></i> Redeemed
</span>
{% else %}
<span class="badge badge-warning-custom status-badge">
<i class="fas fa-hourglass-half"></i> Pending
</span>
{% endif %}
</td>
<td>
<a href="{{ url_for('edit_giveaway', guild_id=guild_id, uuid=giveaway['uuid']) }}" class="admin-btn">
<i class="fas fa-edit"></i> Edit
</a>
</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="5" class="text-center" style="color: #a0aec0; padding: 2rem;">
<i class="fas fa-gift" style="font-size: 2rem; margin-bottom: 1rem; display: block;"></i>
No giveaways found for this server.
</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
<!-- User Management Section -->
<div class="card mt-4">
<div class="card-body">
<h5 class="card-title">User Management</h5>
<p class="card-text">Manage server members' data, including points, bans, and permissions.</p>
<div class="table-responsive scrollable-table">
<table class="table table-bordered">
<thead>
<tr>
<th>User ID</th>
<th>Points</th>
<th>Level</th>
<th>Banned</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for user in server_users %}
<tr>
<td>{{ user.user_id }}</td>
<td>{{ user.points }}</td>
<td>{{ user.level }}</td>
<td>
{% if user.ban %}
<span class="badge badge-danger status-badge">Banned</span>
{% else %}
<span class="badge badge-success status-badge">Active</span>
{% endif %}
</td>
<td>
<a href="{{ url_for('edit_user', guild_id=guild_id, user_id=user.user_id) }}" class="btn btn-primary btn-sm">Edit</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<!-- User Management Section -->
<div class="admin-card">
<div class="card-body">
<h5 class="card-title">
<i class="fas fa-users section-icon user-icon"></i>User Management
</h5>
<p class="card-text">Manage server members' data, including points, bans, and permissions.</p>
<div class="table-responsive scrollable-table">
<table class="table">
<thead>
<tr>
<th><i class="fas fa-id-card"></i> User ID</th>
<th><i class="fas fa-coins"></i> Points</th>
<th><i class="fas fa-layer-group"></i> Level</th>
<th><i class="fas fa-ban"></i> Status</th>
<th><i class="fas fa-cog"></i> Actions</th>
</tr>
</thead>
<tbody>
{% if server_users %}
{% for user in server_users %}
<tr>
<td><code>{{ user.user_id }}</code></td>
<td>{{ "{:,}".format(user.points) }}</td>
<td>{{ user.level }}</td>
<td>
{% if user.ban %}
<span class="badge badge-danger-custom status-badge">
<i class="fas fa-ban"></i> Banned
</span>
{% else %}
<span class="badge badge-success-custom status-badge">
<i class="fas fa-check"></i> Active
</span>
{% endif %}
</td>
<td>
<a href="{{ url_for('edit_user', guild_id=guild_id, user_id=user.user_id) }}" class="admin-btn">
<i class="fas fa-edit"></i> Edit
</a>
</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="5" class="text-center" style="color: #a0aec0; padding: 2rem;">
<i class="fas fa-users" style="font-size: 2rem; margin-bottom: 1rem; display: block;"></i>
No users found for this server.
</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>