modified: templates/user_giveaways.html

This commit is contained in:
SimolZimol
2024-10-29 10:51:38 +01:00
parent 775aa616df
commit 7c6214d74e

View File

@@ -9,9 +9,15 @@
<body>
{% include 'navigation.html' %}
<div class="container mt-5">
<h2>Your Won Giveaways on Server {{ guild_id }}</h2>
<table class="table table-bordered mt-4">
<thead>
<div class="text-center mb-4">
<h1>{{ g.user_info['username'] }}'s Won Giveaways</h1>
<p class="text-muted">Server: <strong>{{ g.guild_name }}</strong> (ID: {{ g.guild_id }})</p>
</div>
{% if won_giveaways %}
<div class="table-responsive">
<table class="table table-hover table-bordered mt-4">
<thead class="thead-dark">
<tr>
<th>Name</th>
<th>Platform</th>
@@ -26,18 +32,22 @@
<td>{{ giveaway.platform }}</td>
<td>
{% if giveaway.aktiv %}
<span class="badge badge-success">Redeemed</span>
<span class="badge badge-success">Redeemed <i class="fas fa-check-circle"></i></span>
{% else %}
<span class="badge badge-warning">Not Redeemed</span>
<span class="badge badge-warning">Not Redeemed <i class="fas fa-hourglass-half"></i></span>
{% endif %}
</td>
<td>
{% if giveaway.aktiv %}
<!-- Link to view the redeemed key -->
<a href="{{ url_for('redeem_giveaway', guild_id=guild_id, uuid=giveaway['uuid']) }}" class="btn btn-secondary btn-sm">View Key</a>
<a href="{{ url_for('redeem_giveaway', guild_id=g.guild_id, uuid=giveaway['uuid']) }}" class="btn btn-secondary btn-sm">
<i class="fas fa-eye"></i> View Key
</a>
{% else %}
<!-- Link to redeem the giveaway -->
<a href="{{ url_for('redeem_giveaway', guild_id=guild_id, uuid=giveaway['uuid']) }}" class="btn btn-primary btn-sm">Redeem</a>
<a href="{{ url_for('redeem_giveaway', guild_id=g.guild_id, uuid=giveaway['uuid']) }}" class="btn btn-primary btn-sm">
<i class="fas fa-gift"></i> Redeem
</a>
{% endif %}
</td>
</tr>
@@ -45,5 +55,14 @@
</tbody>
</table>
</div>
{% else %}
<div class="alert alert-info text-center" role="alert">
You have not won any giveaways on this server yet.
</div>
{% endif %}
</div>
<!-- Optional: Include FontAwesome for icons -->
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
</body>
</html>