Add device detection and PDF generation features; refactor AuthDialog and update print utilities

This commit is contained in:
masoodafar-web
2025-11-14 13:12:31 +03:30
parent e86cb7aa47
commit 230ba41113
12 changed files with 397 additions and 54 deletions

View File

@@ -3,7 +3,7 @@
<PageTitle>ثبت‌نام سریع</PageTitle>
<section class="py-12 wizard-section">
<MudContainer MaxWidth="MaxWidth.Large">
<MudContainer MaxWidth="MaxWidth.Large" Class="px-1">
<MudGrid Spacing="4" Justify="Justify.Center">
<MudItem xs="12" md="5" Class="d-none d-sm-block">
<MudStack Spacing="2" Class="mb-6">
@@ -68,7 +68,7 @@
<MudProgressLinear Color="Color.Primary" Indeterminate="true" />
}
<MudStepper @bind-ActiveIndex="_activeStep" Elevation="0" DisableClick="true" Class="mb-4 " id="registration-stepper">
<MudStepper @bind-ActiveIndex="_activeStep" @ref="_mudStepper" Elevation="0" DisableClick="true" Class="mb-4 " id="registration-stepper">
<ChildContent>
<MudStep Label="تأیید موبایل" Icon="@Icons.Material.Filled.Smartphone">
@* Inline AuthDialog with captcha enabled *@
@@ -110,10 +110,9 @@
<MudButton Variant="Variant.Outlined" Color="Color.Primary"
StartIcon="@Icons.Material.Filled.Download" Disabled="_isSubmitting"
OnClick="DownloadContract">
دانلود قرارداد نمونه
دانلود/پرینت قرارداد نمونه
</MudButton>
<MudText Typo="Typo.caption" Class="mud-text-secondary">فرمت: فایل متنی
</MudText>
<MudText Typo="Typo.caption" Class="mud-text-secondary">فرمت: PDF از طریق Print</MudText>
</MudStack>
<MudCheckBox @bind-Checked="_model.AcceptTerms" Color="Color.Success"
@@ -124,13 +123,23 @@
</ChildContent>
<ActionContent Context="stepper">
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
@if (_isAuthenticated && _activeStep == 1)
{
<MudButton Variant="Variant.Text" Color="Color.Secondary"
OnClick="@AuthService.LogoutAsync">خروج از حساب</MudButton>
}
else
{
<MudButton Variant="Variant.Text" Color="Color.Secondary"
Disabled="_activeStep == 0 || _isSubmitting"
OnClick="@(async () => { await GoBack(stepper); })">مرحله قبل</MudButton>
<MudSpacer />
Disabled="_activeStep == 0 || _isSubmitting"
OnClick="@(async () => { await GoBack(); })">مرحله قبل</MudButton>
}
<MudSpacer/>
<MudButton Variant="Variant.Filled" Color="Color.Primary"
Disabled="_isSubmitting"
OnClick="@(async () => { await GoNextAsync(stepper); })">
Disabled="_isSubmitting"
OnClick="@(async () => { await GoNextAsync(); })">
@_nextButtonText
</MudButton>
</MudStack>