diff --git a/App.xaml.cs b/App.xaml.cs
index 3fa94c2..fa8b710 100644
--- a/App.xaml.cs
+++ b/App.xaml.cs
@@ -1,23 +1,32 @@
-namespace ShoopNCook;
-using ShoopNCook.Pages;
-using ShoopNCook.Models;
-using ShoopNCook.Models.API;
+namespace ShoopNCook;
+using Models;
+using Endpoint;
+using LocalEndpoint;
-public partial class App : Application
+public partial class App : Application, ConnectionObserver, IApp
{
+
+ private IEndpoint Endpoint = new LocalEndpoint();
+
+ public UserNotifier Notifier => new ConsoleUserNotifier();
+
public App()
{
InitializeComponent();
+ ForceLogin(); //start in login state
+ }
- Account account = getUserAccount();
-
- var appShell = new AppShell();
- MainPage = appShell;
- appShell.GoToAsync("//Splash");
+ public void OnAccountConnected(Account account)
+ {
+ Shell shell = new MainAppShell(account, this);
+ shell.GoToAsync("//Main");
+ MainPage = shell;
}
- private Account getUserAccount()
+ public void ForceLogin()
{
- 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");
+ Shell shell = new ConnectAppShell(this, Endpoint.AccountManager, Notifier);
+ shell.GoToAsync("//Splash");
+ MainPage = shell;
}
}
\ No newline at end of file
diff --git a/AppShell.xaml b/AppShell.xaml
deleted file mode 100644
index ea876cf..0000000
--- a/AppShell.xaml
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/AppShell.xaml.cs b/AppShell.xaml.cs
deleted file mode 100644
index 373ef48..0000000
--- a/AppShell.xaml.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace ShoopNCook;
-using ShoopNCook.Pages;
-using Microsoft.Maui.Controls;
-
-
-public partial class AppShell : Shell
-{
- public AppShell()
- {
- InitializeComponent();
-
- }
-}
diff --git a/ConnectAppShell.xaml b/ConnectAppShell.xaml
new file mode 100644
index 0000000..6fb0bb9
--- /dev/null
+++ b/ConnectAppShell.xaml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ConnectAppShell.xaml.cs b/ConnectAppShell.xaml.cs
new file mode 100644
index 0000000..7eb3761
--- /dev/null
+++ b/ConnectAppShell.xaml.cs
@@ -0,0 +1,17 @@
+namespace ShoopNCook;
+using Microsoft.Maui.Controls;
+using Models;
+using Endpoint;
+using ShoopNCook.Controllers;
+using ShoopNCook.Pages;
+
+public partial class ConnectAppShell : Shell
+{
+ public ConnectAppShell(ConnectionObserver observer, IAccountManager accounts, UserNotifier notifier)
+ {
+ ConnectionController controller = new ConnectionController(observer, accounts, notifier);
+ InitializeComponent();
+ LoginPage.ContentTemplate = new DataTemplate(() => new LoginPage(controller));
+ RegisterPage.ContentTemplate = new DataTemplate(() => new RegisterPage(controller));
+ }
+}
diff --git a/ConnectionObserver.cs b/ConnectionObserver.cs
new file mode 100644
index 0000000..6cd2772
--- /dev/null
+++ b/ConnectionObserver.cs
@@ -0,0 +1,9 @@
+using Models;
+
+namespace ShoopNCook
+{
+ public interface ConnectionObserver
+ {
+ public void OnAccountConnected(Account account);
+ }
+}
diff --git a/ConsoleUserNotifier.cs b/ConsoleUserNotifier.cs
new file mode 100644
index 0000000..04b7221
--- /dev/null
+++ b/ConsoleUserNotifier.cs
@@ -0,0 +1,24 @@
+namespace ShoopNCook
+{
+ ///
+ /// A notice reporter implementation that prints in console the applications's user notices.
+ ///
+ public class ConsoleUserNotifier :
+ UserNotifier
+ {
+ public void Error(string message)
+ {
+ Console.WriteLine(" Error: " + message);
+ }
+
+ public void Notice(string message)
+ {
+ Console.WriteLine(" Notice: " + message);
+ }
+
+ public void Warn(string message)
+ {
+ Console.WriteLine(" Warn: " + message);
+ }
+ }
+}
diff --git a/Controllers/ConnectionController.cs b/Controllers/ConnectionController.cs
new file mode 100644
index 0000000..2ed88de
--- /dev/null
+++ b/Controllers/ConnectionController.cs
@@ -0,0 +1,39 @@
+using Endpoint;
+using Models;
+
+namespace ShoopNCook.Controllers
+{
+ public class ConnectionController : LoginController, RegisterController
+ {
+ private readonly ConnectionObserver observer;
+ private readonly IAccountManager accounts;
+ private readonly UserNotifier notifier;
+ public ConnectionController(ConnectionObserver observer, IAccountManager accounts, UserNotifier notifier) {
+ this.observer = observer;
+ this.accounts = accounts;
+ this.notifier = notifier;
+ }
+
+ public void Login(string email, string password)
+ {
+ Account? acc = accounts.Login(email, password);
+ if (acc == null)
+ {
+ notifier.Error("Email or password invalid.");
+ return;
+ }
+ observer.OnAccountConnected(acc);
+ }
+
+ public void Register(string username, string email, string password)
+ {
+ Account? acc = accounts.Register(username, email, password);
+ if (acc == null)
+ {
+ notifier.Error("Invalid credentials.");
+ return;
+ }
+ observer.OnAccountConnected(acc);
+ }
+ }
+}
diff --git a/Controllers/LoginController.cs b/Controllers/LoginController.cs
new file mode 100644
index 0000000..2006643
--- /dev/null
+++ b/Controllers/LoginController.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ShoopNCook.Controllers
+{
+ public interface LoginController
+ {
+ public void Login(string email, string password);
+ }
+}
diff --git a/Controllers/MorePageController.cs b/Controllers/MorePageController.cs
new file mode 100644
index 0000000..f4698fa
--- /dev/null
+++ b/Controllers/MorePageController.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ShoopNCook.Controllers
+{
+ public class MorePageController
+ {
+
+ private readonly IApp app;
+
+ public MorePageController(IApp app) {
+ this.app = app;
+ }
+
+ public void Logout()
+ {
+ app.Notifier.Notice("You have been loged out.");
+ app.ForceLogin();
+ }
+ }
+}
diff --git a/Controllers/RegisterController.cs b/Controllers/RegisterController.cs
new file mode 100644
index 0000000..b73b075
--- /dev/null
+++ b/Controllers/RegisterController.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ShoopNCook.Controllers
+{
+ public interface RegisterController
+ {
+ public void Register(string username, string email, string password);
+ }
+}
diff --git a/Endpoint/Endpoint.csproj b/Endpoint/Endpoint.csproj
new file mode 100644
index 0000000..d24baee
--- /dev/null
+++ b/Endpoint/Endpoint.csproj
@@ -0,0 +1,13 @@
+
+
+
+ net7.0
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/Endpoint/IAccountManager.cs b/Endpoint/IAccountManager.cs
new file mode 100644
index 0000000..c61b79e
--- /dev/null
+++ b/Endpoint/IAccountManager.cs
@@ -0,0 +1,10 @@
+using Models;
+namespace Endpoint
+{
+ public interface IAccountManager
+ {
+ public Account? Login(string email, string password);
+
+ public Account? Register(string email, string username, string password);
+ }
+}
diff --git a/Endpoint/IEndpoint.cs b/Endpoint/IEndpoint.cs
new file mode 100644
index 0000000..649e501
--- /dev/null
+++ b/Endpoint/IEndpoint.cs
@@ -0,0 +1,11 @@
+
+
+namespace Endpoint
+{
+ public interface IEndpoint
+ {
+ public IAccountManager AccountManager { get; }
+
+ }
+}
+
diff --git a/IApp.cs b/IApp.cs
new file mode 100644
index 0000000..32a77b0
--- /dev/null
+++ b/IApp.cs
@@ -0,0 +1,16 @@
+using Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ShoopNCook
+{
+ public interface IApp
+ {
+ public UserNotifier Notifier { get; }
+
+ public void ForceLogin();
+ }
+}
diff --git a/LocalEndpoint/AccountManager.cs b/LocalEndpoint/AccountManager.cs
new file mode 100644
index 0000000..2a3dbc2
--- /dev/null
+++ b/LocalEndpoint/AccountManager.cs
@@ -0,0 +1,37 @@
+using Models;
+using Endpoint;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LocalEndpoint
+{
+ internal class AccountManager : IAccountManager
+ {
+ private static readonly Uri DEFAULT_ACCOUNT_IMAGE = new Uri("https://www.pngkey.com/png/full/115-1150152_default-profile-picture-avatar-png-green.png");
+
+ private Account userAccount = new Account(new User(DEFAULT_ACCOUNT_IMAGE, "Stub Account"), "test@example.com");
+ private string userPassword = "123456";
+
+ public Account? Login(string email, string password)
+ {
+ if (userAccount.Email == email && userPassword == password)
+ {
+ return userAccount;
+ }
+ return null;
+ }
+
+ public Account? Register(string email, string username, string password)
+ {
+ if (email == null || username == null || password == null)
+ return null;
+
+ userAccount = new Account(new User(DEFAULT_ACCOUNT_IMAGE, username), email);
+ userPassword = password;
+ return userAccount;
+ }
+ }
+}
diff --git a/LocalEndpoint/LocalEndpoint.cs b/LocalEndpoint/LocalEndpoint.cs
new file mode 100644
index 0000000..d2696f7
--- /dev/null
+++ b/LocalEndpoint/LocalEndpoint.cs
@@ -0,0 +1,10 @@
+using Endpoint;
+
+namespace LocalEndpoint
+{
+ public class LocalEndpoint : IEndpoint
+ {
+ public IAccountManager AccountManager => new AccountManager();
+
+ }
+}
\ No newline at end of file
diff --git a/LocalEndpoint/LocalEndpoint.csproj b/LocalEndpoint/LocalEndpoint.csproj
new file mode 100644
index 0000000..b84a3cb
--- /dev/null
+++ b/LocalEndpoint/LocalEndpoint.csproj
@@ -0,0 +1,14 @@
+
+
+
+ net7.0
+ enable
+ enable
+
+
+
+
+
+
+
+
diff --git a/MainAppShell.xaml b/MainAppShell.xaml
new file mode 100644
index 0000000..7290c2f
--- /dev/null
+++ b/MainAppShell.xaml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MainAppShell.xaml.cs b/MainAppShell.xaml.cs
new file mode 100644
index 0000000..d8df598
--- /dev/null
+++ b/MainAppShell.xaml.cs
@@ -0,0 +1,17 @@
+namespace ShoopNCook;
+using Microsoft.Maui.Controls;
+using Models;
+using ShoopNCook.Controllers;
+using ShoopNCook.Pages;
+
+public partial class MainAppShell : Shell
+{
+ public MainAppShell(Account account, IApp app)
+ {
+ InitializeComponent();
+ HomeTab.ContentTemplate = new DataTemplate(() => new HomePage(account, app));
+ FavoritesTab.ContentTemplate = new DataTemplate(() => new FavoritesPage(account, app));
+ MyListTab.ContentTemplate = new DataTemplate(() => new MyListPage(account, app));
+ MoreTab.ContentTemplate = new DataTemplate(() => new MorePage(account, new MorePageController(app)));
+ }
+}
diff --git a/MauiProgram.cs b/MauiProgram.cs
index c09f521..7dc9f23 100644
--- a/MauiProgram.cs
+++ b/MauiProgram.cs
@@ -16,7 +16,6 @@ public static class MauiProgram
fonts.AddFont("Poppins-Bold.ttf", "PoppinsBold");
fonts.AddFont("Poppins-Regular.ttf", "Poppins");
fonts.AddFont("Poppins-Medium.ttf", "PoppinsMedium");
- fonts.AddFont("Poppins-Regular.ttf", "Poppins");
});
#if DEBUG
builder.Logging.AddDebug();
diff --git a/Models/API/IAccountManager.cs b/Models/API/IAccountManager.cs
deleted file mode 100644
index 107270f..0000000
--- a/Models/API/IAccountManager.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-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
deleted file mode 100644
index d569f21..0000000
--- a/Models/API/IEndpoint.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-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
deleted file mode 100644
index 130951d..0000000
--- a/Models/API/ISearchEngine.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-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 75aac63..6d5a31c 100644
--- a/Models/Account.cs
+++ b/Models/Account.cs
@@ -1,4 +1,4 @@
-namespace ShoopNCook.Models
+namespace Models
{
public class Account
{
diff --git a/Models/Ingredient.cs b/Models/Ingredient.cs
index 26e90d5..48f1f21 100644
--- a/Models/Ingredient.cs
+++ b/Models/Ingredient.cs
@@ -1,10 +1,10 @@
-
-namespace ShoopNCook.Models
+namespace Models
{
public class Ingredient
{
- public Ingredient(string name, float amount, Quantity quantity) {
+ public Ingredient(string name, float amount, Quantity quantity)
+ {
Name = name;
Amount = amount;
Quantity = quantity;
diff --git a/Models/Models.csproj b/Models/Models.csproj
new file mode 100644
index 0000000..cfadb03
--- /dev/null
+++ b/Models/Models.csproj
@@ -0,0 +1,9 @@
+
+
+
+ net7.0
+ enable
+ enable
+
+
+
diff --git a/Models/PreparationStep.cs b/Models/PreparationStep.cs
index ffb3ae7..d85cf91 100644
--- a/Models/PreparationStep.cs
+++ b/Models/PreparationStep.cs
@@ -1,13 +1,12 @@
-
-namespace ShoopNCook.Models
+namespace Models
{
public class PreparationStep
{
public PreparationStep(string name, string description)
{
- this.Name = name;
- this.Description = description;
+ Name = name;
+ Description = description;
}
public string Name { get; init; }
diff --git a/Models/Quantity.cs b/Models/Quantity.cs
index e7516ff..51433d5 100644
--- a/Models/Quantity.cs
+++ b/Models/Quantity.cs
@@ -1,5 +1,4 @@
-
-namespace ShoopNCook.Models
+namespace Models
{
public class Quantity
{
diff --git a/Models/Recipe.cs b/Models/Recipe.cs
index c5963d8..15d09ae 100644
--- a/Models/Recipe.cs
+++ b/Models/Recipe.cs
@@ -1,5 +1,4 @@
-
-namespace ShoopNCook.Models
+namespace Models
{
public class Recipe
{
diff --git a/Models/RecipeInfo.cs b/Models/RecipeInfo.cs
index ba37ea1..4640626 100644
--- a/Models/RecipeInfo.cs
+++ b/Models/RecipeInfo.cs
@@ -1,5 +1,4 @@
-
-namespace ShoopNCook.Models
+namespace Models
{
public class RecipeInfo
{
diff --git a/Models/User.cs b/Models/User.cs
index c9893c7..2f19f35 100644
--- a/Models/User.cs
+++ b/Models/User.cs
@@ -1,5 +1,4 @@
-
-namespace ShoopNCook.Models
+namespace Models
{
public class User
{
@@ -10,7 +9,7 @@ namespace ShoopNCook.Models
Name = name;
}
- public Uri ProfilePicture { get; init; }
- public string Name { get; init; }
+ public Uri ProfilePicture { get; init; }
+ public string Name { get; init; }
}
}
diff --git a/Platforms/Android/AndroidManifest.xml b/Platforms/Android/AndroidManifest.xml
index e9937ad..60c24e0 100644
--- a/Platforms/Android/AndroidManifest.xml
+++ b/Platforms/Android/AndroidManifest.xml
@@ -1,6 +1,6 @@

-
+
\ No newline at end of file
diff --git a/ShoopNCook.csproj b/ShoopNCook.csproj
index e727121..8f865ed 100644
--- a/ShoopNCook.csproj
+++ b/ShoopNCook.csproj
@@ -1,174 +1,204 @@
-
-
-
- net7.0;net7.0-android
- $(TargetFrameworks);net7.0-windows10.0.19041.0
-
-
- Exe
- ShoopNCook
- true
- true
- enable
-
-
- ShoopNCook
-
-
- com.companyname.shoopncook
- bf17e1fe-a722-42f6-a24d-3327d351c924
-
-
- 1.0
- 1
-
- 11.0
- 13.1
- 21.0
- 10.0.17763.0
- 10.0.17763.0
- 6.5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MyListPage.xaml
-
+
+
+
+ net7.0;net7.0-android
+ $(TargetFrameworks);net7.0-windows10.0.19041.0
+
+
+ Exe
+ ShoopNCook
+ true
+ true
+ enable
+
+
+ ShoopNCook
+
+
+ com.companyname.shoopncook
+ bf17e1fe-a722-42f6-a24d-3327d351c924
+
+
+ 1.0
+ 1
+
+ 11.0
+ 13.1
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ConnectAppShell.xaml
+
+
+ MainAppShell.xaml
+
+
+ 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
+
+
+ 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 7ffa604..6ca3619 100644
--- a/ShoopNCook.sln
+++ b/ShoopNCook.sln
@@ -1,32 +1,50 @@
-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
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{E50D92DC-0BB1-4998-B085-EF47C55675AC}"
-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
- {E50D92DC-0BB1-4998-B085-EF47C55675AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E50D92DC-0BB1-4998-B085-EF47C55675AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E50D92DC-0BB1-4998-B085-EF47C55675AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E50D92DC-0BB1-4998-B085-EF47C55675AC}.Release|Any CPU.Build.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
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{E50D92DC-0BB1-4998-B085-EF47C55675AC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Models", "Models\Models.csproj", "{A9D43E07-345D-4DD4-B4F9-CE69ED569B5F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LocalEndpoint", "LocalEndpoint\LocalEndpoint.csproj", "{57732316-93B9-4DA0-A212-F8892D3D968B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Endpoint", "Endpoint\Endpoint.csproj", "{C976BDD8-710D-4162-8A42-973B634491F9}"
+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
+ {E50D92DC-0BB1-4998-B085-EF47C55675AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E50D92DC-0BB1-4998-B085-EF47C55675AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E50D92DC-0BB1-4998-B085-EF47C55675AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E50D92DC-0BB1-4998-B085-EF47C55675AC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A9D43E07-345D-4DD4-B4F9-CE69ED569B5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A9D43E07-345D-4DD4-B4F9-CE69ED569B5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A9D43E07-345D-4DD4-B4F9-CE69ED569B5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A9D43E07-345D-4DD4-B4F9-CE69ED569B5F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {57732316-93B9-4DA0-A212-F8892D3D968B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {57732316-93B9-4DA0-A212-F8892D3D968B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {57732316-93B9-4DA0-A212-F8892D3D968B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {57732316-93B9-4DA0-A212-F8892D3D968B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C976BDD8-710D-4162-8A42-973B634491F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C976BDD8-710D-4162-8A42-973B634491F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C976BDD8-710D-4162-8A42-973B634491F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C976BDD8-710D-4162-8A42-973B634491F9}.Release|Any CPU.Build.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/UserNotifier.cs b/UserNotifier.cs
new file mode 100644
index 0000000..bfd4c07
--- /dev/null
+++ b/UserNotifier.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ShoopNCook
+{
+ public interface UserNotifier
+
+ {
+ public void Notice(string message);
+
+ public void Error(string message);
+
+ public void Warn(string message);
+ }
+}
diff --git a/Views/Components/RecipeView.xaml b/Views/Components/RecipeView.xaml
index 1842b45..8e794da 100644
--- a/Views/Components/RecipeView.xaml
+++ b/Views/Components/RecipeView.xaml
@@ -23,7 +23,7 @@
StrokeShape="RoundRectangle 20"
BackgroundColor="{StaticResource ImageBackground}">
-
+
-
+ Margin="20,35,20,20">
+
+ StrokeShape="RoundRectangle 1500">
-
+
+
+
diff --git a/Views/HomePage.xaml.cs b/Views/HomePage.xaml.cs
index e245dde..56277fa 100644
--- a/Views/HomePage.xaml.cs
+++ b/Views/HomePage.xaml.cs
@@ -1,10 +1,14 @@
+using Models;
+
namespace ShoopNCook.Pages;
public partial class HomePage : ContentPage
{
- public HomePage()
- {
+ public HomePage(Account account, IApp app)
+ {
InitializeComponent();
+ ProfilePictureImage.Source = ImageSource.FromUri(account.User.ProfilePicture);
+ ProfilePictureName.Text = account.User.Name;
}
private async void OnSyncButtonClicked(object sender, EventArgs e)
{
diff --git a/Views/LoginPage.xaml b/Views/LoginPage.xaml
index c625361..c8ba1b6 100644
--- a/Views/LoginPage.xaml
+++ b/Views/LoginPage.xaml
@@ -38,7 +38,8 @@
+ Placeholder="Mail address"
+ x:Name="EmailEntry"/>
@@ -57,7 +58,8 @@
+ Placeholder="Password"
+ x:Name="PasswordEntry"/>
+ Placeholder="User Name"
+ x:Name="UserNameEntry"/>
@@ -59,7 +60,8 @@
+ Placeholder="Mail address"
+ x:Name="EmailEntry"/>
@@ -76,7 +78,8 @@
+ Placeholder="Password"
+ x:Name="PasswordEntry"/>
-
-