akkounts/app/views/wallet/index.html.erb
Sebastian Kippe 9abdab2274
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Show sats instead of BTC on donation page, refactor CSS
* Show sats instead of BTC on donation page
* Use number delimiters on both donation page and wallet page
* Refactor donation page CSS into Tailwind directives
2021-11-28 11:53:20 -06:00

62 lines
2.0 KiB
Plaintext

<section class="w-full grid grid-cols-1 md:grid-cols-12 md:mb-0">
<div class="md:col-span-8">
<h2>Wallet</h2>
<p>
Send and receive sats via the Bitcoin Lightning Network.
</p>
</div>
<div class="md:col-span-4 mt-4 md:mt-0">
<p class="font-mono md:text-right mb-0 p-4 border border-gray-300 rounded-lg overflow-hidden">
<% if @balance %>
<span class="text-xl"><%= number_with_delimiter @balance %> sats</span><br>
<span class="text-sm text-gray-500">Available balance</span>
<% else %>
<span class="text-xl">n/a sats</span><br>
<span class="text-sm text-gray-500">Balance unavailable</span>
<% end %>
</p>
</div>
</section>
<section>
<h3>Blue Wallet</h3>
<p>
You can connect
<%= link_to "Blue Wallet", "https://bluewallet.io",
class: "ks-text-link", target: "_blank" %>
(Android or iOS) to your Kosmos lightning wallet. In order to do so,
scan the setup QR code from the Import Wallet screen in the app.
</p>
<p>
<a id="show-setup-code" class="ks-text-link cursor-pointer">Show setup code</a>
<a id="hide-setup-code" class="ks-text-link cursor-pointer" style="display: none;">Hide setup code</a>
</p>
<p id="setup-code" style="display: none;">
<%= raw @svg %>
</p>
</section>
<script type="text/javascript">
(function () {
const linkShow = document.querySelector('#show-setup-code');
const linkHide = document.querySelector('#hide-setup-code');
const setupCode = document.querySelector('#setup-code');
linkShow.addEventListener('click', function(ev) {
ev.preventDefault();
setupCode.style.display = 'block';
linkShow.style.display = 'none';
linkHide.style.display = 'block';
window.scrollTo(0, document.body.scrollHeight);
});
linkHide.addEventListener('click', function(ev) {
ev.preventDefault();
const el = document.querySelector('#setup-code');
setupCode.style.display = 'none';
linkShow.style.display = 'block';
linkHide.style.display = 'none';
});
})();
</script>