@ -1,48 +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.MainPage">
|
|
||||||
|
|
||||||
<ScrollView>
|
|
||||||
<VerticalStackLayout
|
|
||||||
Spacing="25"
|
|
||||||
Padding="30,0"
|
|
||||||
VerticalOptions="Center">
|
|
||||||
|
|
||||||
<Image
|
|
||||||
Source="dotnet_bot.png"
|
|
||||||
SemanticProperties.Description="Cute dot net bot waving hi to you!"
|
|
||||||
HeightRequest="200"
|
|
||||||
HorizontalOptions="Center" />
|
|
||||||
|
|
||||||
<Label
|
|
||||||
Text="Hello, World!"
|
|
||||||
SemanticProperties.HeadingLevel="Level1"
|
|
||||||
FontSize="32"
|
|
||||||
HorizontalOptions="Center" />
|
|
||||||
|
|
||||||
<Label
|
|
||||||
Text="Welcome to .NET Multi-platform App UI"
|
|
||||||
SemanticProperties.HeadingLevel="Level2"
|
|
||||||
SemanticProperties.Description="Welcome to dot net Multi platform App U I"
|
|
||||||
FontSize="18"
|
|
||||||
HorizontalOptions="Center" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
x:Name="CounterBtn"
|
|
||||||
Text="Click me !"
|
|
||||||
SemanticProperties.Hint="Counts the number of times you click"
|
|
||||||
Clicked="OnCounterClicked"
|
|
||||||
HorizontalOptions="Center" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
x:Name="RedirectBtn"
|
|
||||||
Text="Goto page 2"
|
|
||||||
SemanticProperties.Hint="Goto page 2"
|
|
||||||
Clicked="OnCounterClicked"
|
|
||||||
HorizontalOptions="Center" />
|
|
||||||
|
|
||||||
</VerticalStackLayout>
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</ContentPage>
|
|
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 770 B |
After Width: | Height: | Size: 900 B |
After Width: | Height: | Size: 972 B |
After Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 896 B After Width: | Height: | Size: 485 B |
After Width: | Height: | Size: 464 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 852 B |
@ -0,0 +1,54 @@
|
|||||||
|
<?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.Views.FavoritesPage"
|
||||||
|
Title="FavoritesPage"
|
||||||
|
xmlns:views="clr-namespace:ShoopNCook.Views"
|
||||||
|
BackgroundColor="{StaticResource BackgroundPrimary}">
|
||||||
|
|
||||||
|
<Grid
|
||||||
|
RowDefinitions="Auto, *">
|
||||||
|
<!-- Header label and return button -->
|
||||||
|
<Grid
|
||||||
|
Grid.Row="0"
|
||||||
|
ColumnDefinitions="Auto, *"
|
||||||
|
Padding="10, 20, 0, 30">
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
Grid.Column="0"
|
||||||
|
HeightRequest="50"
|
||||||
|
WidthRequest="50"
|
||||||
|
Source="arrow_back.svg"/>
|
||||||
|
<Label
|
||||||
|
Grid.Column="1"
|
||||||
|
FontSize="24"
|
||||||
|
TextColor="{StaticResource TextColorPrimary}"
|
||||||
|
Text="Favorites recipes"
|
||||||
|
FontFamily="PoppinsBold"
|
||||||
|
HorizontalOptions="Center"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Favorite items -->
|
||||||
|
<ScrollView
|
||||||
|
Grid.Row="1">
|
||||||
|
<FlexLayout
|
||||||
|
JustifyContent="Center"
|
||||||
|
AlignItems="Start"
|
||||||
|
AlignContent="Start"
|
||||||
|
Direction="Row"
|
||||||
|
Wrap="Wrap">
|
||||||
|
|
||||||
|
<views:RecipeView Margin="5" Note="4.5" Title="Spaghetti Bolognese" Subtitle="30 min"/>
|
||||||
|
<views:RecipeView Margin="5" Note="3" Title="Chickend Curry" Subtitle="45 min"/>
|
||||||
|
<views:RecipeView Margin="5" Note="0.2" Title="Beef Stroganoff" Subtitle="10 min"/>
|
||||||
|
<views:RecipeView Margin="5" Note="1.6" Title="Fish And Ships" Subtitle="15 min"/>
|
||||||
|
<views:RecipeView Margin="5" Note="5" Title="Caesar Salad" Subtitle="20 min"/>
|
||||||
|
<views:RecipeView Margin="5" Note="3.5" Title="Vegetables" Subtitle="60 min"/>
|
||||||
|
<views:RecipeView Margin="5" Note="4.6" Title="Guacamole" Subtitle="90 min"/>
|
||||||
|
<views:RecipeView Margin="5" Note="4" Title="Pad Thai" Subtitle="10 min"/>
|
||||||
|
<views:RecipeView Margin="5" Note="3" Title="French Toast" Subtitle="5 min"/>
|
||||||
|
<views:RecipeView Margin="5" Note="2" Title="Margherita Pizza" Subtitle="2 min"/>
|
||||||
|
</FlexLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</Grid>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace ShoopNCook.Views;
|
||||||
|
|
||||||
|
public partial class FavoritesPage : ContentPage
|
||||||
|
{
|
||||||
|
public FavoritesPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
<?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.IngredientView"
|
||||||
|
x:Name="Ingredient">
|
||||||
|
<HorizontalStackLayout
|
||||||
|
Spacing="2">
|
||||||
|
<Label
|
||||||
|
Text="•"
|
||||||
|
Style="{StaticResource Small}"/>
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Text="{Binding Name, Source={x:Reference Ingredient}}"
|
||||||
|
Style="{StaticResource Small}"/>
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Text="{Binding Quantity, Source={x:Reference Ingredient}}"
|
||||||
|
Style="{StaticResource Small}"/>
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Text="{Binding Unit, Source={x:Reference Ingredient}}"
|
||||||
|
Style="{StaticResource Small}"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
</ContentView>
|
@ -0,0 +1,41 @@
|
|||||||
|
namespace ShoopNCook.Views;
|
||||||
|
|
||||||
|
public partial class IngredientView : ContentView
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly BindableProperty NameProperty =
|
||||||
|
BindableProperty.Create(nameof(Name), typeof(string), typeof(IngredientView), default(string));
|
||||||
|
|
||||||
|
private readonly BindableProperty QuantityProperty =
|
||||||
|
BindableProperty.Create(nameof(Quantity), typeof(float), typeof(IngredientView), default(float));
|
||||||
|
|
||||||
|
private readonly BindableProperty UnitProperty =
|
||||||
|
BindableProperty.Create(nameof(Unit), typeof(string), typeof(IngredientView), default(string));
|
||||||
|
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get => (string)GetValue(NameProperty);
|
||||||
|
set => SetValue(NameProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public float Quantity
|
||||||
|
{
|
||||||
|
get => (float)GetValue(QuantityProperty);
|
||||||
|
set => SetValue(QuantityProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Unit
|
||||||
|
{
|
||||||
|
get => (string)GetValue(UnitProperty);
|
||||||
|
set => SetValue(UnitProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IngredientView(string name, float quantity, string unit)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
Name = name;
|
||||||
|
Quantity = quantity;
|
||||||
|
Unit = unit;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,213 @@
|
|||||||
|
<?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.Views.RecipePage"
|
||||||
|
Title="RecipePage"
|
||||||
|
x:Name="RecipeViewPage"
|
||||||
|
BackgroundColor="{StaticResource BackgroundPrimary}">
|
||||||
|
|
||||||
|
<Grid
|
||||||
|
RowDefinitions="90*, 10*"
|
||||||
|
Padding="10"
|
||||||
|
>
|
||||||
|
|
||||||
|
<!--Main content-->
|
||||||
|
<ScrollView>
|
||||||
|
<Grid
|
||||||
|
RowDefinitions="*, Auto, Auto, 0.5*">
|
||||||
|
<FlexLayout
|
||||||
|
Grid.Row="0"
|
||||||
|
Direction="Row"
|
||||||
|
JustifyContent="SpaceBetween"
|
||||||
|
AlignContent="Center"
|
||||||
|
AlignItems="Center">
|
||||||
|
<ImageButton
|
||||||
|
Source="arrow_back.svg"/>
|
||||||
|
<Label
|
||||||
|
Style="{StaticResource h1}"
|
||||||
|
x:Name="RecipeName"
|
||||||
|
Text="Recipe name"/>
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
x:Name="Favorite"
|
||||||
|
Source="hearth_off.svg"
|
||||||
|
Margin="0, 0, 5, 0"
|
||||||
|
Clicked="OnFavorite"/>
|
||||||
|
</FlexLayout>
|
||||||
|
|
||||||
|
<!--Recipe image-->
|
||||||
|
|
||||||
|
<Border
|
||||||
|
Grid.Row="1"
|
||||||
|
Margin="10"
|
||||||
|
Stroke="Transparent"
|
||||||
|
StrokeShape="RoundRectangle 20"
|
||||||
|
BackgroundColor="AliceBlue">
|
||||||
|
<Image
|
||||||
|
HeightRequest="250"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!--Steps-->
|
||||||
|
|
||||||
|
<VerticalStackLayout
|
||||||
|
Grid.Row="2"
|
||||||
|
Padding="30, 0, 30, 0">
|
||||||
|
|
||||||
|
<!--Cook time-->
|
||||||
|
<VerticalStackLayout>
|
||||||
|
<HorizontalStackLayout>
|
||||||
|
<Label
|
||||||
|
Style="{StaticResource Small}"
|
||||||
|
Text="Cooking time: "/>
|
||||||
|
<Label
|
||||||
|
Style="{StaticResource Small}"
|
||||||
|
x:Name="CookTime"/>
|
||||||
|
<Label
|
||||||
|
Style="{StaticResource Small}"
|
||||||
|
Text=" min"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
|
<!--Energy-->
|
||||||
|
|
||||||
|
<HorizontalStackLayout>
|
||||||
|
<Label
|
||||||
|
Style="{StaticResource Small}"
|
||||||
|
Text="Energy: "/>
|
||||||
|
<Label
|
||||||
|
Style="{StaticResource Small}"
|
||||||
|
x:Name="Energy"/>
|
||||||
|
<Label
|
||||||
|
Style="{StaticResource Small}"
|
||||||
|
Text="/pers"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
|
||||||
|
<!--Ingredient list-->
|
||||||
|
<Label
|
||||||
|
Style="{StaticResource h2}"
|
||||||
|
Text="Ingredients"/>
|
||||||
|
|
||||||
|
<VerticalStackLayout
|
||||||
|
x:Name="IngredientList"/>
|
||||||
|
|
||||||
|
<!--Step list-->
|
||||||
|
<Label
|
||||||
|
Style="{StaticResource h2}"
|
||||||
|
Text="Preparation steps"/>
|
||||||
|
|
||||||
|
<VerticalStackLayout
|
||||||
|
x:Name="StepList"/>
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
|
||||||
|
<!--Stars-->
|
||||||
|
|
||||||
|
<HorizontalStackLayout
|
||||||
|
Grid.Row="3">
|
||||||
|
<HorizontalStackLayout
|
||||||
|
x:Name="Stars"
|
||||||
|
Spacing="2"
|
||||||
|
Margin="10, 0, 0, 0">
|
||||||
|
<ImageButton
|
||||||
|
WidthRequest="30"
|
||||||
|
Command="{Binding StarCommand, Source={x:Reference RecipeViewPage}}"
|
||||||
|
CommandParameter="1"/>
|
||||||
|
<ImageButton
|
||||||
|
WidthRequest="30"
|
||||||
|
Command="{Binding StarCommand, Source={x:Reference RecipeViewPage}}"
|
||||||
|
CommandParameter="2"/>
|
||||||
|
<ImageButton
|
||||||
|
WidthRequest="30"
|
||||||
|
Command="{Binding StarCommand, Source={x:Reference RecipeViewPage}}"
|
||||||
|
CommandParameter="3"/>
|
||||||
|
<ImageButton
|
||||||
|
WidthRequest="30"
|
||||||
|
Command="{Binding StarCommand, Source={x:Reference RecipeViewPage}}"
|
||||||
|
CommandParameter="4"/>
|
||||||
|
<ImageButton
|
||||||
|
WidthRequest="30"
|
||||||
|
Command="{Binding StarCommand, Source={x:Reference RecipeViewPage}}"
|
||||||
|
CommandParameter="5"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
<Border
|
||||||
|
Margin="12, 0, 0, 0"
|
||||||
|
Stroke="Transparent"
|
||||||
|
StrokeShape="RoundRectangle 150">
|
||||||
|
<Button
|
||||||
|
FontFamily="PoppinsMedium"
|
||||||
|
TextColor="White"
|
||||||
|
BackgroundColor="{StaticResource Selected}"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
Text="Submit"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
<!--Footer-->
|
||||||
|
|
||||||
|
<FlexLayout
|
||||||
|
Grid.Row="1"
|
||||||
|
Direction="Row"
|
||||||
|
JustifyContent="SpaceBetween"
|
||||||
|
AlignItems="Center"
|
||||||
|
>
|
||||||
|
<Grid
|
||||||
|
ColumnDefinitions="*, Auto, *">
|
||||||
|
|
||||||
|
<Border
|
||||||
|
Grid.Column="0"
|
||||||
|
Stroke="Transparent"
|
||||||
|
StrokeShape="RoundRectangle 100"
|
||||||
|
BackgroundColor="{StaticResource Selected}">
|
||||||
|
<ImageButton
|
||||||
|
Source="minus.svg"
|
||||||
|
WidthRequest="40"
|
||||||
|
HeightRequest="40"
|
||||||
|
Clicked="OnMinus"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<HorizontalStackLayout
|
||||||
|
Grid.Column="1">
|
||||||
|
<Label
|
||||||
|
x:Name="NbPersLabel"
|
||||||
|
Text="1"
|
||||||
|
Margin="10, 0, 0, 0"
|
||||||
|
TextColor="{StaticResource TextColorPrimary}"
|
||||||
|
VerticalTextAlignment="Center"
|
||||||
|
FontFamily="PoppinsMedium"/>
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Text=" pers"
|
||||||
|
Margin="0, 0, 10, 0"
|
||||||
|
TextColor="{StaticResource TextColorPrimary}"
|
||||||
|
VerticalTextAlignment="Center"
|
||||||
|
FontFamily="PoppinsMedium"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
|
<Border
|
||||||
|
Grid.Column="2"
|
||||||
|
Stroke="Transparent"
|
||||||
|
StrokeShape="RoundRectangle 100"
|
||||||
|
BackgroundColor="{StaticResource Selected}">
|
||||||
|
<ImageButton
|
||||||
|
Source="plus.svg"
|
||||||
|
WidthRequest="40"
|
||||||
|
HeightRequest="40"
|
||||||
|
Clicked="OnPlus"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Grid.Column="1"
|
||||||
|
Text="Add to list"
|
||||||
|
Style="{StaticResource UserButton}"
|
||||||
|
TextColor="White"
|
||||||
|
BackgroundColor="Gray">
|
||||||
|
</Button>
|
||||||
|
</FlexLayout>
|
||||||
|
</Grid>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,115 @@
|
|||||||
|
using Microsoft.Maui.Controls;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace ShoopNCook.Views;
|
||||||
|
|
||||||
|
public partial class RecipePage : ContentPage
|
||||||
|
{
|
||||||
|
|
||||||
|
private uint note;
|
||||||
|
private uint nbPers;
|
||||||
|
private bool isFavorite;
|
||||||
|
|
||||||
|
public ICommand StarCommand => new Command<string>(count =>
|
||||||
|
{
|
||||||
|
SetNote(uint.Parse(count));
|
||||||
|
});
|
||||||
|
|
||||||
|
public RecipePage() :
|
||||||
|
this("Recipe Sample", 32, 250,
|
||||||
|
true, 2, 0,
|
||||||
|
new List<IngredientView> {
|
||||||
|
new IngredientView("Chocolate", 25, "g"),
|
||||||
|
new IngredientView("Flour", 250, "g"),
|
||||||
|
new IngredientView("Sugar", 0.5F, "kg")
|
||||||
|
},
|
||||||
|
new List<string> { "This is the first preparation step", "add to furnace and wait", "Enjoy !" }
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
public RecipePage(
|
||||||
|
string name,
|
||||||
|
uint cookTime,
|
||||||
|
uint energy,
|
||||||
|
bool isFavorite,
|
||||||
|
uint nbPers,
|
||||||
|
uint note,
|
||||||
|
List<IngredientView> ingredients,
|
||||||
|
List<string> steps
|
||||||
|
)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
SetNbPers(nbPers);
|
||||||
|
SetFavorite(isFavorite);
|
||||||
|
SetNote(note);
|
||||||
|
|
||||||
|
CookTime.Text = cookTime.ToString();
|
||||||
|
Energy.Text = energy.ToString();
|
||||||
|
RecipeName.Text = name;
|
||||||
|
|
||||||
|
foreach (IngredientView iv in ingredients)
|
||||||
|
IngredientList.Add(iv);
|
||||||
|
|
||||||
|
var styles = Application.Current.Resources.MergedDictionaries.ElementAt(1);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
foreach (string step in steps) {
|
||||||
|
Label label = new Label();
|
||||||
|
label.Style = (Style)styles["Small"];
|
||||||
|
label.Text = "Step " + ++count + ": " + step;
|
||||||
|
StepList.Add(label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetNote(uint note)
|
||||||
|
{
|
||||||
|
this.note = note;
|
||||||
|
int i = 1;
|
||||||
|
foreach (ImageButton img in Stars.Children)
|
||||||
|
{
|
||||||
|
if (i <= note)
|
||||||
|
{
|
||||||
|
img.Source = ImageSource.FromFile("star_full.svg");
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
img.Source = ImageSource.FromFile("star_empty.svg");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnFavorite(object o, EventArgs e)
|
||||||
|
{
|
||||||
|
SetFavorite(!isFavorite);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetFavorite(bool isFavorite)
|
||||||
|
{
|
||||||
|
this.isFavorite = isFavorite;
|
||||||
|
if (isFavorite)
|
||||||
|
{
|
||||||
|
Favorite.Source = ImageSource.FromFile("hearth_on.svg");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Favorite.Source = ImageSource.FromFile("hearth_off.svg");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnPlus(object o, EventArgs e)
|
||||||
|
{
|
||||||
|
SetNbPers(nbPers + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnMinus(object o, EventArgs e)
|
||||||
|
{
|
||||||
|
SetNbPers(nbPers - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetNbPers(uint nbPers)
|
||||||
|
{
|
||||||
|
this.nbPers = nbPers <= 1 ? 1 : nbPers;
|
||||||
|
NbPersLabel.Text = this.nbPers.ToString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,165 @@
|
|||||||
|
<?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.Views.RegisterPage"
|
||||||
|
Title="Register"
|
||||||
|
BackgroundColor="{StaticResource BackgroundPrimary}">
|
||||||
|
<ScrollView>
|
||||||
|
|
||||||
|
<VerticalStackLayout
|
||||||
|
Padding="20, 50, 20, 20">
|
||||||
|
<Label
|
||||||
|
FontFamily="PoppinsBold"
|
||||||
|
Text="Register Account"
|
||||||
|
FontSize="32"
|
||||||
|
TextColor="{StaticResource TextColorPrimary}"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
VerticalOptions="Start"
|
||||||
|
HorizontalOptions="Start" />
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Text="Fill in your credentials or continue with social media"
|
||||||
|
FontFamily="PoppinsBold"
|
||||||
|
FontSize="20"
|
||||||
|
TextColor="{StaticResource TextColorSecondary}"
|
||||||
|
VerticalOptions="Start"
|
||||||
|
HorizontalOptions="Start" />
|
||||||
|
|
||||||
|
<Border
|
||||||
|
Style="{StaticResource SecondaryBorderShadow}"
|
||||||
|
Margin="0,30,0,20">
|
||||||
|
<Grid
|
||||||
|
Padding="5"
|
||||||
|
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||||
|
ColumnDefinitions="Auto,Auto,*">
|
||||||
|
|
||||||
|
<Image
|
||||||
|
Grid.Column="1"
|
||||||
|
Source="user.svg">
|
||||||
|
</Image>
|
||||||
|
<Entry
|
||||||
|
Style="{StaticResource UserInput}"
|
||||||
|
Grid.Column="2"
|
||||||
|
Placeholder="User Name"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border
|
||||||
|
Style="{StaticResource SecondaryBorderShadow}"
|
||||||
|
Margin="0,0,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="Mail address"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border
|
||||||
|
Style="{StaticResource SecondaryBorderShadow}">
|
||||||
|
<Grid
|
||||||
|
Padding="5"
|
||||||
|
BackgroundColor="{StaticResource BackgroundSecondary}"
|
||||||
|
ColumnDefinitions="Auto,Auto,*,Auto">
|
||||||
|
<Image
|
||||||
|
Grid.Column="1"
|
||||||
|
Source="password_icon.svg"/>
|
||||||
|
|
||||||
|
<Entry
|
||||||
|
Style="{StaticResource UserInput}"
|
||||||
|
Grid.Column="2"
|
||||||
|
Placeholder="Password"/>
|
||||||
|
<ImageButton
|
||||||
|
Grid.Column="3"
|
||||||
|
Source="visibility_off.svg"
|
||||||
|
HeightRequest="30"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Label
|
||||||
|
TextColor="{StaticResource TextColorSecondary}"
|
||||||
|
HorizontalOptions="End">
|
||||||
|
Forgot Password ?
|
||||||
|
</Label>
|
||||||
|
|
||||||
|
|
||||||
|
<Border
|
||||||
|
Margin="0, 30, 0, 0"
|
||||||
|
Stroke="{StaticResource BackgroundPrimary}"
|
||||||
|
StrokeShape="RoundRectangle 12">
|
||||||
|
<Button
|
||||||
|
BackgroundColor="{StaticResource ActionButton}"
|
||||||
|
FontFamily="PoppinsMedium"
|
||||||
|
TextColor="White"
|
||||||
|
Text="SIGN UP"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<HorizontalStackLayout
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
Margin="0, 20, 0, 0"
|
||||||
|
Spacing="6">
|
||||||
|
<Rectangle
|
||||||
|
BackgroundColor="Gray"
|
||||||
|
WidthRequest="15"
|
||||||
|
HeightRequest="3"/>
|
||||||
|
<Label
|
||||||
|
TextColor="{StaticResource TextColorSecondary}">
|
||||||
|
Or continue with</Label>
|
||||||
|
<Rectangle
|
||||||
|
BackgroundColor="Gray"
|
||||||
|
WidthRequest="15"
|
||||||
|
HeightRequest="3"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
|
<HorizontalStackLayout
|
||||||
|
Margin="0, 20, 0, 0"
|
||||||
|
Spacing="15"
|
||||||
|
HorizontalOptions="Center">
|
||||||
|
<Border
|
||||||
|
HeightRequest="75"
|
||||||
|
WidthRequest="75"
|
||||||
|
BackgroundColor="#e9f4ff"
|
||||||
|
StrokeShape="RoundRectangle 25 25 25 25"
|
||||||
|
Stroke="{StaticResource BackgroundPrimary}">
|
||||||
|
<Image
|
||||||
|
HeightRequest="50"
|
||||||
|
Source="google_logo.svg"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border
|
||||||
|
HeightRequest="75"
|
||||||
|
WidthRequest="75"
|
||||||
|
BackgroundColor="#4460a0"
|
||||||
|
StrokeShape="RoundRectangle 25 25 25 25"
|
||||||
|
Stroke="{StaticResource BackgroundPrimary}">
|
||||||
|
<Image
|
||||||
|
WidthRequest="40"
|
||||||
|
Source="facebook_logo.svg"/>
|
||||||
|
</Border>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
|
<HorizontalStackLayout
|
||||||
|
Spacing="4"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
Margin="0, 20, 0, 0">
|
||||||
|
<Label
|
||||||
|
TextColor="{StaticResource TextColorPrimary}">
|
||||||
|
Already have an account ?</Label>
|
||||||
|
<Label
|
||||||
|
FontAttributes="Bold"
|
||||||
|
TextColor="{StaticResource TextColorPrimary}">
|
||||||
|
Log In</Label>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</ContentPage>
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace ShoopNCook.Views;
|
||||||
|
|
||||||
|
public partial class RegisterPage : ContentPage
|
||||||
|
{
|
||||||
|
public RegisterPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
@ -1,53 +0,0 @@
|
|||||||
# Diagramme de séquence Shop&Cook
|
|
||||||
|
|
||||||
## Interactions entre Utilisateur, Shop&Cook et API
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
sequenceDiagram
|
|
||||||
participant Utilisateur
|
|
||||||
participant Shop&Cook
|
|
||||||
participant API
|
|
||||||
|
|
||||||
Utilisateur->>+Shop&Cook: Ouvre l'application
|
|
||||||
Shop&Cook->>+Utilisateur: Affiche l'écran de connexion
|
|
||||||
|
|
||||||
Utilisateur->>+Shop&Cook: Se connecte / S'inscrit
|
|
||||||
Shop&Cook->>+API: Valide les informations de connexion / inscription
|
|
||||||
API-->>-Shop&Cook: Retourne le résultat de la validation
|
|
||||||
Shop&Cook-->>-Utilisateur: Affiche l'écran d'accueil ou un message d'erreur
|
|
||||||
|
|
||||||
Utilisateur->>+Shop&Cook: Recherche des recettes avec filtres
|
|
||||||
Shop&Cook->>+API: Récupère les recettes filtrées
|
|
||||||
API-->>-Shop&Cook: Retourne les recettes filtrées
|
|
||||||
Shop&Cook-->>-Utilisateur: Affiche les recettes filtrées
|
|
||||||
|
|
||||||
Utilisateur->>+Shop&Cook: Aime/Ajoute aux favoris une recette
|
|
||||||
Shop&Cook->>+API: Met à jour le statut de la recette
|
|
||||||
API-->>-Shop&Cook: Confirme la mise à jour
|
|
||||||
Shop&Cook-->>-Utilisateur: Met à jour l'affichage de la recette
|
|
||||||
|
|
||||||
Utilisateur->>+Shop&Cook: Accède aux paramètres
|
|
||||||
Shop&Cook-->>-Utilisateur: Affiche les options de paramètres
|
|
||||||
|
|
||||||
Utilisateur->>+Shop&Cook: Change le thème/le mot de passe
|
|
||||||
Shop&Cook->>+API: Enregistre les modifications
|
|
||||||
API-->>-Shop&Cook: Confirme l'enregistrement
|
|
||||||
Shop&Cook-->>-Utilisateur: Met à jour l'affichage et confirme les modifications
|
|
||||||
|
|
||||||
Utilisateur->>+Shop&Cook: Clique sur une recette
|
|
||||||
Shop&Cook->>+API: Récupère les détails de la recette
|
|
||||||
API-->>-Shop&Cook: Retourne les détails de la recette
|
|
||||||
Shop&Cook-->>-Utilisateur: Affiche les détails de la recette
|
|
||||||
|
|
||||||
Utilisateur->>+Shop&Cook: Choisit le nombre de personnes et ajoute au panier
|
|
||||||
Shop&Cook-->>-Utilisateur: Met à jour le panier
|
|
||||||
|
|
||||||
Utilisateur->>+Shop&Cook: Planifie un repas pour un jour de la semaine
|
|
||||||
Shop&Cook-->>-Utilisateur: Met à jour le planning
|
|
||||||
|
|
||||||
Utilisateur->>+Shop&Cook: Génère la liste de courses
|
|
||||||
Shop&Cook->>+API: Récupère les ingrédients nécessaires
|
|
||||||
API-->>-Shop&Cook: Retourne la liste des ingrédients
|
|
||||||
Shop&Cook-->>-Utilisateur: Affiche la liste de courses
|
|
||||||
|
|
||||||
```
|
|
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 203 KiB |
After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 151 KiB |
After Width: | Height: | Size: 161 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 194 KiB |
After Width: | Height: | Size: 155 KiB |
After Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 179 KiB After Width: | Height: | Size: 182 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 467 KiB After Width: | Height: | Size: 684 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 799 KiB After Width: | Height: | Size: 782 KiB |
@ -1,21 +0,0 @@
|
|||||||

|
|
||||||
<br>
|
|
||||||

|
|
||||||
<br>
|
|
||||||

|
|
||||||
<br>
|
|
||||||

|
|
||||||
<br>
|
|
||||||

|
|
||||||
<br>
|
|
||||||

|
|
||||||
<br>
|
|
||||||

|
|
||||||
<br>
|
|
||||||

|
|
||||||
<br>
|
|
||||||

|
|
||||||
<br>
|
|
||||||

|
|
||||||
<br>
|
|
||||||

|
|
After Width: | Height: | Size: 150 KiB |