move pages -> views and views -> components
continuous-integration/drone/push Build is failing Details
continuous-integration/drone/pr Build is failing Details

pull/39/head
Leo TUAILLON 2 years ago
parent 0675e731d4
commit 5d66ff129e

@ -88,64 +88,64 @@
</ItemGroup>
<ItemGroup>
<Compile Update="Pages\MyListPage.xaml.cs">
<Compile Update="Views\MyListPage.xaml.cs">
<DependentUpon>MyListPage.xaml</DependentUpon>
</Compile>
<Compile Update="Views\IngredientEntry.xaml.cs">
<Compile Update="Views\Components\IngredientEntry.xaml.cs">
<DependentUpon>IngredientEntry.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<MauiXaml Update="Pages\CreateRecipePage.xaml">
<MauiXaml Update="Views\CreateRecipePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Pages\Splash.xaml">
<MauiXaml Update="Views\Splash.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\CounterView.xaml">
<MauiXaml Update="Views\Components\CounterView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\HeadedButton.xaml">
<MauiXaml Update="Views\Components\HeadedButton.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\IngredientEntry.xaml">
<MauiXaml Update="Views\Components\IngredientEntry.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\IngredientView.xaml">
<MauiXaml Update="Views\Components\IngredientView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Pages\FavoritesPage.xaml">
<MauiXaml Update="Views\FavoritesPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Pages\MorePage.xaml">
<MauiXaml Update="Views\MorePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Pages\ProfilePage.xaml">
<MauiXaml Update="Views\ProfilePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Pages\RecipePage.xaml">
<MauiXaml Update="Views\RecipePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\RecipeView.xaml">
<MauiXaml Update="Views\Components\RecipeView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Pages\RegisterPage.xaml">
<MauiXaml Update="Views\RegisterPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Pages\SearchPage.xaml">
<MauiXaml Update="Views\SearchPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\RecipeView.xaml">
<MauiXaml Update="Views\Components\RecipeView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\SearchPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\StepEntry.xaml">
<MauiXaml Update="Views\Components\StepEntry.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\StoredRecipeView.xaml">
<MauiXaml Update="Views\Components\StoredRecipeView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>

@ -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();
}
}

@ -10,16 +10,16 @@ public partial class CreateRecipePage : ContentPage
}
private void OnAddIngredientTapped(object sender, TappedEventArgs e)
{
{
IngredientList.Children.Add(new IngredientEntry());
}
}
private void OnAddStepTapped(object sender, TappedEventArgs e)
{
{
StepList.Children.Add(new StepEntry((uint) StepList.Children.Count() + 1));
}
private async void OnBackButtonClicked(object sender, EventArgs e)
{
await Navigation.PopAsync();
private async void OnBackButtonClicked(object sender, EventArgs e)
{
await Navigation.PopAsync();
}
}

@ -1,171 +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"
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>
<?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,13 +1,13 @@
namespace ShoopNCook.Pages;
public partial class ForgotPassword : ContentPage
{
public ForgotPassword()
{
InitializeComponent();
}
private async void OnBackButtonClicked(object sender, EventArgs e)
{
await Navigation.PopAsync();
}
namespace ShoopNCook.Pages;
public partial class ForgotPassword : ContentPage
{
public ForgotPassword()
{
InitializeComponent();
}
private async void OnBackButtonClicked(object sender, EventArgs e)
{
await Navigation.PopAsync();
}
}
Loading…
Cancel
Save