disabled btn
This commit is contained in:
@@ -59,10 +59,10 @@
|
||||
}
|
||||
</div>
|
||||
|
||||
<!-- Share row — always visible, enabled once amount is known -->
|
||||
<!-- Share row — enabled once a valid fastcheck number is entered, even if there is nothing to pay -->
|
||||
<div class="share-row">
|
||||
<button type="button" class="share-btn share-btn--tg" (click)="shareByTelegram()"
|
||||
[disabled]="fastcheckAmount() === null || amountLoading()"
|
||||
[disabled]="!canShare()"
|
||||
[title]="'fastcheck.share_tg' | translate">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M9.04 15.65l-.36 4.06c.51 0 .73-.22.99-.48l2.38-2.27 4.93 3.6c.9.5 1.55.24 1.79-.83l3.24-15.18h.01c.29-1.34-.48-1.86-1.36-1.54L1.13 9.66c-1.32.5-1.3 1.23-.22 1.56l4.92 1.53L17.27 5.6c.54-.34 1.03-.15.62.19"/>
|
||||
|
||||
@@ -102,6 +102,16 @@ export class FastcheckPage {
|
||||
&& this.codeEnabled() && !this.amountLoading();
|
||||
});
|
||||
|
||||
/**
|
||||
* Share via Telegram is allowed as soon as a valid 18-digit fastcheck is
|
||||
* entered and the lookup is finished — even if there is nothing to pay
|
||||
* (amount is null/zero). Pay button stays governed by canPay().
|
||||
*/
|
||||
canShare = computed(() => {
|
||||
const digits = this.fastcheckNumber().replace(/\D/g, '');
|
||||
return digits.length === 18 && !this.amountLoading();
|
||||
});
|
||||
|
||||
telegramLink = computed(() => {
|
||||
const sid = this.webSessionId();
|
||||
return sid
|
||||
|
||||
Reference in New Issue
Block a user