pull/39/head
Leo TUAILLON 2 years ago
parent 91673c833e
commit c328f7d1ef

@ -40,4 +40,35 @@
Route="More" Route="More"
Icon="more.svg"/> Icon="more.svg"/>
</TabBar> </TabBar>
<FlyoutItem Title="Search">
<ShellContent
Title="Search Page"
ContentTemplate="{DataTemplate pages:SearchPage}"
Route="Search"/>
</FlyoutItem>
<FlyoutItem Title="RecipePage">
<ShellContent
Title="RecipePage"
ContentTemplate="{DataTemplate pages:RecipePage}"
Route="RecipePage"/>
</FlyoutItem>
<FlyoutItem Title="MyRecipePage">
<ShellContent
Title="RecipePage"
ContentTemplate="{DataTemplate pages:MyRecipesPage}"
Route="MyRecipe"/>
</FlyoutItem>
<FlyoutItem Title="ProfilePage">
<ShellContent
Title="RecipePage"
ContentTemplate="{DataTemplate pages:ProfilePage}"
Route="EditProfile"/>
</FlyoutItem>
<FlyoutItem Title="LoginPage">
<ShellContent
Title="RecipePage"
ContentTemplate="{DataTemplate pages:LoginPage}"
Route="LoginPage"/>
</FlyoutItem>
</Shell> </Shell>

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

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

@ -49,7 +49,8 @@
WidthRequest="65" WidthRequest="65"
HeightRequest="65" HeightRequest="65"
CornerRadius="15" CornerRadius="15"
Margin="0,5,5,0"> Margin="0,5,5,0"
Clicked="OnSyncButtonClicked">
</ImageButton> </ImageButton>
</Grid> </Grid>

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

@ -31,12 +31,27 @@
Grid.Row="1" Grid.Row="1"
VerticalOptions="Center" VerticalOptions="Center"
Margin="40, 0, 0, 0"> Margin="40, 0, 0, 0">
<Grid>
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="OnMyRecipesButtonTapped"/>
</Grid.GestureRecognizers>
<views:HeadedButton Text="My Recipes" HeadSource="cookie.svg" HeadColor="#FF5441"/> <views:HeadedButton Text="My Recipes" HeadSource="cookie.svg" HeadColor="#FF5441"/>
</Grid>
<Grid>
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="OnEditProfileButtonTapped"/>
</Grid.GestureRecognizers>
<views:HeadedButton Text="Edit Profile" HeadSource="user_fill.svg" HeadColor="#FF5441"/> <views:HeadedButton Text="Edit Profile" HeadSource="user_fill.svg" HeadColor="#FF5441"/>
</Grid>
<views:HeadedButton Text="Dark Mode" HeadSource="moon_white.svg" HeadColor="#FFFFFF"/> <views:HeadedButton Text="Dark Mode" HeadSource="moon_white.svg" HeadColor="#FFFFFF"/>
<views:HeadedButton Text="Share App" HeadSource="share.svg" HeadColor="#fe33bf"/> <views:HeadedButton Text="Share App" HeadSource="share.svg" HeadColor="#fe33bf"/>
<Grid>
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="OnLogoutButtonTapped"/>
</Grid.GestureRecognizers>
<views:HeadedButton Text="Logout" HeadSource="logout_arrow.svg" HeadColor="#FF5441"/> <views:HeadedButton Text="Logout" HeadSource="logout_arrow.svg" HeadColor="#FF5441"/>
</Grid>
</VerticalStackLayout> </VerticalStackLayout>
</Grid> </Grid>
</ContentPage> </ContentPage>

@ -12,4 +12,18 @@ public partial class MorePage : ContentPage
ProfileImage.Source = userImage; ProfileImage.Source = userImage;
ProfileName.Text = userName; ProfileName.Text = userName;
} }
private async void OnMyRecipesButtonTapped(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//MyRecipe");
}
private async void OnEditProfileButtonTapped(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//EditProfile");
}
private async void OnLogoutButtonTapped(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//Login");
}
} }

@ -8,6 +8,7 @@
BackgroundColor="{StaticResource BackgroundPrimary}"> BackgroundColor="{StaticResource BackgroundPrimary}">
<Grid <Grid
RowDefinitions="90*, 10*" RowDefinitions="90*, 10*"
Padding="10"> Padding="10">
@ -22,7 +23,8 @@
AlignContent="Center" AlignContent="Center"
AlignItems="Center"> AlignItems="Center">
<ImageButton <ImageButton
Source="arrow_back.svg"/> Source="arrow_back.svg"
Clicked="OnSyncButtonClicked"/>
<Label <Label
Style="{StaticResource h1}" Style="{StaticResource h1}"
x:Name="RecipeName" x:Name="RecipeName"

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

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

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

@ -14,6 +14,9 @@
MinimumHeightRequest="175" MinimumHeightRequest="175"
MinimumWidthRequest="150" MinimumWidthRequest="150"
RowDefinitions="*, Auto"> RowDefinitions="*, Auto">
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="OnRecipeTapped"/>
</Grid.GestureRecognizers>
<Border <Border
Grid.Row="0" Grid.Row="0"
Stroke="Transparent" Stroke="Transparent"

@ -43,4 +43,8 @@ public partial class RecipeView : ContentView
else img.Opacity = 1; else img.Opacity = 1;
} }
} }
private async void OnRecipeTapped(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//RecipePage");
}
} }
Loading…
Cancel
Save