Fixes to trade expansion and trade acceptance appearance
This commit is contained in:
parent
63e20bace6
commit
01becbee48
20 changed files with 105 additions and 148 deletions
|
|
@ -22,9 +22,6 @@
|
|||
<button type="submit" class="btn btn-primary w-full">{% trans "Add Friend Code" %}</button>
|
||||
</form>
|
||||
|
||||
<div class="mt-4">
|
||||
<a href="{% url 'list_friend_codes' %}" class="btn btn-secondary">Back to Friend Codes</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Include Cleave Zen from a CDN -->
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
Confirm Delete
|
||||
{% endif %}
|
||||
</button>
|
||||
<a href="{% url 'list_friend_codes' %}" class="btn btn-secondary">Cancel</a>
|
||||
<a href="{% url 'dashboard' %}?tab=friend_codes" class="btn btn-secondary">Cancel</a>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
<!-- Right group: Cancel & Update -->
|
||||
<div class="flex items-center space-x-4 mt-4 md:mt-0">
|
||||
<a href="{% url 'list_friend_codes' %}" class="btn btn-secondary">Cancel</a>
|
||||
<a href="{% url 'dashboard' %}?tab=friend_codes" class="btn btn-secondary">Cancel</a>
|
||||
<!-- This update button is outside the form but tied to it with the HTML5 'form' attribute -->
|
||||
<button type="submit" form="edit-friendcode-form" class="btn btn-primary">Update</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}My Friend Codes{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mx-auto max-w-3xl mt-6">
|
||||
<h1 class="text-3xl font-bold mb-4">My Friend Codes</h1>
|
||||
|
||||
{% if friend_codes %}
|
||||
<ul class="space-y-2">
|
||||
{% for code in friend_codes %}
|
||||
<li class="w-full grid grid-cols-2 grid-rows-2 md:grid-cols-8 md:grid-rows-1 items-center {% if code.is_default %}bg-green-200 dark:bg-green-300 dark:text-base-100{% else %}bg-base-100 dark:bg-base-900 dark:text-white{% endif %} p-4 rounded shadow">
|
||||
<div class="row-start-1 md:col-span-3">
|
||||
<span class="align-baseline"><a href="{% url 'edit_friend_code' code.id %}">{{ code.in_game_name }}</a></span>
|
||||
{% if code.is_default %}
|
||||
<span class="badge badge-success ml-2 align-baseline">Default</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="row-start-2 col-start-1 md:row-start-1 md:col-span-3 {% if not code.is_default %}mr-4{% endif %}">
|
||||
<span class="font-mono text-sm sm:text-base align-baseline">{{ code.friend_code }}</span>
|
||||
</div>
|
||||
<div class="row-start-2 col-start-2 md:row-start-1 md:col-span-2 flex justify-end space-x-2">
|
||||
{% if not code.is_default %}
|
||||
<form method="post" action="{% url 'change_default_friend_code' code.id %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-secondary btn-sm align-baseline">Set Default</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<a href="{% url 'delete_friend_code' code.id %}" class="btn btn-error btn-sm align-baseline">Delete</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>You do not have any friend codes added yet.</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="mt-4 flex flex-row justify-between">
|
||||
<a href="{% url 'dashboard' %}" class="btn btn-secondary">Back to Dashboard</a>
|
||||
<a href="{% url 'add_friend_code' %}" class="btn btn-primary">Add a New Friend Code</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue