navigation ajustments

pull/39/head
Leo TUAILLON 2 years ago
parent 00e91994bb
commit f981b89308

@ -11,7 +11,7 @@ public partial class App : Application
Account account = getUserAccount();
MainPage = new NavigationPage(new HomePage());
MainPage = new AppShell();
}
private Account getUserAccount()

@ -17,7 +17,6 @@
Title="More"
ContentTemplate="{DataTemplate pages:Splash}"
Route="Splash"
Icon="more.svg"
IsVisible="False"/>
<ShellContent
@ -48,6 +47,7 @@
Route="More"
Icon="more.svg"/>
</TabBar>
<FlyoutItem Title="Search">
<ShellContent
Title="Search Page"

@ -8,10 +8,6 @@ public partial class AppShell : Shell
public AppShell()
{
InitializeComponent();
ShowSplashPage();
}
private async void ShowSplashPage()
{
await Navigation.PushModalAsync(new Splash());
}
}

@ -15,13 +15,6 @@
ColumnDefinitions="*"
MaximumHeightRequest="60">
<ImageButton
Grid.Column="0"
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"
HorizontalOptions="Start"
Clicked="OnSyncButtonClicked"/>
<Label
Grid.Column="0"

@ -6,8 +6,5 @@ public partial class FavoritesPage : ContentPage
{
InitializeComponent();
}
private async void OnSyncButtonClicked(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//HomePage");
}
}

@ -8,6 +8,6 @@ public partial class HomePage : ContentPage
}
private async void OnSyncButtonClicked(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//Search");
await Shell.Current.Navigation.PushAsync(new SearchPage());
}
}

@ -14,12 +14,12 @@ public partial class MorePage : ContentPage
}
private async void OnMyRecipesButtonTapped(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//MyRecipe");
await Shell.Current.Navigation.PushAsync(new MyRecipesPage());
}
private async void OnEditProfileButtonTapped(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//EditProfile");
await Shell.Current.Navigation.PushAsync(new ProfilePage());
}
private async void OnLogoutButtonTapped(object sender, EventArgs e)

@ -17,7 +17,8 @@
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"
HorizontalOptions="Start"/>
HorizontalOptions="Start"
Clicked="OnBackButtonClicked"/>
<Label
Grid.Column="0"

@ -5,5 +5,10 @@ public partial class MyRecipesPage : ContentPage
public MyRecipesPage()
{
InitializeComponent();
}
private async void OnBackButtonClicked(object sender, EventArgs e)
{
await Navigation.PopAsync();
}
}

@ -22,7 +22,8 @@
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"
HorizontalOptions="Start"/>
HorizontalOptions="Start"
Clicked="OnBackButtonClicked"/>
<Label
Grid.Column="0"

@ -6,4 +6,8 @@ public partial class ProfilePage : ContentPage
{
InitializeComponent();
}
private async void OnBackButtonClicked(object sender, EventArgs e)
{
await Navigation.PopAsync();
}
}

@ -24,7 +24,7 @@
AlignItems="Center">
<ImageButton
Source="arrow_back.svg"
Clicked="OnSyncButtonClicked"/>
Clicked="OnBackButtonClicked"/>
<Label
Style="{StaticResource h1}"
x:Name="RecipeName"

@ -95,9 +95,9 @@ public partial class RecipePage : ContentPage
Favorite.Source = ImageSource.FromFile("hearth_off.svg");
}
}
private async void OnSyncButtonClicked(object sender, EventArgs e)
private async void OnBackButtonClicked(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//Search");
await Navigation.PopAsync();
}
}

@ -23,7 +23,7 @@
WidthRequest="50"
Source="arrow_back.svg"
HorizontalOptions="Start"
Clicked="OnSyncButtonClicked"/>
Clicked="OnBackButtonClicked"/>
<Label
Grid.Column="0"

@ -6,8 +6,8 @@ public partial class SearchPage : ContentPage
{
InitializeComponent();
}
private async void OnSyncButtonClicked(object sender, EventArgs e)
private async void OnBackButtonClicked(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//HomePage");
await Navigation.PopAsync();
}
}

@ -5,8 +5,6 @@ VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShoopNCook", "ShoopNCook.csproj", "{8ED2FB1D-C04D-478D-9271-CC91FE110396}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{D93F5FCA-0362-49F5-8EB5-CB3D5371DC50}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -19,10 +17,6 @@ Global
{8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.Build.0 = Release|Any CPU
{8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.Deploy.0 = Release|Any CPU
{D93F5FCA-0362-49F5-8EB5-CB3D5371DC50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D93F5FCA-0362-49F5-8EB5-CB3D5371DC50}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D93F5FCA-0362-49F5-8EB5-CB3D5371DC50}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D93F5FCA-0362-49F5-8EB5-CB3D5371DC50}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -1,25 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

@ -1,11 +0,0 @@
namespace Tests
{
public class UnitTest1
{
[Fact]
public void Test1()
{
Assert.Equal(1, 2);
}
}
}

@ -1 +0,0 @@
global using Xunit;

@ -1,3 +1,5 @@
using ShoopNCook.Pages;
namespace ShoopNCook.Views;
public partial class RecipeView : ContentView
@ -45,6 +47,6 @@ public partial class RecipeView : ContentView
}
private async void OnRecipeTapped(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//RecipePage");
await Shell.Current.Navigation.PushAsync(new RecipePage());
}
}
Loading…
Cancel
Save