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" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="ShoopNCook.Views.StepEntry">
|
x:Class="ShoopNCook.Views.StepEntry">
|
||||||
<VerticalStackLayout>
|
<VerticalStackLayout>
|
||||||
<HorizontalStackLayout>
|
<HorizontalStackLayout>
|
||||||
<Label
|
<Label
|
||||||
Style="{StaticResource h3}"
|
Style="{StaticResource h3}"
|
||||||
Text="Step"
|
Text="Step"
|
||||||
Margin="0, 0, 2, 0"/>
|
Margin="0, 0, 2, 0"/>
|
||||||
|
|
||||||
<Label
|
<Label
|
||||||
Style="{StaticResource h3}"
|
Style="{StaticResource h3}"
|
||||||
x:Name="OrdinalLabel"/>
|
x:Name="OrdinalLabel"/>
|
||||||
</HorizontalStackLayout>
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
<Border
|
<Border
|
||||||
StrokeShape="RoundRectangle 5"
|
StrokeShape="RoundRectangle 5"
|
||||||
Stroke="Gray"
|
Stroke="Gray"
|
||||||
BackgroundColor="{StaticResource BackgroundSecondary}">
|
BackgroundColor="{StaticResource BackgroundSecondary}">
|
||||||
<Editor
|
<Editor
|
||||||
MaxLength="10000"
|
MaxLength="10000"
|
||||||
Style="{StaticResource UserInput}"
|
Style="{StaticResource UserInput}"
|
||||||
AutoSize="TextChanges"
|
AutoSize="TextChanges"
|
||||||
FontSize="15"/>
|
FontSize="15"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</VerticalStackLayout>
|
</VerticalStackLayout>
|
||||||
</ContentView>
|
</ContentView>
|
@ -1,19 +1,19 @@
|
|||||||
namespace ShoopNCook.Views;
|
namespace ShoopNCook.Views;
|
||||||
|
|
||||||
public partial class StepEntry : ContentView
|
public partial class StepEntry : ContentView
|
||||||
{
|
{
|
||||||
|
|
||||||
public StepEntry(): this(1)
|
public StepEntry(): this(1)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public StepEntry(uint ordinal)
|
public StepEntry(uint ordinal)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Ordinal = ordinal;
|
Ordinal = ordinal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint Ordinal {
|
public uint Ordinal {
|
||||||
get => uint.Parse(OrdinalLabel.Text);
|
get => uint.Parse(OrdinalLabel.Text);
|
||||||
set => OrdinalLabel.Text = value.ToString();
|
set => OrdinalLabel.Text = value.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,170 +1,171 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="ShoopNCook.Pages.ForgotPassword"
|
x:Class="ShoopNCook.Pages.ForgotPassword"
|
||||||
Title="ForgotPassword"
|
Title="ForgotPassword"
|
||||||
BackgroundColor="{StaticResource BackgroundPrimary}">
|
BackgroundColor="{StaticResource BackgroundPrimary}">
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<Grid
|
<Grid
|
||||||
Padding="20"
|
Padding="20"
|
||||||
RowDefinitions="Auto, Auto, Auto, *">
|
RowDefinitions="Auto, Auto, Auto, *">
|
||||||
|
|
||||||
<!-- Profile label and return button -->
|
<!-- Profile label and return button -->
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
RowDefinitions="Auto, *"
|
RowDefinitions="Auto, *"
|
||||||
ColumnDefinitions="*, 1.5*"
|
ColumnDefinitions="*, 1.5*"
|
||||||
Margin="0, 0, 0, 40">
|
Margin="0, 0, 0, 40">
|
||||||
<HorizontalStackLayout>
|
<HorizontalStackLayout>
|
||||||
<ImageButton
|
<ImageButton
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
|
|
||||||
HeightRequest="50"
|
HeightRequest="50"
|
||||||
WidthRequest="50"
|
WidthRequest="50"
|
||||||
Source="arrow_back.svg"/>
|
Source="arrow_back.svg"
|
||||||
</HorizontalStackLayout>
|
Clicked="OnBackButtonClicked"/>
|
||||||
<Label
|
</HorizontalStackLayout>
|
||||||
Margin="-40,10,0,0"
|
<Label
|
||||||
Grid.Column="1"
|
Margin="-40,10,0,0"
|
||||||
FontSize="24"
|
Grid.Column="1"
|
||||||
TextColor="{StaticResource TextColorPrimary}"
|
FontSize="24"
|
||||||
Text="Forgot Password"
|
TextColor="{StaticResource TextColorPrimary}"
|
||||||
FontFamily="PoppinsBold"
|
Text="Forgot Password"
|
||||||
VerticalOptions="Start"/>
|
FontFamily="PoppinsBold"
|
||||||
</Grid>
|
VerticalOptions="Start"/>
|
||||||
|
</Grid>
|
||||||
<!-- Email entry -->
|
|
||||||
<Grid
|
<!-- Email entry -->
|
||||||
Grid.Row="1"
|
<Grid
|
||||||
RowDefinitions="*, Auto, Auto"
|
Grid.Row="1"
|
||||||
>
|
RowDefinitions="*, Auto, Auto"
|
||||||
|
>
|
||||||
<Label
|
|
||||||
|
<Label
|
||||||
Grid.Row="0"
|
|
||||||
FontSize="15"
|
Grid.Row="0"
|
||||||
TextColor="{StaticResource TextColorSecondary}"
|
FontSize="15"
|
||||||
Text="Enter your email here : "
|
TextColor="{StaticResource TextColorSecondary}"
|
||||||
FontFamily="PoppinsBold"
|
Text="Enter your email here : "
|
||||||
VerticalOptions="Center"/>
|
FontFamily="PoppinsBold"
|
||||||
<Border
|
VerticalOptions="Center"/>
|
||||||
Grid.Row="1"
|
<Border
|
||||||
Style="{StaticResource SecondaryBorder}"
|
Grid.Row="1"
|
||||||
Margin="0,30,0,20">
|
Style="{StaticResource SecondaryBorder}"
|
||||||
<Grid
|
Margin="0,30,0,20">
|
||||||
Padding="5"
|
<Grid
|
||||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
Padding="5"
|
||||||
ColumnDefinitions="Auto,Auto,*">
|
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||||
|
ColumnDefinitions="Auto,Auto,*">
|
||||||
<Image
|
|
||||||
Grid.Column="1"
|
<Image
|
||||||
Source="email_icon.svg">
|
Grid.Column="1"
|
||||||
</Image>
|
Source="email_icon.svg">
|
||||||
<Entry
|
</Image>
|
||||||
Style="{StaticResource UserInput}"
|
<Entry
|
||||||
Grid.Column="2"
|
Style="{StaticResource UserInput}"
|
||||||
Placeholder="User Name"/>
|
Grid.Column="2"
|
||||||
</Grid>
|
Placeholder="User Name"/>
|
||||||
</Border>
|
</Grid>
|
||||||
|
</Border>
|
||||||
<VerticalStackLayout
|
|
||||||
Grid.Row="2"
|
<VerticalStackLayout
|
||||||
VerticalOptions="End">
|
Grid.Row="2"
|
||||||
<Border
|
VerticalOptions="End">
|
||||||
Margin="0, 30, 0, 0"
|
<Border
|
||||||
Stroke="{StaticResource BackgroundPrimary}"
|
Margin="0, 30, 0, 0"
|
||||||
StrokeShape="RoundRectangle 12">
|
Stroke="{StaticResource BackgroundPrimary}"
|
||||||
<Button
|
StrokeShape="RoundRectangle 12">
|
||||||
BackgroundColor="{StaticResource ActionButton}"
|
<Button
|
||||||
FontFamily="PoppinsMedium"
|
BackgroundColor="{StaticResource ActionButton}"
|
||||||
TextColor="White"
|
FontFamily="PoppinsMedium"
|
||||||
Text="Recup my Password"/>
|
TextColor="White"
|
||||||
</Border>
|
Text="Recup my Password"/>
|
||||||
</VerticalStackLayout>
|
</Border>
|
||||||
</Grid>
|
</VerticalStackLayout>
|
||||||
<Grid>
|
</Grid>
|
||||||
|
<Grid>
|
||||||
</Grid>
|
|
||||||
<!-- Sendmail grid -->
|
</Grid>
|
||||||
<Grid
|
<!-- Sendmail grid -->
|
||||||
Grid.Row="2"
|
<Grid
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto"
|
Grid.Row="2"
|
||||||
RowSpacing="10">
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto"
|
||||||
<Label
|
RowSpacing="10">
|
||||||
Grid.Row="0"
|
<Label
|
||||||
Margin="20"
|
Grid.Row="0"
|
||||||
Text="A recuperation code as been send to your email address ! "
|
Margin="20"
|
||||||
FontFamily="PoppinsBold"
|
Text="A recuperation code as been send to your email address ! "
|
||||||
TextColor="LightGreen"/>
|
FontFamily="PoppinsBold"
|
||||||
<Label
|
TextColor="LightGreen"/>
|
||||||
Grid.Row="1"
|
<Label
|
||||||
Text="Enter the code here"
|
Grid.Row="1"
|
||||||
FontFamily="PoppinsBold"
|
Text="Enter the code here"
|
||||||
TextColor="{StaticResource TextColorSecondary}"/>
|
FontFamily="PoppinsBold"
|
||||||
<Border
|
TextColor="{StaticResource TextColorSecondary}"/>
|
||||||
Grid.Row="2"
|
<Border
|
||||||
Style="{StaticResource SecondaryBorder}"
|
Grid.Row="2"
|
||||||
>
|
Style="{StaticResource SecondaryBorder}"
|
||||||
<Grid
|
>
|
||||||
Padding="5"
|
<Grid
|
||||||
BackgroundColor="{StaticResource BackgroundSecondary}"
|
Padding="5"
|
||||||
ColumnDefinitions="Auto,Auto,*">
|
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||||
|
ColumnDefinitions="Auto,Auto,*">
|
||||||
<Image
|
|
||||||
Grid.Column="1"
|
<Image
|
||||||
Source="code.png">
|
Grid.Column="1"
|
||||||
</Image>
|
Source="code.png">
|
||||||
<Entry
|
</Image>
|
||||||
Style="{StaticResource UserInput}"
|
<Entry
|
||||||
Grid.Column="2"
|
Style="{StaticResource UserInput}"
|
||||||
Placeholder="Code"/>
|
Grid.Column="2"
|
||||||
</Grid>
|
Placeholder="Code"/>
|
||||||
</Border>
|
</Grid>
|
||||||
<Label
|
</Border>
|
||||||
Grid.Row="3"
|
<Label
|
||||||
Text="Enter new Password here"
|
Grid.Row="3"
|
||||||
FontFamily="PoppinsBold"
|
Text="Enter new Password here"
|
||||||
TextColor="{StaticResource TextColorSecondary}"/>
|
FontFamily="PoppinsBold"
|
||||||
<Border
|
TextColor="{StaticResource TextColorSecondary}"/>
|
||||||
Grid.Row="4"
|
<Border
|
||||||
Style="{StaticResource SecondaryBorderShadow}">
|
Grid.Row="4"
|
||||||
<Entry
|
Style="{StaticResource SecondaryBorderShadow}">
|
||||||
Style="{StaticResource UserInput}"
|
<Entry
|
||||||
Placeholder="New password"/>
|
Style="{StaticResource UserInput}"
|
||||||
</Border>
|
Placeholder="New password"/>
|
||||||
<Label
|
</Border>
|
||||||
Grid.Row="5"
|
<Label
|
||||||
Text="Confirm your new Password here"
|
Grid.Row="5"
|
||||||
FontFamily="PoppinsBold"
|
Text="Confirm your new Password here"
|
||||||
TextColor="{StaticResource TextColorSecondary}"/>
|
FontFamily="PoppinsBold"
|
||||||
<Border
|
TextColor="{StaticResource TextColorSecondary}"/>
|
||||||
Grid.Row="6"
|
<Border
|
||||||
Style="{StaticResource SecondaryBorderShadow}">
|
Grid.Row="6"
|
||||||
<Entry
|
Style="{StaticResource SecondaryBorderShadow}">
|
||||||
Style="{StaticResource UserInput}"
|
<Entry
|
||||||
Placeholder="New password"/>
|
Style="{StaticResource UserInput}"
|
||||||
</Border>
|
Placeholder="New password"/>
|
||||||
</Grid>
|
</Border>
|
||||||
|
</Grid>
|
||||||
<!-- Save button -->
|
|
||||||
|
<!-- Save button -->
|
||||||
<VerticalStackLayout
|
|
||||||
Grid.Row="3"
|
<VerticalStackLayout
|
||||||
VerticalOptions="End">
|
Grid.Row="3"
|
||||||
<Border
|
VerticalOptions="End">
|
||||||
Margin="0, 30, 0, 0"
|
<Border
|
||||||
Stroke="{StaticResource BackgroundPrimary}"
|
Margin="0, 30, 0, 0"
|
||||||
StrokeShape="RoundRectangle 12">
|
Stroke="{StaticResource BackgroundPrimary}"
|
||||||
<Button
|
StrokeShape="RoundRectangle 12">
|
||||||
BackgroundColor="{StaticResource ActionButton}"
|
<Button
|
||||||
FontFamily="PoppinsMedium"
|
BackgroundColor="{StaticResource ActionButton}"
|
||||||
TextColor="White"
|
FontFamily="PoppinsMedium"
|
||||||
Text="Save Change"/>
|
TextColor="White"
|
||||||
</Border>
|
Text="Save Change"/>
|
||||||
</VerticalStackLayout>
|
</Border>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
</Grid>
|
||||||
</ScrollView>
|
|
||||||
|
</ScrollView>
|
||||||
</ContentPage>
|
</ContentPage>
|
@ -1,9 +1,13 @@
|
|||||||
namespace ShoopNCook.Pages;
|
namespace ShoopNCook.Pages;
|
||||||
|
|
||||||
public partial class ForgotPassword : ContentPage
|
public partial class ForgotPassword : ContentPage
|
||||||
{
|
{
|
||||||
public ForgotPassword()
|
public ForgotPassword()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
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