mostly visual stuff, couple todo items

pull/3/head
lalanza808 5 years ago
parent 928dbcee3c
commit 398481a78e

@ -67,6 +67,8 @@ class ItemImage(models.Model):
# Store a copy of the image for thumbnail
thumb = img.copy()
# TODO - task this and just present page without until it's done
# Correct the image size to safe maximums
img.thumbnail(max_size, Image.ANTIALIAS)
img.save(img_bytes, format=img_format, quality=80)

@ -49,8 +49,6 @@ def confirm_shipment(request, sale_id):
messages.error(request, "You can't confirm a package shipment for an item you don't own.")
return HttpResponseRedirect(reverse('home'))
@login_required
def confirm_receipt(request, sale_id):
sale = ItemSale.objects.get(id=sale_id)

@ -18,10 +18,6 @@
padding-top: 0;
}
#header {
display: none;
}
/* Banner */
#banner {
@ -103,4 +99,4 @@
#footer .icons .rounded {
font-size: 1.5em;
}
}

@ -1149,6 +1149,17 @@ New color: fd4e05
margin: 0 auto;
}
.ctr-light {
max-width: 600px;
}
.wallet-text {
text-align: center;
}
.wallet-text ul li {
list-style: none;
}
html {
height: 100%;
}

@ -157,7 +157,7 @@
<footer id="footer">
<div class="container">
<ul class="copyright">
<li>&copy; {{ site_meta.name }} 2019. All Rights Reserved.</li>
<!-- <li>&copy; {{ site_meta.name }} 2019. All Rights Reserved.</li> -->
</ul>
<ul class="copyright">
<li><a href="{% static 'privacy.txt' %}">Privacy</a></li>

@ -15,8 +15,6 @@
<p class="sale-info"><strong>Last Updated</strong>: {{ item.last_updated | date:"d M Y H:i:s" }}</p>
<p class="sale-info"><strong>Description</strong>: {{ item.description }}</p>
<p class="sale-info"><strong>Asking Price (XMR)</strong>: {{ item.ask_price_xmr }}</p>
<p class="sale-info"><strong>Available</strong>: {{ item.available }}</p>
<p class="sale-info"><strong>Location</strong>: {{ item.owner.profile.first.city }}, {{ item.owner.profile.first.state }}, {{ item.owner.profile.first.country }}</p>
{% for img in item_images %}
<a href="{{ img.image.url }}"><img src="{{ img.thumbnail.url}}" alt="{{ img.thumbnail.name }}"></a>
{% endfor %}
@ -41,21 +39,15 @@
<table class="table">
<tr>
<th>Bid ID</th>
<th>Bidder</th>
<th>Bid Price (XMR)</th>
<th>Platform Fees (XMR)</th>
<th>Bid Accepted</th>
<th>Location</th>
<th>Actions</th>
</tr>
{% for bid in item_bids %}
<tr>
<td>#{{ bid.id }}</td>
<td>{{ bid.bidder }}</td>
<td>{{ bid.bid_price_xmr }}</td>
<td>{{ bid.bid_price_xmr | determine_platform_fee }}</td>
<td>{{ bid.accepted }}</td>
<td>{{ bid.bidder.profile.first.city }}, {{ bid.bidder.profile.first.state }}, {{ bid.bidder.profile.first.country }}</td>
<td>
{% if bid.accepted %}
{% if bid.bidder == request.user or bid.item.owner == request.user %}
@ -79,9 +71,4 @@
</div>
</section>
{% endblock %}

@ -14,8 +14,6 @@
<th>Name</th>
<th>List Date</th>
<th>Asking Price (XMR)</th>
<th>Available</th>
<th>Location</th>
</tr>
{% for item in items %}
<tr>
@ -24,8 +22,6 @@
<td><a href="{% url 'get_item' item.id %}">{{ item.name }}</a></td>
<td>{{ item.list_date | date:"d M, Y H:i:s" }}</td>
<td>{{ item.ask_price_xmr }}</td>
<td>{{ item.available }}</td>
<td>{{ item.owner.profile.first.city }}, {{ item.owner.profile.first.state }}, {{ item.owner.profile.first.country }}</td>
</tr>
{% endfor %}
</table>

@ -4,7 +4,7 @@
{% block content %}
<section id="main" class="wrapper">
<div class="container">
<div class="container ctr-light">
<header class="minor">
<h2>Sale #{{ sale.id }} - {{ sale.item.name }}</h2>
</header>
@ -19,6 +19,7 @@
<p class="sale-info"><strong>Escrow Address</strong>: {{ sale.escrow_address }}</p>
<img src="data:image/png;base64,{{ qrcode }}" width=200 class="sale-qrcode">
<hr>
<span class="wallet-text">
<h2>Need a Wallet?</h2>
<p class="sale-info">Try out these popular Monero wallet projects:</p>
<ul>
@ -27,6 +28,7 @@
<li><a href="https://www.monerujo.io/" target="_blank">Monerujo (Android)</a></li>
<li><a href="https://mymonero.com/" target="_blank">MyMonero (Desktop, Web)</a></li>
</ul>
</span>
{% elif sale.payment_received and sale.item_shipped == False %}
<p class="sale-info">Congratulations {{ sale.bid.bidder.username }},</p>
<p class="sale-info">Your funds have been confirmed!</p>
@ -113,34 +115,6 @@
<li><a href="https://www.reddit.com/user/catacombkid1">Reddit</a></li>
{% endif %}
{% endif %}
{% if site_meta.debug %}
<hr>
<h2>Debug Info</h2>
<section>
<p class="sale-info"><strong>Item</strong>: {{ sale.item }}</p>
<p class="sale-info"><strong>Payout Address</strong>: {{ sale.item.payout_address }}</p>
<p class="sale-info"><strong>Escrow Address</strong>: {{ sale.escrow_address }}</p>
<p class="sale-info"><strong>Escrow Account Index</strong>: {{ sale.escrow_account_index }}</p>
<p class="sale-info"><strong>Agreed Price (XMR)</strong>: {{ sale.agreed_price_xmr }}</p>
<p class="sale-info"><strong>Platform Fee (XMR)</strong>: {{ sale.platform_fee_xmr }}</p>
<p class="sale-info"><strong>Expected Payment (XMR)</strong>: {{ sale.expected_payment_xmr }}</p>
<p class="sale-info"><strong>Received Payment (XMR)</strong>: {{ sale.received_payment_xmr }}</p>
<p class="sale-info"><strong>Escrow Period (days)</strong>: {{ sale.escrow_period_days }}</p>
<p class="sale-info"><strong>Buyer Notified</strong>: {{ sale.buyer_notified }}</p>
<p class="sale-info"><strong>Seller Notified</strong>: {{ sale.seller_notified }}</p>
<p class="sale-info"><strong>Payment Received</strong>: {{ sale.payment_received }}</p>
<p class="sale-info"><strong>Payment Refunded</strong>: {{ sale.payment_refunded }}</p>
<p class="sale-info"><strong>Item Shipped</strong>: {{ sale.item_shipped }}</p>
<p class="sale-info"><strong>Item Received</strong>: {{ sale.item_received }}</p>
<p class="sale-info"><strong>Buyer Disputed</strong>: {{ sale.buyer_disputed }}</p>
<p class="sale-info"><strong>Seller Disputed</strong>: {{ sale.seller_disputed }}</p>
<p class="sale-info"><strong>Escrow Complete</strong>: {{ sale.escrow_complete }}</p>
<p class="sale-info"><strong>Seller Paid</strong>: {{ sale.seller_paid }}</p>
<p class="sale-info"><strong>Platform Paid</strong>: {{ sale.platform_paid }}</p>
<p class="sale-info"><strong>Sale Finalized</strong>: {{ sale.sale_finalized }}</p>
</section>
{% endif %}
</div>
</section>

@ -54,8 +54,7 @@ MIDDLEWARE = [
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'core.middleware.EnforceShippingAddressCreationMiddleware'
'django.middleware.clickjacking.XFrameOptionsMiddleware'
]
ROOT_URLCONF = 'xmrauctions.urls'