This commit is contained in:
MeysamMoghaddam
2025-10-22 19:11:28 +03:30
parent 47a185bfbe
commit 0b253074a9
3 changed files with 25 additions and 24 deletions

View File

@@ -10,7 +10,7 @@ namespace FrontOffice.Main;
public partial class App public partial class App
{ {
[Inject] private ILocalStorageService LocalStorage { get; set; } = default!; [Inject] private ILocalStorageService LocalStorage { get; set; } = default!;
[Inject] private AuthService AuthService { get; set; } = default!;
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
await base.OnInitializedAsync(); await base.OnInitializedAsync();
@@ -27,25 +27,28 @@ public partial class App
// Store referral code in local storage // Store referral code in local storage
await LocalStorage.SetItemAsync("referral:code", referralCode); await LocalStorage.SetItemAsync("referral:code", referralCode);
var options = new DialogOptions if(!await AuthService.IsAuthenticatedAsync())
{ {
BackdropClick = false, var options = new DialogOptions
CloseOnEscapeKey = false {
}; BackdropClick = false,
CloseOnEscapeKey = false
};
var parameters = new DialogParameters<AuthDialog> var parameters = new DialogParameters<AuthDialog>
{ {
{ x => x.HideCancelButton, true } { x => x.HideCancelButton, true }
}; };
var dialog = await DialogService.ShowAsync<AuthDialog>("ورود به حساب کاربری", parameters, options); var dialog = await DialogService.ShowAsync<AuthDialog>("ورود به حساب کاربری", parameters, options);
var result = await dialog.Result; var result = await dialog.Result;
if (!result.Canceled) if (!result.Canceled)
{ {
Snackbar.Add(GlobalConstants.SuccessMsg, Severity.Success); Snackbar.Add(GlobalConstants.SuccessMsg, Severity.Success);
await Task.Delay(1000); await Task.Delay(1000);
Navigation.NavigateTo(Navigation.Uri, forceLoad: true); Navigation.NavigateTo(Navigation.Uri, forceLoad: true);
StateHasChanged(); StateHasChanged();
}
} }
} }
} }

View File

@@ -52,11 +52,9 @@
<MudItem xs="12" sm="6" md="2"> <MudItem xs="12" sm="6" md="2">
<MudStack Spacing="2"> <MudStack Spacing="2">
<MudText Typo="Typo.subtitle1" Class="footer-title">دسترسی سریع</MudText> <MudText Typo="Typo.subtitle1" Class="footer-title">دسترسی سریع</MudText>
<MudLink Href="#features" Class="footer-link">امکانات</MudLink> <MudLink Href="@(RouteConstants.FAQ.Index)" Class="footer-link">سوالات متداول</MudLink>
<MudLink Href="#pricing" Class="footer-link">قیمت‌ها</MudLink> <MudLink Href="@(RouteConstants.Contact.Index)" Class="footer-link">ارتباط با ما</MudLink>
<MudLink Href="#faq" Class="footer-link">سوالات متداول</MudLink> <MudLink Href="@(RouteConstants.About.Index)" Class="footer-link">درباره ما</MudLink>
<MudLink Href="#contact" Class="footer-link">ارتباط با ما</MudLink>
<MudLink Href="/auth/phone" Class="footer-link">ورود</MudLink>
</MudStack> </MudStack>
</MudItem> </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="#" 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> <MudLink Href="#" Class="footer-link">گزارش مشکل</MudLink>
</MudStack> </MudStack>
</MudItem> </MudItem>

View File

@@ -36,8 +36,8 @@
<div class="d-none d-md-flex align-center gap-10"> <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.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.Contact.Index)" Typo="Typo.subtitle1" Class="mud-link">ارتباط با ما</MudLink>
<MudLink Href="@(RouteConstants.About.Index)" Typo="Typo.subtitle1" Class="mud-link">درباره ما</MudLink>
</div> </div>
<div class="d-flex align-center gap-2"> <div class="d-flex align-center gap-2">