Add OtpDialogService for mobile-friendly OTP authentication dialog

This commit is contained in:
masoodafar-web
2025-11-17 02:53:51 +03:30
parent a0c1452a84
commit 52b8298a18
34 changed files with 1495 additions and 279 deletions
@@ -18,6 +18,7 @@ public partial class Index
{
[Inject] private UserContract.UserContractClient UserContract { get; set; } = default!;
[Inject] private UserAddressContract.UserAddressContractClient UserAddressContract { get; set; } = default!;
[Inject] private WalletService WalletService { get; set; } = default!;
private GetUserResponse _userProfile = new();
private UpdateUserRequest _updateUserRequest = new();
@@ -46,9 +47,22 @@ public partial class Index
{
await LoadUserProfile();
await LoadAddresses();
await LoadWallet();
}
}
private string _walletCredit = "-";
private string _walletNetwork = "-";
private async Task LoadWallet()
{
var b = await WalletService.GetBalancesAsync();
_walletCredit = FormatPrice(b.CreditBalance);
_walletNetwork = FormatPrice(b.NetworkBalance);
StateHasChanged();
}
private static string FormatPrice(long price) => string.Format("{0:N0} تومان", price);
private async Task LoadUserProfile()
{
try
@@ -286,4 +300,4 @@ public partial class Index
var url = "https://dayadiamond.ir/profile/creditpurchase/?merchantcode=56146364";
await JSRuntime.InvokeVoidAsync("open", url, "_blank");
}
}
}