This commit is contained in:
MeysamMoghaddam
2025-10-07 01:07:01 +03:30
parent 7be59c3ec3
commit 5cc9c06592
2 changed files with 16 additions and 15 deletions

View File

@@ -13,24 +13,23 @@ public partial class App
private async Task HandleNavigationAsync(NavigationContext context) private async Task HandleNavigationAsync(NavigationContext context)
{ {
// Temporarily bypass authentication to test profile page var normalizedPath = NormalizePath(context.Path);
// var normalizedPath = NormalizePath(context.Path); if (IsAuthPath(normalizedPath))
// if (IsAuthPath(normalizedPath)) {
// { return;
// return; }
// }
// var token = await LocalStorage.GetItemAsync<string>(TokenStorageKey); var token = await LocalStorage.GetItemAsync<string>(TokenStorageKey);
// if (!string.IsNullOrWhiteSpace(token)) if (!string.IsNullOrWhiteSpace(token))
// { {
// return; return;
// } }
// var redirect = string.IsNullOrEmpty(normalizedPath) || normalizedPath == "/" var redirect = string.IsNullOrEmpty(normalizedPath) || normalizedPath == "/"
// ? string.Empty ? string.Empty
// : $"?redirect={Uri.EscapeDataString(normalizedPath)}"; : $"?redirect={Uri.EscapeDataString(normalizedPath)}";
// Navigation.NavigateTo(RouteConstants.Auth.Phone + redirect, forceLoad: true); Navigation.NavigateTo(RouteConstants.Auth.Phone + redirect, forceLoad: true);
} }
private static bool IsAuthPath(string? path) private static bool IsAuthPath(string? path)

View File

@@ -35,6 +35,7 @@
<MudLink Href="#pricing" Typo="Typo.subtitle1" Class="mud-link">قیمت‌ها</MudLink> <MudLink Href="#pricing" Typo="Typo.subtitle1" Class="mud-link">قیمت‌ها</MudLink>
<MudLink Href="#faq" Typo="Typo.subtitle1" Class="mud-link">سوالات متداول</MudLink> <MudLink Href="#faq" Typo="Typo.subtitle1" Class="mud-link">سوالات متداول</MudLink>
<MudLink Href="#contact" Typo="Typo.subtitle1" Class="mud-link">ارتباط با ما</MudLink> <MudLink Href="#contact" Typo="Typo.subtitle1" Class="mud-link">ارتباط با ما</MudLink>
<MudLink Href="/profile" 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">
@@ -56,6 +57,7 @@
<MudLink Href="#pricing" Typo="Typo.subtitle1" OnClick="() => _drawerOpen=false">قیمت‌ها</MudLink> <MudLink Href="#pricing" Typo="Typo.subtitle1" OnClick="() => _drawerOpen=false">قیمت‌ها</MudLink>
<MudLink Href="#faq" Typo="Typo.subtitle1" OnClick="() => _drawerOpen=false">سوالات متداول</MudLink> <MudLink Href="#faq" Typo="Typo.subtitle1" OnClick="() => _drawerOpen=false">سوالات متداول</MudLink>
<MudLink Href="#contact" Typo="Typo.subtitle1" OnClick="() => _drawerOpen=false">ارتباط</MudLink> <MudLink Href="#contact" Typo="Typo.subtitle1" OnClick="() => _drawerOpen=false">ارتباط</MudLink>
<MudLink Href="/profile" Typo="Typo.subtitle1" OnClick="() => _drawerOpen=false">پروفایل</MudLink>
<MudDivider Class="my-2" /> <MudDivider Class="my-2" />
<MudButton Variant="Variant.Outlined" Color="Color.Inherit">ورود</MudButton> <MudButton Variant="Variant.Outlined" Color="Color.Inherit">ورود</MudButton>
<MudButton Color="Color.Primary">شروع کنید</MudButton> <MudButton Color="Color.Primary">شروع کنید</MudButton>