diff --git a/App.xaml.cs b/App.xaml.cs index 3b0e629..3fa94c2 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -1,11 +1,23 @@ namespace ShoopNCook; - -public partial class App : Application -{ - public App() - { - InitializeComponent(); - - MainPage = new AppShell(); - } -} +using ShoopNCook.Pages; +using ShoopNCook.Models; +using ShoopNCook.Models.API; + +public partial class App : Application +{ + public App() + { + InitializeComponent(); + + Account account = getUserAccount(); + + var appShell = new AppShell(); + MainPage = appShell; + appShell.GoToAsync("//Splash"); + } + + private Account getUserAccount() + { + return new Account(new User(new Uri("https://www.pngkey.com/png/full/115-1150152_default-profile-picture-avatar-png-green.png"), "Stub Account"), "test@example.com"); + } +} \ No newline at end of file diff --git a/AppShell.xaml b/AppShell.xaml index f0da98a..ea876cf 100644 --- a/AppShell.xaml +++ b/AppShell.xaml @@ -6,82 +6,96 @@ xmlns:local="clr-namespace:ShoopNCook" xmlns:pages="clr-namespace:ShoopNCook.Pages" Shell.FlyoutBehavior="Disabled" - Shell.NavBarIsVisible="False"> + Shell.NavBarIsVisible="False" + Shell.TabBarBackgroundColor="White" + Shell.TabBarTitleColor="{StaticResource Selected}" + Shell.TabBarUnselectedColor="{StaticResource TextColorSecondary}"> + + + + + - + + x:Name="HomeTab" + Title="Home" + ContentTemplate="{DataTemplate pages:HomePage}" + Route="HomePage" + Icon="home.svg"/> + x:Name="FavoritesTab" + Title="Favorites" + ContentTemplate="{DataTemplate pages:FavoritesPage}" + Route="Favorites" + Icon="hearth_on.svg"/> - - + x:Name="MyListTab" + Title="MyList" + ContentTemplate="{DataTemplate pages:MyListPage}" + Route="MyList" + Icon="list.svg"/> - + Route="More" + Icon="more.svg"/> + + + - + Title="Search Page" + ContentTemplate="{DataTemplate pages:SearchPage}" + Route="Search"/> + + - - - + Route="RecipePage"/> + + - + Title="MyRecipesPage" + ContentTemplate="{DataTemplate pages:MyRecipesPage}" + Route="MyRecipe"/> + + - + Title="ProfilePage" + ContentTemplate="{DataTemplate pages:ProfilePage}" + Route="EditProfile"/> + + - + Route="ForgotPassword"/> + + - - - - - + Route="CreateRecipe"/> + \ No newline at end of file diff --git a/AppShell.xaml.cs b/AppShell.xaml.cs index 8a40b43..373ef48 100644 --- a/AppShell.xaml.cs +++ b/AppShell.xaml.cs @@ -1,9 +1,13 @@ namespace ShoopNCook; +using ShoopNCook.Pages; +using Microsoft.Maui.Controls; + public partial class AppShell : Shell { public AppShell() { InitializeComponent(); - } + + } } diff --git a/Models/API/IAccountManager.cs b/Models/API/IAccountManager.cs new file mode 100644 index 0000000..107270f --- /dev/null +++ b/Models/API/IAccountManager.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShoopNCook.Models.API +{ + public interface IAccountManager + { + public Account login(string email, string password); + + + } +} diff --git a/Models/API/IEndpoint.cs b/Models/API/IEndpoint.cs new file mode 100644 index 0000000..d569f21 --- /dev/null +++ b/Models/API/IEndpoint.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShoopNCook.Models.API +{ + public interface IEndpoint + { + public IAccountManager AccountManager { get; } + public ISearchEngine SearchEngine { get; } + + } +} + diff --git a/Models/API/ISearchEngine.cs b/Models/API/ISearchEngine.cs new file mode 100644 index 0000000..130951d --- /dev/null +++ b/Models/API/ISearchEngine.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShoopNCook.Models.API +{ + public interface ISearchEngine + { + //TODO define methods to search recipes + } +} diff --git a/Models/Account.cs b/Models/Account.cs index ff30e30..75aac63 100644 --- a/Models/Account.cs +++ b/Models/Account.cs @@ -1,6 +1,6 @@ namespace ShoopNCook.Models { - internal class Account + public class Account { public Account(User usr, string mail) diff --git a/Models/Ingredient.cs b/Models/Ingredient.cs index 6778eac..26e90d5 100644 --- a/Models/Ingredient.cs +++ b/Models/Ingredient.cs @@ -1,10 +1,9 @@  namespace ShoopNCook.Models { - internal class Ingredient + public class Ingredient { - public Ingredient(string name, float amount, Quantity quantity) { Name = name; Amount = amount; diff --git a/Models/PreparationStep.cs b/Models/PreparationStep.cs index e9427f3..ffb3ae7 100644 --- a/Models/PreparationStep.cs +++ b/Models/PreparationStep.cs @@ -2,9 +2,8 @@ namespace ShoopNCook.Models { - internal class PreparationStep + public class PreparationStep { - public PreparationStep(string name, string description) { this.Name = name; diff --git a/Models/Quantity.cs b/Models/Quantity.cs index b788f56..e7516ff 100644 --- a/Models/Quantity.cs +++ b/Models/Quantity.cs @@ -1,7 +1,7 @@  namespace ShoopNCook.Models { - internal class Quantity + public class Quantity { } } diff --git a/Models/Recipe.cs b/Models/Recipe.cs index dde2b65..c5963d8 100644 --- a/Models/Recipe.cs +++ b/Models/Recipe.cs @@ -1,7 +1,7 @@  namespace ShoopNCook.Models { - internal class Recipe + public class Recipe { public RecipeInfo Info { get; init; } diff --git a/Models/RecipeInfo.cs b/Models/RecipeInfo.cs index 1cdfe18..ba37ea1 100644 --- a/Models/RecipeInfo.cs +++ b/Models/RecipeInfo.cs @@ -1,8 +1,7 @@  namespace ShoopNCook.Models { - - internal class RecipeInfo + public class RecipeInfo { public string Name { get; init; } public string Description { get; init; } diff --git a/Models/User.cs b/Models/User.cs index 918032f..c9893c7 100644 --- a/Models/User.cs +++ b/Models/User.cs @@ -1,7 +1,7 @@  namespace ShoopNCook.Models { - internal class User + public class User { public User(Uri profilePicture, string name) diff --git a/Pages/HomePage.xaml.cs b/Pages/HomePage.xaml.cs deleted file mode 100644 index d0538e9..0000000 --- a/Pages/HomePage.xaml.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace ShoopNCook.Pages; - -public partial class HomePage : ContentPage -{ - public HomePage() - { - InitializeComponent(); - } -} \ No newline at end of file diff --git a/Pages/LoginPage.xaml.cs b/Pages/LoginPage.xaml.cs deleted file mode 100644 index cae2c76..0000000 --- a/Pages/LoginPage.xaml.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace ShoopNCook.Pages; - -public partial class LoginPage : ContentPage -{ - public LoginPage() - { - InitializeComponent(); - } -} \ No newline at end of file diff --git a/Pages/MorePage.xaml b/Pages/MorePage.xaml deleted file mode 100644 index 90910d5..0000000 --- a/Pages/MorePage.xaml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Pages/MorePage.xaml.cs b/Pages/MorePage.xaml.cs deleted file mode 100644 index 8f5bcb3..0000000 --- a/Pages/MorePage.xaml.cs +++ /dev/null @@ -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; - } -} \ No newline at end of file diff --git a/Pages/MyRecipesPage.xaml.cs b/Pages/MyRecipesPage.xaml.cs deleted file mode 100644 index 9e0f53a..0000000 --- a/Pages/MyRecipesPage.xaml.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace ShoopNCook.Pages; - -public partial class MyRecipesPage : ContentPage -{ - public MyRecipesPage() - { - InitializeComponent(); - } -} \ No newline at end of file diff --git a/Pages/RegisterPage.xaml.cs b/Pages/RegisterPage.xaml.cs deleted file mode 100644 index 8544462..0000000 --- a/Pages/RegisterPage.xaml.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace ShoopNCook.Pages; - -public partial class RegisterPage : ContentPage -{ - public RegisterPage() - { - InitializeComponent(); - } -} \ No newline at end of file diff --git a/Pages/Splash.xaml.cs b/Pages/Splash.xaml.cs deleted file mode 100644 index 4d2df16..0000000 --- a/Pages/Splash.xaml.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace ShoopNCook.Pages; - -public partial class Splash : ContentPage -{ - public Splash() - { - InitializeComponent(); - } -} \ No newline at end of file diff --git a/Resources/Images/home.svg b/Resources/Images/home.svg new file mode 100644 index 0000000..a9de338 --- /dev/null +++ b/Resources/Images/home.svg @@ -0,0 +1,3 @@ + + + diff --git a/Resources/Images/list.svg b/Resources/Images/list.svg new file mode 100644 index 0000000..6495cdd --- /dev/null +++ b/Resources/Images/list.svg @@ -0,0 +1,3 @@ + + + diff --git a/Resources/Images/logo.png b/Resources/Images/logo.png new file mode 100644 index 0000000..e3dcb1f Binary files /dev/null and b/Resources/Images/logo.png differ diff --git a/Resources/Images/more.svg b/Resources/Images/more.svg new file mode 100644 index 0000000..88aee83 --- /dev/null +++ b/Resources/Images/more.svg @@ -0,0 +1,3 @@ + + + diff --git a/ShoopNCook.csproj b/ShoopNCook.csproj index e1025c6..2a3de7b 100644 --- a/ShoopNCook.csproj +++ b/ShoopNCook.csproj @@ -84,67 +84,68 @@ + - + MyListPage.xaml - + IngredientEntry.xaml - + MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile MSBuild:Compile - + MSBuild:Compile - + MSBuild:Compile diff --git a/ShoopNCook.sln b/ShoopNCook.sln index 3efa916..75a7ef6 100644 --- a/ShoopNCook.sln +++ b/ShoopNCook.sln @@ -1,27 +1,27 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31611.283 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShoopNCook", "ShoopNCook.csproj", "{8ED2FB1D-C04D-478D-9271-CC91FE110396}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.Build.0 = Release|Any CPU - {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.Deploy.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31611.283 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ShoopNCook", "ShoopNCook.csproj", "{8ED2FB1D-C04D-478D-9271-CC91FE110396}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.Build.0 = Release|Any CPU + {8ED2FB1D-C04D-478D-9271-CC91FE110396}.Release|Any CPU.Deploy.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} + EndGlobalSection +EndGlobal diff --git a/Pages/ChangePassword.xaml b/Views/ChangePassword.xaml similarity index 100% rename from Pages/ChangePassword.xaml rename to Views/ChangePassword.xaml diff --git a/Pages/ChangePassword.xaml.cs b/Views/ChangePassword.xaml.cs similarity index 100% rename from Pages/ChangePassword.xaml.cs rename to Views/ChangePassword.xaml.cs diff --git a/Views/CounterView.xaml b/Views/Components/CounterView.xaml similarity index 100% rename from Views/CounterView.xaml rename to Views/Components/CounterView.xaml diff --git a/Views/CounterView.xaml.cs b/Views/Components/CounterView.xaml.cs similarity index 100% rename from Views/CounterView.xaml.cs rename to Views/Components/CounterView.xaml.cs diff --git a/Views/HeadedButton.xaml b/Views/Components/HeadedButton.xaml similarity index 76% rename from Views/HeadedButton.xaml rename to Views/Components/HeadedButton.xaml index 26a3f4d..f3e7442 100644 --- a/Views/HeadedButton.xaml +++ b/Views/Components/HeadedButton.xaml @@ -6,20 +6,17 @@ + HeightRequest="25"/>