|
|
@ -1,16 +1,21 @@
|
|
|
|
using Models;
|
|
|
|
using Models;
|
|
|
|
|
|
|
|
using ShoopNCook.Controllers;
|
|
|
|
|
|
|
|
|
|
|
|
namespace ShoopNCook.Pages;
|
|
|
|
namespace ShoopNCook.Pages;
|
|
|
|
|
|
|
|
|
|
|
|
public partial class MorePage : ContentPage
|
|
|
|
public partial class MorePage : ContentPage
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public MorePage(Account account, UserNotifier notifier)
|
|
|
|
private readonly MorePageController controller;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MorePage(Account account, MorePageController controller)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
InitializeComponent();
|
|
|
|
InitializeComponent();
|
|
|
|
ProfileImage.Source = ImageSource.FromUri(account.User.ProfilePicture);
|
|
|
|
ProfileImage.Source = ImageSource.FromUri(account.User.ProfilePicture);
|
|
|
|
ProfileName.Text = account.User.Name;
|
|
|
|
ProfileName.Text = account.User.Name;
|
|
|
|
|
|
|
|
this.controller = controller;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private async void OnMyRecipesButtonTapped(object sender, EventArgs e)
|
|
|
|
private async void OnMyRecipesButtonTapped(object sender, EventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
await Shell.Current.Navigation.PushAsync(new MyRecipesPage());
|
|
|
|
await Shell.Current.Navigation.PushAsync(new MyRecipesPage());
|
|
|
@ -21,9 +26,9 @@ public partial class MorePage : ContentPage
|
|
|
|
await Shell.Current.Navigation.PushAsync(new ProfilePage());
|
|
|
|
await Shell.Current.Navigation.PushAsync(new ProfilePage());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private async void OnLogoutButtonTapped(object sender, EventArgs e)
|
|
|
|
private void OnLogoutButtonTapped(object sender, EventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
await Shell.Current.GoToAsync("//Login");
|
|
|
|
controller.Logout();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private async void OnShareButtonClicked(object sender, EventArgs e)
|
|
|
|
private async void OnShareButtonClicked(object sender, EventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|