Disable withdrawal if user has no sats

This commit is contained in:
ekzyis 2023-12-03 09:54:08 +01:00
parent 51e204b64a
commit 6088d8aa10
1 changed files with 3 additions and 2 deletions

View File

@ -4,9 +4,10 @@
<div>authenticated as {{ session.pubkey.slice(0, 8) }}</div>
<button class="ms-2 my-3" @click="logout">logout</button>
<div>you have {{ session.msats / 1000 }} sats</div>
<button class="ms-2 my-3" @click="toggleWithdrawalForm">
<button class="ms-2 my-3" @click="toggleWithdrawalForm" :disabled="session.msats === 0">
<span v-if="showWithdrawalForm">cancel</span>
<span v-else>withdraw</span></button>
<span v-else>withdraw</span>
</button>
</div>
<form v-show="showWithdrawalForm" @submit.prevent="submitWithdrawal">
<label for="bolt11">bolt11</label>