Host-customized fork of https://github.com/tecnovert/basicswap/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
412 lines
19 KiB
412 lines
19 KiB
{% include 'header.html' %} |
|
|
|
<div class="container mx-auto"> |
|
<section class="bg-white p-5 mt-5"> |
|
<div class="flex flex-wrap items-center -m-2"> |
|
<div class="w-full md:w-1/2 p-2"> |
|
<ul class="flex flex-wrap items-center gap-x-3 mb-2"> |
|
<li> |
|
<a class="flex font-medium text-xs text-coolGray-500 hover:text-coolGray-700" href="/"> |
|
<p>Home</p> |
|
</a> |
|
</li> |
|
<li> |
|
<svg width="6" height="15" viewBox="0 0 6 15" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|
<path d="M5.34 0.671999L2.076 14.1H0.732L3.984 0.671999H5.34Z" fill="#BBC3CF"></path> |
|
</svg> |
|
</li> |
|
<li><a class="flex font-medium text-xs text-coolGray-500 hover:text-coolGray-700" href="#">Bids</a></li> |
|
<li> |
|
<svg width="6" height="15" viewBox="0 0 6 15" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|
<path d="M5.34 0.671999L2.076 14.1H0.732L3.984 0.671999H5.34Z" fill="#BBC3CF"></path> |
|
</svg> |
|
</li> |
|
<li><a class="flex font-medium text-xs text-coolGray-500 hover:text-coolGray-700" href="{{ bid_id }}">BID ID:{{ bid_id }}</a></li> |
|
</ul> |
|
</div> |
|
</div> |
|
</section> |
|
|
|
<section class="py-4"> |
|
<div class="container px-4 mx-auto"> |
|
<div class="relative py-11 px-16 bg-coolGray-900 rounded-md overflow-hidden"> |
|
<img class="absolute z-10 left-4 top-4" src="/static/images/elements/dots-red.svg" alt=""> |
|
<img class="absolute z-10 right-4 bottom-4" src="/static/images/elements/dots-red.svg" alt=""> |
|
<img class="absolute h-64 left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2 object-cover" src="/static/images/elements/wave.svg" alt=""> |
|
<div class="relative z-20 flex flex-wrap items-center -m-3"> |
|
<div class="w-full md:w-1/2 p-3"> |
|
<h2 class="mb-6 text-4xl font-bold text-white tracking-tighter">Bid |
|
{% if debug_mode == true %} |
|
(Debug: bid template) |
|
{% endif %} |
|
</h2> |
|
<p class="font-semibold text-coolGray-200">Bid ID: {{ bid_id }}</p> |
|
</div> |
|
<div class="w-full md:w-1/2 p-3"> |
|
{% if refresh %} |
|
<a id="refresh" href=/bid/{{ bid_id }}><button class="block md:ml-auto px-5 py-3 font-medium text-lcg text-white bg-blue-500 hover:bg-blue-600 rounded-md focus:ring-0 focus:outline-none">Refresh {{ refresh }} seconds</button></a> |
|
{% else %} |
|
<a id="refresh" href=/bid/{{ bid_id }}><button class="block md:ml-auto px-5 py-3 font-medium text-lcg text-white bg-blue-500 hover:bg-blue-600 rounded-md focus:ring-0 focus:outline-none">Refresh</button></a> |
|
{% endif %} |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
</section> |
|
|
|
{% include 'inc_messages.html' %} |
|
|
|
<section class="bg-white"> |
|
<div class="pl-6 pr-6 pt-0 pb-0 mt-5 h-full overflow-hidden bg-white "> |
|
<div class="pb-6 border-coolGray-100"> |
|
<div class="flex flex-wrap items-center justify-between -m-2"> |
|
<div class="w-full pt-2"> |
|
|
|
|
|
|
|
<div class="container px-0 mx-auto mt-5"> |
|
<div class="overflow-x-auto relative border sm:rounded-lg"> |
|
|
|
|
|
<table class="w-full text-sm text-left text-gray-500 outline-none border-gray-300"> |
|
|
|
<thead class="text-xs text-gray-700 border-b uppercase bg-gray-50 outline-none border-gray-300"> |
|
<tr> |
|
<th scope="col" class="py-3 px-6">Item</th> |
|
<th scope="col">Data </th> |
|
|
|
</tr> |
|
</thead> |
|
|
|
|
|
{% if data.was_sent == 'True' %} |
|
|
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Swap</td> |
|
<td>{{ data.amt_to }} {{ data.ticker_to }} for {{ data.amt_from }} {{ data.ticker_from }}</td> |
|
</tr> |
|
|
|
{% else %} |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Swap</td> |
|
<td>{{ data.amt_from }} {{ data.ticker_from }} for {{ data.amt_to }} {{ data.ticker_to }}</td> |
|
</tr> |
|
|
|
{% endif %} |
|
|
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Bid Rate</td> |
|
<td>{{ data.bid_rate }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Bid State</td> |
|
<td>{{ data.bid_state }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">State Description </td> |
|
<td>{{ data.state_description }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">ITX State</td> |
|
<td>{{ data.itx_state }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">PTX State</td> |
|
<td>{{ data.ptx_state }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Offer</td> |
|
<td><a class="monospace" href="/offer/{{ data.offer_id }}">{{ data.offer_id }}</a></td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Address From</td> |
|
<td><a class="monospace" href="/identity/{{ data.addr_from }}">{{ data.addr_from }}</a> {{ data.addr_from_label }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Proof of Funds</td> |
|
<td>{{ data.proof_address }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Created At</td> |
|
<td>{{ data.created_at }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Expired At</td> |
|
<td>{{ data.expired_at }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Sent</td> |
|
<td>{{ data.was_sent }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Received</td> |
|
<td>{{ data.was_received }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Initiate Tx</td> |
|
<td class="monospace">{{ data.initiate_tx }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Initiate Conf</td> |
|
<td>{{ data.initiate_conf }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Participate Tx</td> |
|
<td class="monospace">{{ data.participate_tx }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Participate Conf</td> |
|
<td>{{ data.participate_conf }}</td> |
|
</tr> |
|
{% if data.show_txns %} |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Initiate Tx Refund</td> |
|
<td class="monospace">{{ data.initiate_tx_refund }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Participate Tx Refund</td> |
|
<td class="monospace">{{ data.participate_tx_refund }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Initiate Tx Spend Tx</td> |
|
<td class="monospace">{{ data.initiate_tx_spend }}</td> |
|
</tr> |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6 bold">Participate Tx Spend Tx</td> |
|
<td class="monospace">{{ data.participate_tx_spend }}</td> |
|
</tr> |
|
{% endif %} |
|
</table> |
|
|
|
</div> |
|
</div> |
|
|
|
<section class="bg-white p-6"> |
|
<div class="flex flex-wrap items-center"> |
|
<div class="w-full"> |
|
<h4 class="font-semibold text-black text-2xl">Old states</h4> |
|
</div> |
|
</div> |
|
</section> |
|
|
|
<div class="container px-0 mx-auto mt-5"> |
|
<div class="overflow-x-auto relative border sm:rounded-lg"> |
|
|
|
|
|
<table class="w-full text-sm text-left text-gray-500 outline-none border-gray-300"> |
|
|
|
<thead class="text-xs text-gray-700 border-b uppercase bg-gray-50 outline-none border-gray-300"> |
|
<tr> |
|
<th scope="col" class="py-3 px-6">Old States</th> |
|
<th scope="col">Set at Time</th> |
|
|
|
</tr> |
|
</thead> |
|
|
|
{% for s in old_states %} |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6">{{ s[1] }}</td> |
|
<td>{{ s[0] | formatts }} </td> |
|
</tr> |
|
{% endfor %} |
|
</table> |
|
|
|
</div> |
|
</div> |
|
|
|
|
|
{% if data.events %} |
|
|
|
<section class="bg-white p-6"> |
|
<div class="flex flex-wrap items-center"> |
|
<div class="w-full"> |
|
<h4 class="font-semibold text-black text-2xl">Events</h4> |
|
</div> |
|
</div> |
|
</section> |
|
|
|
|
|
<div class="container px-0 mx-auto mt-5"> |
|
<div class="overflow-x-auto relative border sm:rounded-lg"> |
|
|
|
<table class="w-full text-sm text-left text-gray-500 outline-none border-gray-300"> |
|
|
|
<thead class="text-xs text-gray-700 border-b uppercase bg-gray-50 outline-none border-gray-300"> |
|
<tr> |
|
<th scope="col" class="py-3 px-6">Time</th> |
|
<th scope="col">Events</th> |
|
|
|
</tr> |
|
</thead> |
|
|
|
{% for e in data.events %} |
|
<tr class="bg-white border-t hover:bg-gray-50"> |
|
<td class="py-4 px-6">{{ e.at | formatts }}</td> |
|
<td>{{ e.desc }}</td> |
|
</tr> |
|
{% endfor %} |
|
</table> |
|
|
|
</div> |
|
</div> |
|
{% else %} |
|
{% endif %} |
|
|
|
<form method="post"> |
|
|
|
<div class="p-6 pt-10 bg-white bg-opacity-60 rounded-b-md"> |
|
<div class="w-full md:w-0/12"> |
|
<div class="flex flex-wrap justify-end -m-1.5"> |
|
|
|
{% if edit_bid %} |
|
|
|
<table> |
|
<tr> |
|
<td class="bold pr-5">Change Bid State:</td> |
|
<td> |
|
<select class="pappearance-none pr-15 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg outline-none focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5" name="new_state"> |
|
{% for s in data.bid_states %} |
|
<option value="{{ s[0] }}" {% if data.bid_state_ind==s[0] %} selected{% endif %}>{{ s[1] }}</option> |
|
{% endfor %} |
|
</select> |
|
</td> |
|
</tr> |
|
|
|
{% if data.debug_ui == true %} |
|
<tr> |
|
<td class="bold pr-5">Debug Option:</td> |
|
<td> |
|
<select class="apappearance-none pr-15 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg outline-none focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5" name="debugind"> |
|
<option{% if data.debug_ind=="-1" %} selected{% endif %} value="-1">None</option> |
|
{% for a in data.debug_options %} |
|
<option{% if data.debug_ind==a[0] %} selected{% endif %} value="{{ a[0] }}">{{ a[1] }}</option> |
|
{% endfor %} |
|
</select> |
|
</td> |
|
</tr> |
|
{% endif %} |
|
|
|
</table> |
|
|
|
|
|
<div class="w-full md:w-auto p-1.5 ml-2"> |
|
<button name="edit_bid_cancel" value="Cancel" type="submit" class="flex flex-wrap justify-center w-full px-4 py-2.5 font-medium text-sm text-coolGray-500 hover:text-coolGray-600 border border-coolGray-200 hover:border-coolGray-300 bg-white rounded-md shadow-button focus:ring-0 focus:outline-none"> |
|
<span>Cancel</span> </button> |
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="w-full md:w-auto p-1.5"> |
|
<button name="edit_bid_submit" value="Submit" type="submit" class="flex flex-wrap justify-center w-full px-4 py-2.5 bg-blue-500 hover:bg-blue-600 font-medium text-sm text-white border border-blue-500 rounded-md shadow-button focus:ring-0 focus:outline-none"> |
|
<span>Submit Edit Bid</span> </button> |
|
</div> |
|
|
|
{% else %} |
|
|
|
{% if data.show_bidder_seq_diagram %} |
|
<div class="w-full md:w-auto p-1.5"> |
|
<button name="hide_bidder_seq_diagram" type="submit" value="Hide Bidder Sequence Diagram" class="flex flex-wrap justify-center w-full px-4 py-2.5 font-medium text-sm text-coolGray-500 hover:text-coolGray-600 border border-coolGray-200 hover:border-coolGray-300 bg-white rounded-md shadow-button focus:ring-0 focus:outline-none"> |
|
<span>Hide Bidder Sequence Diagram</span> |
|
</button> |
|
</div> |
|
{% else %} |
|
<div class="w-full md:w-auto p-1.5"> |
|
<button name="show_bidder_seq_diagram" type="submit" value="Show Bidder Sequence Diagram" class="flex flex-wrap justify-center w-full px-4 py-2.5 font-medium text-sm text-coolGray-500 hover:text-coolGray-600 border border-coolGray-200 hover:border-coolGray-300 bg-white rounded-md shadow-button focus:ring-0 focus:outline-none"> |
|
<span>Show Bidder Sequence Diagram</span> |
|
</button> |
|
</div> |
|
{% endif %} |
|
{% if data.show_offerer_seq_diagram %} |
|
<div class="w-full md:w-auto p-1.5"> |
|
<button name="hide_offerer_seq_diagram" type="submit" value="Hide Offerer Sequence Diagram" class="flex flex-wrap justify-center w-full px-4 py-2.5 font-medium text-sm text-coolGray-500 hover:text-coolGray-600 border border-coolGray-200 hover:border-coolGray-300 bg-white rounded-md shadow-button focus:ring-0 focus:outline-none"> |
|
<span>Hide Offerer Sequence Diagram</span> |
|
</button> |
|
</div> |
|
{% else %} |
|
<div class="w-full md:w-auto p-1.5"> |
|
<button name="show_offerer_seq_diagram" type="submit" value="Show Offerer Sequence Diagram" class="flex flex-wrap justify-center w-full px-4 py-2.5 font-medium text-sm text-coolGray-500 hover:text-coolGray-600 border border-coolGray-200 hover:border-coolGray-300 bg-white rounded-md shadow-button focus:ring-0 focus:outline-none"> |
|
<span>Show Offerer Sequence Diagram</span> |
|
</button> |
|
</div> |
|
{% endif %} |
|
|
|
|
|
{% if data.can_abandon == true %} |
|
|
|
<div class="w-full md:w-auto p-1.5"> |
|
<button name="abandon_bid" type="submit" value="Abandon Bid" onclick="return confirmPopup();" class="flex flex-wrap justify-center w-full px-4 py-2.5 font-medium text-sm text-red-500 hover:text-red-600 border border-red-400 hover:border-red-500 bg-white rounded-md shadow-button focus:ring-0 focus:outline-none"> |
|
<span>Abandon Bid</span> </button> |
|
</div> |
|
|
|
{% endif %} |
|
|
|
{% if data.show_txns %} |
|
|
|
<div class="w-full md:w-auto p-1.5"> |
|
<button name="hide_txns" type="submit" value="Hide Info" class="flex flex-wrap justify-center w-full px-4 py-2.5 font-medium text-sm text-coolGray-500 hover:text-coolGray-600 border border-coolGray-200 hover:border-coolGray-300 bg-white rounded-md shadow-button focus:ring-0 focus:outline-none"> |
|
<span>Hide info</span> </button> |
|
</div> |
|
|
|
{% else %} |
|
|
|
<div class="w-full md:w-auto p-1.5"> |
|
<button name="show_txns" type="submit" value="Show More Info" class="flex flex-wrap justify-center w-full px-4 py-2.5 font-medium text-sm text-coolGray-500 hover:text-coolGray-600 border border-coolGray-200 hover:border-coolGray-300 bg-white rounded-md shadow-button focus:ring-0 focus:outline-none"> |
|
<span>Show More Info</span> </button> |
|
</div> |
|
|
|
{% endif %} |
|
|
|
<div class="w-full md:w-auto p-1.5"> |
|
<button name="edit_bid" type="submit" value="Edit Bid" class="flex flex-wrap justify-center w-full px-4 py-2.5 font-medium text-sm text-coolGray-500 hover:text-coolGray-600 border border-coolGray-200 hover:border-coolGray-300 bg-white rounded-md shadow-button focus:ring-0 focus:outline-none"> |
|
<span>Edit bit</span> </button> |
|
</div> |
|
|
|
{% endif %} |
|
|
|
{% if data.was_received == 'True' %} |
|
|
|
<div class="w-full md:w-auto p-1.5"> |
|
<button name="accept_bid" value="Accept Bid" type="submit" onclick='return confirmPopup("Accept");' class="flex flex-wrap justify-center w-full px-4 py-2.5 bg-blue-500 hover:bg-blue-600 font-medium text-sm text-white border border-blue-500 rounded-md shadow-button focus:ring-0 focus:outline-none"> |
|
<span>Accept Bid</span> </button> |
|
</div> |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
</div> |
|
</div> |
|
</div> |
|
|
|
|
|
|
|
<input type="hidden" name="formid" value="{{ form_id }}"> |
|
</form> |
|
|
|
{% if data.show_bidder_seq_diagram %} |
|
<img src="/static/sequence_diagrams/bidder.alt.xu.min.svg" /> |
|
{% endif %} |
|
|
|
{% if data.show_offerer_seq_diagram %} |
|
<img src="/static/sequence_diagrams/offerer.alt.xu.min.svg" /> |
|
{% endif %} |
|
|
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
</section> |
|
|
|
<script> |
|
function confirmPopup() { |
|
return confirm("Are you sure?"); |
|
} |
|
</script> |
|
|
|
</div> |
|
{% include 'footer.html' %} |
|
</body> |
|
|
|
</html>
|
|
|