Merge pull request 'navigation' (#39) from navigation into master
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
Reviewed-on: ShopNCook/ShopNCook#39xaml/set-filter
commit
d3cf0662b7
@ -1,9 +0,0 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class HomePage : ContentPage
|
||||
{
|
||||
public HomePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class LoginPage : ContentPage
|
||||
{
|
||||
public LoginPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="ShoopNCook.Pages.MorePage"
|
||||
BackgroundColor="{StaticResource BackgroundPrimary}"
|
||||
xmlns:views="clr-namespace:ShoopNCook.Views"
|
||||
Title="MorePage">
|
||||
<Grid
|
||||
RowDefinitions="Auto, *"
|
||||
Padding="20, 50, 20, 20">
|
||||
<!-- Profile picture and name -->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
ColumnDefinitions="*, 2*"
|
||||
ColumnSpacing="30">
|
||||
|
||||
<Image
|
||||
x:Name="ProfileImage"/>
|
||||
|
||||
<Label
|
||||
x:Name="ProfileName"
|
||||
Grid.Column="1"
|
||||
FontSize="24"
|
||||
VerticalTextAlignment="Center"
|
||||
TextColor="{StaticResource TextColorPrimary}"
|
||||
FontFamily="Poppins"/>
|
||||
</Grid>
|
||||
|
||||
<VerticalStackLayout
|
||||
Grid.Row="1"
|
||||
VerticalOptions="Center"
|
||||
Margin="40, 0, 0, 0">
|
||||
<views:HeadedButton Text="My Recipes" HeadSource="cookie.svg" HeadColor="#FF5441"/>
|
||||
<views:HeadedButton Text="Edit Profile" HeadSource="user_fill.svg" HeadColor="#FF5441"/>
|
||||
<views:HeadedButton Text="Dark Mode" HeadSource="moon_white.svg" HeadColor="#FF5441"/>
|
||||
<views:HeadedButton Text="Share App" HeadSource="share.svg" HeadColor="#FF5441"/>
|
||||
<views:HeadedButton Text="Logout" HeadSource="logout_arrow.svg" HeadColor="#FF5441"/>
|
||||
</VerticalStackLayout>
|
||||
</Grid>
|
||||
</ContentPage>
|
@ -1,15 +0,0 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class MorePage : ContentPage
|
||||
{
|
||||
public MorePage(): this("Adom Shafi", ImageSource.FromFile("default_profile_picture.png"))
|
||||
{
|
||||
}
|
||||
|
||||
public MorePage(string userName, ImageSource userImage)
|
||||
{
|
||||
InitializeComponent();
|
||||
ProfileImage.Source = userImage;
|
||||
ProfileName.Text = userName;
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class MyRecipesPage : ContentPage
|
||||
{
|
||||
public MyRecipesPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class RegisterPage : ContentPage
|
||||
{
|
||||
public RegisterPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class Splash : ContentPage
|
||||
{
|
||||
public Splash()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 825 B |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 1.3 KiB |
@ -0,0 +1,26 @@
|
||||
namespace ShoopNCook.Views;
|
||||
using Microsoft.Maui.Graphics;
|
||||
|
||||
public partial class HeadedButton : ContentView
|
||||
{
|
||||
|
||||
public string Text
|
||||
{
|
||||
set => BtnLabel.Text = value;
|
||||
}
|
||||
|
||||
public string HeadColor
|
||||
{
|
||||
set => PrefixBorder.BackgroundColor = Color.FromArgb(value);
|
||||
}
|
||||
|
||||
public string HeadSource
|
||||
{
|
||||
set => PrefixImage.Source = ImageSource.FromFile(value);
|
||||
}
|
||||
|
||||
public HeadedButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,29 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="ShoopNCook.Views.StepEntry">
|
||||
<VerticalStackLayout>
|
||||
<HorizontalStackLayout>
|
||||
<Label
|
||||
Style="{StaticResource h3}"
|
||||
Text="Step"
|
||||
Margin="0, 0, 2, 0"/>
|
||||
|
||||
<Label
|
||||
Style="{StaticResource h3}"
|
||||
x:Name="OrdinalLabel"/>
|
||||
</HorizontalStackLayout>
|
||||
|
||||
<Border
|
||||
StrokeShape="RoundRectangle 5"
|
||||
Stroke="Gray"
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}">
|
||||
<Editor
|
||||
MaxLength="10000"
|
||||
Style="{StaticResource UserInput}"
|
||||
AutoSize="TextChanges"
|
||||
FontSize="15"/>
|
||||
</Border>
|
||||
|
||||
</VerticalStackLayout>
|
||||
</ContentView>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="ShoopNCook.Views.StepEntry">
|
||||
<VerticalStackLayout>
|
||||
<HorizontalStackLayout>
|
||||
<Label
|
||||
Style="{StaticResource h3}"
|
||||
Text="Step"
|
||||
Margin="0, 0, 2, 0"/>
|
||||
|
||||
<Label
|
||||
Style="{StaticResource h3}"
|
||||
x:Name="OrdinalLabel"/>
|
||||
</HorizontalStackLayout>
|
||||
|
||||
<Border
|
||||
StrokeShape="RoundRectangle 5"
|
||||
Stroke="Gray"
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}">
|
||||
<Editor
|
||||
MaxLength="10000"
|
||||
Style="{StaticResource UserInput}"
|
||||
AutoSize="TextChanges"
|
||||
FontSize="15"/>
|
||||
</Border>
|
||||
|
||||
</VerticalStackLayout>
|
||||
</ContentView>
|
@ -1,19 +1,19 @@
|
||||
namespace ShoopNCook.Views;
|
||||
|
||||
public partial class StepEntry : ContentView
|
||||
{
|
||||
|
||||
public StepEntry(): this(1)
|
||||
{}
|
||||
|
||||
public StepEntry(uint ordinal)
|
||||
{
|
||||
InitializeComponent();
|
||||
Ordinal = ordinal;
|
||||
}
|
||||
|
||||
public uint Ordinal {
|
||||
get => uint.Parse(OrdinalLabel.Text);
|
||||
set => OrdinalLabel.Text = value.ToString();
|
||||
}
|
||||
namespace ShoopNCook.Views;
|
||||
|
||||
public partial class StepEntry : ContentView
|
||||
{
|
||||
|
||||
public StepEntry(): this(1)
|
||||
{}
|
||||
|
||||
public StepEntry(uint ordinal)
|
||||
{
|
||||
InitializeComponent();
|
||||
Ordinal = ordinal;
|
||||
}
|
||||
|
||||
public uint Ordinal {
|
||||
get => uint.Parse(OrdinalLabel.Text);
|
||||
set => OrdinalLabel.Text = value.ToString();
|
||||
}
|
||||
}
|
@ -1,170 +1,171 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="ShoopNCook.Pages.ForgotPassword"
|
||||
Title="ForgotPassword"
|
||||
BackgroundColor="{StaticResource BackgroundPrimary}">
|
||||
<ScrollView>
|
||||
<Grid
|
||||
Padding="20"
|
||||
RowDefinitions="Auto, Auto, Auto, *">
|
||||
|
||||
<!-- Profile label and return button -->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
RowDefinitions="Auto, *"
|
||||
ColumnDefinitions="*, 1.5*"
|
||||
Margin="0, 0, 0, 40">
|
||||
<HorizontalStackLayout>
|
||||
<ImageButton
|
||||
Grid.Column="0"
|
||||
|
||||
HeightRequest="50"
|
||||
WidthRequest="50"
|
||||
Source="arrow_back.svg"/>
|
||||
</HorizontalStackLayout>
|
||||
<Label
|
||||
Margin="-40,10,0,0"
|
||||
Grid.Column="1"
|
||||
FontSize="24"
|
||||
TextColor="{StaticResource TextColorPrimary}"
|
||||
Text="Forgot Password"
|
||||
FontFamily="PoppinsBold"
|
||||
VerticalOptions="Start"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Email entry -->
|
||||
<Grid
|
||||
Grid.Row="1"
|
||||
RowDefinitions="*, Auto, Auto"
|
||||
>
|
||||
|
||||
<Label
|
||||
|
||||
Grid.Row="0"
|
||||
FontSize="15"
|
||||
TextColor="{StaticResource TextColorSecondary}"
|
||||
Text="Enter your email here : "
|
||||
FontFamily="PoppinsBold"
|
||||
VerticalOptions="Center"/>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Style="{StaticResource SecondaryBorder}"
|
||||
Margin="0,30,0,20">
|
||||
<Grid
|
||||
Padding="5"
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||
ColumnDefinitions="Auto,Auto,*">
|
||||
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Source="email_icon.svg">
|
||||
</Image>
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Grid.Column="2"
|
||||
Placeholder="User Name"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<VerticalStackLayout
|
||||
Grid.Row="2"
|
||||
VerticalOptions="End">
|
||||
<Border
|
||||
Margin="0, 30, 0, 0"
|
||||
Stroke="{StaticResource BackgroundPrimary}"
|
||||
StrokeShape="RoundRectangle 12">
|
||||
<Button
|
||||
BackgroundColor="{StaticResource ActionButton}"
|
||||
FontFamily="PoppinsMedium"
|
||||
TextColor="White"
|
||||
Text="Recup my Password"/>
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
</Grid>
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
<!-- Sendmail grid -->
|
||||
<Grid
|
||||
Grid.Row="2"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto"
|
||||
RowSpacing="10">
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Margin="20"
|
||||
Text="A recuperation code as been send to your email address ! "
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="LightGreen"/>
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Text="Enter the code here"
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Style="{StaticResource SecondaryBorder}"
|
||||
>
|
||||
<Grid
|
||||
Padding="5"
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||
ColumnDefinitions="Auto,Auto,*">
|
||||
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Source="code.png">
|
||||
</Image>
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Grid.Column="2"
|
||||
Placeholder="Code"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Text="Enter new Password here"
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
<Border
|
||||
Grid.Row="4"
|
||||
Style="{StaticResource SecondaryBorderShadow}">
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Placeholder="New password"/>
|
||||
</Border>
|
||||
<Label
|
||||
Grid.Row="5"
|
||||
Text="Confirm your new Password here"
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
<Border
|
||||
Grid.Row="6"
|
||||
Style="{StaticResource SecondaryBorderShadow}">
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Placeholder="New password"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!-- Save button -->
|
||||
|
||||
<VerticalStackLayout
|
||||
Grid.Row="3"
|
||||
VerticalOptions="End">
|
||||
<Border
|
||||
Margin="0, 30, 0, 0"
|
||||
Stroke="{StaticResource BackgroundPrimary}"
|
||||
StrokeShape="RoundRectangle 12">
|
||||
<Button
|
||||
BackgroundColor="{StaticResource ActionButton}"
|
||||
FontFamily="PoppinsMedium"
|
||||
TextColor="White"
|
||||
Text="Save Change"/>
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</ScrollView>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="ShoopNCook.Pages.ForgotPassword"
|
||||
Title="ForgotPassword"
|
||||
BackgroundColor="{StaticResource BackgroundPrimary}">
|
||||
<ScrollView>
|
||||
<Grid
|
||||
Padding="20"
|
||||
RowDefinitions="Auto, Auto, Auto, *">
|
||||
|
||||
<!-- Profile label and return button -->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
RowDefinitions="Auto, *"
|
||||
ColumnDefinitions="*, 1.5*"
|
||||
Margin="0, 0, 0, 40">
|
||||
<HorizontalStackLayout>
|
||||
<ImageButton
|
||||
Grid.Column="0"
|
||||
|
||||
HeightRequest="50"
|
||||
WidthRequest="50"
|
||||
Source="arrow_back.svg"
|
||||
Clicked="OnBackButtonClicked"/>
|
||||
</HorizontalStackLayout>
|
||||
<Label
|
||||
Margin="-40,10,0,0"
|
||||
Grid.Column="1"
|
||||
FontSize="24"
|
||||
TextColor="{StaticResource TextColorPrimary}"
|
||||
Text="Forgot Password"
|
||||
FontFamily="PoppinsBold"
|
||||
VerticalOptions="Start"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Email entry -->
|
||||
<Grid
|
||||
Grid.Row="1"
|
||||
RowDefinitions="*, Auto, Auto"
|
||||
>
|
||||
|
||||
<Label
|
||||
|
||||
Grid.Row="0"
|
||||
FontSize="15"
|
||||
TextColor="{StaticResource TextColorSecondary}"
|
||||
Text="Enter your email here : "
|
||||
FontFamily="PoppinsBold"
|
||||
VerticalOptions="Center"/>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Style="{StaticResource SecondaryBorder}"
|
||||
Margin="0,30,0,20">
|
||||
<Grid
|
||||
Padding="5"
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||
ColumnDefinitions="Auto,Auto,*">
|
||||
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Source="email_icon.svg">
|
||||
</Image>
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Grid.Column="2"
|
||||
Placeholder="User Name"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<VerticalStackLayout
|
||||
Grid.Row="2"
|
||||
VerticalOptions="End">
|
||||
<Border
|
||||
Margin="0, 30, 0, 0"
|
||||
Stroke="{StaticResource BackgroundPrimary}"
|
||||
StrokeShape="RoundRectangle 12">
|
||||
<Button
|
||||
BackgroundColor="{StaticResource ActionButton}"
|
||||
FontFamily="PoppinsMedium"
|
||||
TextColor="White"
|
||||
Text="Recup my Password"/>
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
</Grid>
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
<!-- Sendmail grid -->
|
||||
<Grid
|
||||
Grid.Row="2"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto"
|
||||
RowSpacing="10">
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
Margin="20"
|
||||
Text="A recuperation code as been send to your email address ! "
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="LightGreen"/>
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Text="Enter the code here"
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Style="{StaticResource SecondaryBorder}"
|
||||
>
|
||||
<Grid
|
||||
Padding="5"
|
||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||
ColumnDefinitions="Auto,Auto,*">
|
||||
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Source="code.png">
|
||||
</Image>
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Grid.Column="2"
|
||||
Placeholder="Code"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Text="Enter new Password here"
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
<Border
|
||||
Grid.Row="4"
|
||||
Style="{StaticResource SecondaryBorderShadow}">
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Placeholder="New password"/>
|
||||
</Border>
|
||||
<Label
|
||||
Grid.Row="5"
|
||||
Text="Confirm your new Password here"
|
||||
FontFamily="PoppinsBold"
|
||||
TextColor="{StaticResource TextColorSecondary}"/>
|
||||
<Border
|
||||
Grid.Row="6"
|
||||
Style="{StaticResource SecondaryBorderShadow}">
|
||||
<Entry
|
||||
Style="{StaticResource UserInput}"
|
||||
Placeholder="New password"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!-- Save button -->
|
||||
|
||||
<VerticalStackLayout
|
||||
Grid.Row="3"
|
||||
VerticalOptions="End">
|
||||
<Border
|
||||
Margin="0, 30, 0, 0"
|
||||
Stroke="{StaticResource BackgroundPrimary}"
|
||||
StrokeShape="RoundRectangle 12">
|
||||
<Button
|
||||
BackgroundColor="{StaticResource ActionButton}"
|
||||
FontFamily="PoppinsMedium"
|
||||
TextColor="White"
|
||||
Text="Save Change"/>
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</ScrollView>
|
||||
</ContentPage>
|
@ -1,9 +1,13 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class ForgotPassword : ContentPage
|
||||
{
|
||||
public ForgotPassword()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class ForgotPassword : ContentPage
|
||||
{
|
||||
public ForgotPassword()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private async void OnBackButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
await Navigation.PopAsync();
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
namespace ShoopNCook.Views;
|
||||
|
||||
public partial class HeadedButton : ContentView
|
||||
{
|
||||
|
||||
private readonly BindableProperty TextProperty =
|
||||
BindableProperty.Create(nameof(BtnLabel), typeof(string), typeof(HeadedButton), "No Text Defined.");
|
||||
|
||||
private readonly BindableProperty HeadColorProperty =
|
||||
BindableProperty.Create(nameof(PrefixBorder), typeof(string), typeof(HeadedButton), "#FFFFFF");
|
||||
|
||||
private readonly BindableProperty HeadSourceProperty =
|
||||
BindableProperty.Create(nameof(PrefixImage), typeof(string), typeof(HeadedButton), default(string));
|
||||
|
||||
public string Text
|
||||
{
|
||||
get => (string)GetValue(TextProperty);
|
||||
set => SetValue(TextProperty, value);
|
||||
}
|
||||
|
||||
public string HeadColor
|
||||
{
|
||||
get => (string)GetValue(HeadColorProperty);
|
||||
set => SetValue(HeadColorProperty, value);
|
||||
}
|
||||
|
||||
public string HeadSource
|
||||
{
|
||||
get => (string)GetValue(HeadSourceProperty);
|
||||
set => SetValue(HeadSourceProperty, value);
|
||||
}
|
||||
|
||||
public HeadedButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class HomePage : ContentPage
|
||||
{
|
||||
public HomePage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private async void OnSyncButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.Navigation.PushAsync(new SearchPage());
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class LoginPage : ContentPage
|
||||
{
|
||||
public LoginPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private async void OnLoginButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
// Vérifiez les informations d'identification de l'utilisateur ici
|
||||
bool isValidUser = true;
|
||||
|
||||
if (isValidUser)
|
||||
{
|
||||
await Shell.Current.GoToAsync("//HomePage");
|
||||
}
|
||||
}
|
||||
private async void ForgotPasswordTapped(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.Navigation.PushAsync(new ForgotPassword());
|
||||
}
|
||||
private async void RegisterLabbelTapped(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.GoToAsync("//RegisterPage");
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="ShoopNCook.Pages.MorePage"
|
||||
BackgroundColor="{StaticResource BackgroundPrimary}"
|
||||
xmlns:views="clr-namespace:ShoopNCook.Views"
|
||||
Title="MorePage">
|
||||
|
||||
<Grid
|
||||
RowDefinitions="Auto, *"
|
||||
Padding="20, 50, 20, 20">
|
||||
<!-- Profile picture and name -->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
ColumnDefinitions="*, 2*"
|
||||
ColumnSpacing="30">
|
||||
|
||||
<Image
|
||||
x:Name="ProfileImage"/>
|
||||
|
||||
<Label
|
||||
x:Name="ProfileName"
|
||||
Grid.Column="1"
|
||||
FontSize="24"
|
||||
VerticalTextAlignment="Center"
|
||||
TextColor="{StaticResource TextColorPrimary}"
|
||||
FontFamily="Poppins"/>
|
||||
</Grid>
|
||||
|
||||
<VerticalStackLayout
|
||||
Grid.Row="1"
|
||||
VerticalOptions="Center"
|
||||
Margin="40, 0, 0, 0">
|
||||
<Grid>
|
||||
<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer Tapped="OnMyRecipesButtonTapped"/>
|
||||
</Grid.GestureRecognizers>
|
||||
<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"/>
|
||||
</Grid>
|
||||
|
||||
<views:HeadedButton Text="Dark Mode" HeadSource="moon_white.svg" HeadColor="#FFFFFF"/>
|
||||
<Grid>
|
||||
<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer Tapped="OnShareButtonClicked"/>
|
||||
</Grid.GestureRecognizers>
|
||||
<views:HeadedButton Text="Share App" HeadSource="share.svg" HeadColor="#fe33bf"/>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.GestureRecognizers>
|
||||
<TapGestureRecognizer Tapped="OnLogoutButtonTapped"/>
|
||||
</Grid.GestureRecognizers>
|
||||
<views:HeadedButton Text="Logout" HeadSource="logout_arrow.svg" HeadColor="#FF5441"/>
|
||||
</Grid>
|
||||
</VerticalStackLayout>
|
||||
</Grid>
|
||||
</ContentPage>
|
@ -0,0 +1,37 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class MorePage : ContentPage
|
||||
{
|
||||
public MorePage(): this("Adom Shafi", ImageSource.FromFile("default_profile_picture.png"))
|
||||
{
|
||||
}
|
||||
|
||||
public MorePage(string userName, ImageSource userImage)
|
||||
{
|
||||
InitializeComponent();
|
||||
ProfileImage.Source = userImage;
|
||||
ProfileName.Text = userName;
|
||||
}
|
||||
private async void OnMyRecipesButtonTapped(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.Navigation.PushAsync(new MyRecipesPage());
|
||||
}
|
||||
|
||||
private async void OnEditProfileButtonTapped(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.Navigation.PushAsync(new ProfilePage());
|
||||
}
|
||||
|
||||
private async void OnLogoutButtonTapped(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.GoToAsync("//LoginPage");
|
||||
}
|
||||
private async void OnShareButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
await Share.RequestAsync(new ShareTextRequest
|
||||
{
|
||||
Text = "Voici le texte à partager (à changer)",
|
||||
Title = "Partagez ce texte : (à modifier)"
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class MyRecipesPage : ContentPage
|
||||
{
|
||||
public MyRecipesPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
private async void OnBackButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
await Navigation.PopAsync();
|
||||
}
|
||||
private async void AddRecipeButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.Navigation.PushAsync(new CreateRecipePage());
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class RegisterPage : ContentPage
|
||||
{
|
||||
public RegisterPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private async void LoginTapped(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.GoToAsync("//LoginPage");
|
||||
}
|
||||
private async void RegisterTapped(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.GoToAsync("//LoginPage");
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class Splash : ContentPage
|
||||
{
|
||||
public Splash()
|
||||
{
|
||||
InitializeComponent();
|
||||
NavigationPage.SetHasNavigationBar(this, false);
|
||||
|
||||
}
|
||||
private async void OnGetStartedButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.GoToAsync("//LoginPage");
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue