u
This commit is contained in:
@@ -10,7 +10,7 @@ namespace FrontOffice.Main;
|
||||
public partial class App
|
||||
{
|
||||
[Inject] private ILocalStorageService LocalStorage { get; set; } = default!;
|
||||
|
||||
[Inject] private AuthService AuthService { get; set; } = default!;
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
@@ -27,25 +27,28 @@ public partial class App
|
||||
// Store referral code in local storage
|
||||
await LocalStorage.SetItemAsync("referral:code", referralCode);
|
||||
|
||||
var options = new DialogOptions
|
||||
if(!await AuthService.IsAuthenticatedAsync())
|
||||
{
|
||||
BackdropClick = false,
|
||||
CloseOnEscapeKey = false
|
||||
};
|
||||
var options = new DialogOptions
|
||||
{
|
||||
BackdropClick = false,
|
||||
CloseOnEscapeKey = false
|
||||
};
|
||||
|
||||
var parameters = new DialogParameters<AuthDialog>
|
||||
{
|
||||
{ x => x.HideCancelButton, true }
|
||||
};
|
||||
var dialog = await DialogService.ShowAsync<AuthDialog>("ورود به حساب کاربری", parameters, options);
|
||||
var result = await dialog.Result;
|
||||
var parameters = new DialogParameters<AuthDialog>
|
||||
{
|
||||
{ x => x.HideCancelButton, true }
|
||||
};
|
||||
var dialog = await DialogService.ShowAsync<AuthDialog>("ورود به حساب کاربری", parameters, options);
|
||||
var result = await dialog.Result;
|
||||
|
||||
if (!result.Canceled)
|
||||
{
|
||||
Snackbar.Add(GlobalConstants.SuccessMsg, Severity.Success);
|
||||
await Task.Delay(1000);
|
||||
Navigation.NavigateTo(Navigation.Uri, forceLoad: true);
|
||||
StateHasChanged();
|
||||
if (!result.Canceled)
|
||||
{
|
||||
Snackbar.Add(GlobalConstants.SuccessMsg, Severity.Success);
|
||||
await Task.Delay(1000);
|
||||
Navigation.NavigateTo(Navigation.Uri, forceLoad: true);
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,11 +52,9 @@
|
||||
<MudItem xs="12" sm="6" md="2">
|
||||
<MudStack Spacing="2">
|
||||
<MudText Typo="Typo.subtitle1" Class="footer-title">دسترسی سریع</MudText>
|
||||
<MudLink Href="#features" Class="footer-link">امکانات</MudLink>
|
||||
<MudLink Href="#pricing" Class="footer-link">قیمتها</MudLink>
|
||||
<MudLink Href="#faq" Class="footer-link">سوالات متداول</MudLink>
|
||||
<MudLink Href="#contact" Class="footer-link">ارتباط با ما</MudLink>
|
||||
<MudLink Href="/auth/phone" Class="footer-link">ورود</MudLink>
|
||||
<MudLink Href="@(RouteConstants.FAQ.Index)" Class="footer-link">سوالات متداول</MudLink>
|
||||
<MudLink Href="@(RouteConstants.Contact.Index)" Class="footer-link">ارتباط با ما</MudLink>
|
||||
<MudLink Href="@(RouteConstants.About.Index)" Class="footer-link">درباره ما</MudLink>
|
||||
</MudStack>
|
||||
</MudItem>
|
||||
|
||||
@@ -79,7 +77,7 @@
|
||||
<MudLink Href="#" Class="footer-link">مرکز راهنمایی</MudLink>
|
||||
<MudLink Href="#" Class="footer-link">آموزشها</MudLink>
|
||||
<MudLink Href="#" Class="footer-link">وبلاگ</MudLink>
|
||||
<MudLink Href="#" Class="footer-link">تماس با ما</MudLink>
|
||||
<MudLink Href="@(RouteConstants.Contact.Index)" Class="footer-link">ارتباط با ما</MudLink>
|
||||
<MudLink Href="#" Class="footer-link">گزارش مشکل</MudLink>
|
||||
</MudStack>
|
||||
</MudItem>
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
<div class="d-none d-md-flex align-center gap-10">
|
||||
<MudLink Href="@(RouteConstants.FAQ.Index)" Typo="Typo.subtitle1" Class="mud-link">سوالات متداول</MudLink>
|
||||
<MudLink Href="@(RouteConstants.About.Index)" Typo="Typo.subtitle1" Class="mud-link">درباره ما</MudLink>
|
||||
<MudLink Href="@(RouteConstants.Contact.Index)" Typo="Typo.subtitle1" Class="mud-link">ارتباط با ما</MudLink>
|
||||
<MudLink Href="@(RouteConstants.About.Index)" Typo="Typo.subtitle1" Class="mud-link">درباره ما</MudLink>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user