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.
 
 
 
 
 
 

481 lines
24 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="/settings">Settings</a></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>
</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">Settings</h2>
<p class="font-semibold text-coolGray-200">Manage your BasicSwap and Coins settings</p>
</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="mb-10 border-b border-gray-200">
<ul class="flex flex-wrap -mb-px text-sm font-medium text-center" id="myTab" data-tabs-toggle="#settingstab" role="tablist">
<li class="mr-2" role="presentation">
<a class="cursor-pointer inline-block p-4 rounded-t-lg border-b-2" id="profile-tab" data-tabs-target="#coins" role="tab" aria-controls="coins" aria-selected="false">Coins</a>
</li>
<li class="mr-2" role="presentation">
<a class="cursor-pointer inline-block p-4 rounded-t-lg border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300" id="general-tab" data-tabs-target="#general" role="tab" aria-controls="general" aria-selected="false">General</a>
</li>
<li class="mr-2" role="presentation">
<a class="cursor-pointer inline-block p-4 rounded-t-lg border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300" id="tor-tab" data-tabs-target="#tor" role="tab" aria-controls="tor" aria-selected="false">Tor</a>
</li>
</ul>
</div>
<div id="settingstab">
<div class="hidden rounded-lg" id="coins" role="tabpanel" aria-labelledby="coins-tab">
{% for c in chains %}
<form method="post">
<section class="bg-white p-3">
<div class="flex flex-wrap items-center">
<div class="w-full">
<h4 class="font-semibold text-black text-2xl align-middle">
<span class="inline-block align-middle items-center justify-center w-9 h-10 bg-white-50 rounded">
<img class="h-9" src="/static/images/coins/{{ c.name }}.png" alt=""> </span> {{ c.display_name }}</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">
<tr>
<th scope="col" class="py-3 px-6">Settings</th>
<th scope="col">Value</th>
</tr>
</thead>
{% if c.connection_type %}
<tr>
<td class="py-4 px-6 bold w-96 bold">Connection Type</td>
<td class="py-4">{{ c.connection_type }}</td>
</tr>
{% endif %}
{% if c.manage_daemon is defined %}
{% if c.name == 'monero' %}
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96">Manage Daemon</td>
<td>
<select class="appearance-none 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 p-2.5" name="managedaemon_{{ c.name }}">
<option value="true" {% if c.manage_daemon==true %} selected{% endif %}>True</option>
<option value="false" {% if c.manage_daemon==false %} selected{% endif %}>False</option>
</select>
</td>
</tr>
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96 bold">Daemon RPC Host</td>
<td><input type="text" class="appearance-none 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 p-2.5" name="rpchost_{{ c.name }}" value="{{ c.rpchost }}"></td>
</tr>
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96 bold">Daemon RPC Port</td>
<td><input type="text" class="appearance-none 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 p-2.5" name="rpcport_{{ c.name }}" value="{{ c.rpcport }}"></td>
</tr>
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6" colspan=2>
<label for="message" class="block mb-2 text-sm font-medium text-gray-900">List trusted public nodes to use if “Automatically Select Daemon” is set as “True”. <br/></label>
<textarea class="outline-none block p-2.5 w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 monospace" placeholder="(Add one entry per line) eg: node.xmr.to:18081" name="remotedaemonurls_{{ c.name }}" rows="4" cols="100">{{ c.remotedaemonurls }}</textarea>
</td>
</tr>
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96 bold">Automatically Select Daemon</td>
<td>
<select class="appearance-none 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 p-2.5" name="autosetdaemon_{{ c.name }}">
<option value="true" {% if c.autosetdaemon==true %} selected{% endif %}>True</option>
<option value="false" {% if c.autosetdaemon==false %} selected{% endif %}>False</option>
</select>
</td>
</tr>
{% else %}
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96 bold">Manage Daemon</td>
<td>{{ c.manage_daemon }}</td>
</tr>
{% endif %}
{% endif %}
{% if c.manage_wallet_daemon is defined %}
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96 bold">Manage Wallet Daemon</td>
<td>{{ c.manage_wallet_daemon }}</td>
</tr>
{% endif %}
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96 bold">Chain Lookups</td>
<td>
<select class="appearance-none 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 p-2.5" name="lookups_{{ c.name }}">
<option value="local" {% if c.lookups=='local' %} selected{% endif %}>Local Node</option>
<option value="explorer" {% if c.lookups=='explorer' %} selected{% endif %}>Explorer</option>
</select>
</td>
</tr>
{% if c.name == 'monero' %}
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96 bold">Transaction Fee Priority</td>
<td>
<select class="appearance-none 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 p-2.5" name="fee_priority_{{ c.name }}">
<option value="0" {% if c.fee_priority==0 %} selected{% endif %}>Default</option>
<option value="1" {% if c.fee_priority==1 %} selected{% endif %}>Low</option>
<option value="2" {% if c.fee_priority==2 %} selected{% endif %}>Medium</option>
<option value="3" {% if c.fee_priority==3 %} selected{% endif %}>High</option>
</select>
</td>
</tr>
{% else %}
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96 bold">Blocks Confirmed Target</td>
<td><input type="number" class="appearance-none 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 p-2.5" name="conf_target_{{ c.name }}" min="1" max="32" value="{{ c.conf_target }}"></td>
</tr>
{% endif %}
{% if c.name == 'particl' %}
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96 bold">Anon Tx Ring Size</td>
<td><input type="number" class="appearance-none 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 p-2.5" name="rct_ring_size_{{ c.name }}" min="3" max="32" value="{{ c.anon_tx_ring_size }}"></td>
</tr>
{% endif %}
</table>
</div>
</div>
<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">
<div class="w-full md:w-auto p-1.5 ml-2">
<button name="apply_{{ c.name }}" value="Apply" 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>Apply</span> </button>
</div>
{% if c.can_disable == true %}
<div class="w-full md:w-auto p-1.5 ml-2">
<button name="disable_{{ c.name }}" value="Disable" onclick="return confirmPopup('Disable', '{{ c.display_name }}');" type="submit" 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>Disable Coin</span> </button>
</div>
{% endif %}
{% if c.can_reenable == true %}
<div class="w-full md:w-auto p-1.5 ml-2">
<button name="enable_{{ c.name }}" value="Enable" onclick="return confirmPopup('Enable', '{{ c.display_name }}');" type="submit" class="flex flex-wrap justify-center w-full px-4 py-2.5 bg-white hover:bg-white font-medium text-sm text-green-500 border border-green-500 hover:text-green-600 hover:border-green-600 rounded-md shadow-button focus:ring-0 focus:outline-none">
<span>Enable</span> </button>
</div>
{% endif %}
</div>
</div>
</div>
</table>
<input type="hidden" name="formid" value="{{ form_id }}">
</form>
{% endfor %}
</div>
<div class="hidden rounded-lg" id="general" role="tabpanel" aria-labelledby="general-tab">
<form method="post">
<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">
<section class="bg-white p-3">
<div class="flex flex-wrap items-center">
<div class="w-full">
<h4 class="font-semibold text-black text-2xl align-middle">
<span class="inline-block align-middle items-center justify-center w-9 h-10 bg-white-50 rounded">
<img class="h-9" src="" alt=""> </span>General</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">
<tr>
<th scope="col" class="py-3 px-6">Settings</th>
<th scope="col">Value</th>
</tr>
</thead>
<tr>
<td class="py-4 px-6 bold w-96 bold">Debug Mode</td>
<td>
<select class="appearance-none 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 p-2.5" >
<option value="true" >True</option>
<option value="false" >False</option>
</select>
</td>
</tr>
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96">Debug Mode UI</td>
<td>
<select class="appearance-none 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 p-2.5" >
<option value="true" >True</option>
<option value="false" >False</option>
</select>
</td>
</tr>
</tr>
</table>
</div> </div>
<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">
<div class="w-full md:w-auto p-1.5 ml-2">
<button name="apply" value="Apply" 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>Apply</span> </button>
</div>
</div>
</div>
</div>
<form>
<form method="post">
<section class="bg-white p-3">
<div class="flex flex-wrap items-center">
<div class="w-full">
<h4 class="font-semibold text-black text-2xl align-middle">
<span class="inline-block align-middle items-center justify-center w-9 h-10 bg-white-50 rounded">
<img class="h-9" src="" alt=""> </span>Chart (todo)</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">
<tr>
<th scope="col" class="py-3 px-6">Settings</th>
<th scope="col">Value</th>
</tr>
</thead>
<tr>
<td class="py-4 px-6 bold w-96 bold">Show Chart</td>
<td>
<select class="appearance-none 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 p-2.5" >
<option value="true" >True</option>
<option value="false" >False</option>
</select>
</td>
</tr>
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96">Chart API Key (URL)</td>
<td><input type="text" class="appearance-none 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 p-2.5" name="" min="3" max="32" value=""></td>
</tr>
</tr>
</table>
</div> </div>
<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">
<div class="w-full md:w-auto p-1.5 ml-2">
<button name="apply" value="Apply" 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>Apply</span> </button>
</div>
</div>
</div>
</div>
</form>
</div> </div> </div> </div>
</div>
<div class="hidden rounded-lg" id="tor" role="tabpanel" aria-labelledby="tor-tab">
<form method="post">
<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">
<section class="bg-white p-3">
<div class="flex flex-wrap items-center">
<div class="w-full">
<h4 class="font-semibold text-black text-2xl align-middle">
<span class="inline-block align-middle items-center justify-center w-9 h-10 bg-white-50 rounded">
<img class="h-9" src="" alt=""> </span>Tor</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">
<tr>
<th scope="col" class="py-3 px-6">Settings</th>
<th scope="col">Value</th>
</tr>
</thead>
<tr>
<td class="py-4 px-6 bold w-96 bold">Use TOR</td>
<td>
<select class="appearance-none 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 p-2.5" >
<option value="true" >True</option>
<option value="false" >False</option>
</select>
</td>
</tr>
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96">Use Tor Proxy</td>
<td>
<select class="appearance-none 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 p-2.5" >
<option value="true" >True</option>
<option value="false" >False</option>
</select>
</td>
</tr>
</tr>
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96">Tot Proxy Host</td>
<td><input type="text" class="appearance-none 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 p-2.5" name="" min="3" max="32" value=""></td>
</tr>
</tr>
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96">Tor Proxy Port</td>
<td><input type="text" class="appearance-none 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 p-2.5" name="" min="3" max="32" value=""></td>
</tr>
</tr>
<tr class="bg-white border-t hover:bg-gray-50">
<td class="py-4 px-6 bold w-96">Tor Control Port</td>
<td><input type="text" class="appearance-none 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 p-2.5" name="" min="3" max="32" value=""></td>
</tr>
</tr>
</table>
</div> </div>
<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">
<div class="w-full md:w-auto p-1.5 ml-2">
<button name="apply" value="Apply" 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>Default</span> </button>
</div>
<div class="w-full md:w-auto p-1.5 ml-2">
<button name="apply" value="Apply" 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>Apply</span> </button>
</div>
</div>
</div>
</div>
</form>
</div> </div> </div> </div>
</div> <!-- -->
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<script>
function confirmPopup(action, coin_name) {
return confirm(action + " " + coin_name + "?\nWill shutdown basicswap.");
}
</script>
{% include 'footer.html' %}
</body>
</html>