Merge pull request 'Models integration bases' (#40) from models/endpoint into master
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Reviewed-on: ShopNCook/ShopNCook#40pull/51/head
commit
d9abce1972
@ -1,101 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Shell
|
||||
x:Class="ShoopNCook.AppShell"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:local="clr-namespace:ShoopNCook"
|
||||
xmlns:pages="clr-namespace:ShoopNCook.Pages"
|
||||
Shell.FlyoutBehavior="Disabled"
|
||||
Shell.NavBarIsVisible="False"
|
||||
Shell.TabBarBackgroundColor="White"
|
||||
Shell.TabBarTitleColor="{StaticResource Selected}"
|
||||
Shell.TabBarUnselectedColor="{StaticResource TextColorSecondary}">
|
||||
|
||||
<ShellContent
|
||||
x:Name="Splash"
|
||||
Title="More"
|
||||
ContentTemplate="{DataTemplate pages:Splash}"
|
||||
Route="Splash"/>
|
||||
<ShellContent
|
||||
x:Name="LoginPage"
|
||||
Title="Login"
|
||||
ContentTemplate="{DataTemplate pages:LoginPage}"
|
||||
Route="LoginPage"/>
|
||||
<ShellContent
|
||||
x:Name="RegisterPage"
|
||||
Title="Register"
|
||||
ContentTemplate="{DataTemplate pages:RegisterPage}"
|
||||
Route="RegisterPage"/>
|
||||
|
||||
|
||||
<TabBar>
|
||||
|
||||
|
||||
<ShellContent
|
||||
x:Name="HomeTab"
|
||||
Title="Home"
|
||||
ContentTemplate="{DataTemplate pages:HomePage}"
|
||||
Route="HomePage"
|
||||
Icon="home.svg"/>
|
||||
|
||||
<ShellContent
|
||||
x:Name="FavoritesTab"
|
||||
Title="Favorites"
|
||||
ContentTemplate="{DataTemplate pages:FavoritesPage}"
|
||||
Route="Favorites"
|
||||
Icon="hearth_on.svg"/>
|
||||
|
||||
<ShellContent
|
||||
x:Name="MyListTab"
|
||||
Title="MyList"
|
||||
ContentTemplate="{DataTemplate pages:MyListPage}"
|
||||
Route="MyList"
|
||||
Icon="list.svg"/>
|
||||
|
||||
<ShellContent
|
||||
x:Name="MoreTab"
|
||||
Title="More"
|
||||
ContentTemplate="{DataTemplate pages:MorePage}"
|
||||
Route="More"
|
||||
Icon="more.svg"/>
|
||||
</TabBar>
|
||||
|
||||
<FlyoutItem Title="Search">
|
||||
<ShellContent
|
||||
Title="Search Page"
|
||||
ContentTemplate="{DataTemplate pages:SearchPage}"
|
||||
Route="Search"/>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem Title="RecipePage">
|
||||
<ShellContent
|
||||
Title="RecipePage"
|
||||
ContentTemplate="{DataTemplate pages:RecipePage}"
|
||||
Route="RecipePage"/>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem Title="MyRecipePage">
|
||||
<ShellContent
|
||||
Title="MyRecipesPage"
|
||||
ContentTemplate="{DataTemplate pages:MyRecipesPage}"
|
||||
Route="MyRecipe"/>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem Title="ProfilePage">
|
||||
<ShellContent
|
||||
Title="ProfilePage"
|
||||
ContentTemplate="{DataTemplate pages:ProfilePage}"
|
||||
Route="EditProfile"/>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem>
|
||||
<ShellContent
|
||||
x:Name="ForgotPassword"
|
||||
Title="Login"
|
||||
ContentTemplate="{DataTemplate pages:ForgotPassword}"
|
||||
Route="ForgotPassword"/>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem>
|
||||
<ShellContent
|
||||
x:Name="CreateRecipe"
|
||||
Title="CreateRecipe"
|
||||
ContentTemplate="{DataTemplate pages:CreateRecipePage}"
|
||||
Route="CreateRecipe"/>
|
||||
</FlyoutItem>
|
||||
</Shell>
|
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Shell
|
||||
x:Class="ShoopNCook.ConnectAppShell"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:pages="clr-namespace:ShoopNCook.Pages"
|
||||
Shell.FlyoutBehavior="Disabled"
|
||||
Shell.NavBarIsVisible="False"
|
||||
Shell.TabBarBackgroundColor="White"
|
||||
Shell.TabBarTitleColor="{StaticResource Selected}"
|
||||
Shell.TabBarUnselectedColor="{StaticResource TextColorSecondary}">
|
||||
|
||||
<ShellContent
|
||||
x:Name="Splash"
|
||||
Title="More"
|
||||
ContentTemplate="{DataTemplate pages:Splash}"
|
||||
Route="Splash"/>
|
||||
|
||||
<ShellContent
|
||||
x:Name="LoginPage"
|
||||
Title="Login"
|
||||
Route="Login"/>
|
||||
|
||||
<ShellContent
|
||||
x:Name="RegisterPage"
|
||||
Title="Register"
|
||||
Route="Register"/>
|
||||
|
||||
</Shell>
|
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Models\Models.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Shell
|
||||
x:Class="ShoopNCook.MainAppShell"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:pages="clr-namespace:ShoopNCook.Pages"
|
||||
Shell.FlyoutBehavior="Disabled"
|
||||
Shell.NavBarIsVisible="False"
|
||||
Shell.TabBarBackgroundColor="White"
|
||||
Shell.TabBarTitleColor="{StaticResource Selected}"
|
||||
Shell.TabBarUnselectedColor="{StaticResource TextColorSecondary}">
|
||||
|
||||
<TabBar>
|
||||
<ShellContent
|
||||
x:Name="HomeTab"
|
||||
Title="Home"
|
||||
Route="Home"
|
||||
Icon="home.svg"/>
|
||||
|
||||
<ShellContent
|
||||
x:Name="FavoritesTab"
|
||||
Title="Favorites"
|
||||
Route="Favorites"
|
||||
Icon="hearth_on.svg"/>
|
||||
|
||||
<ShellContent
|
||||
x:Name="MyListTab"
|
||||
Title="MyList"
|
||||
Route="MyList"
|
||||
Icon="list.svg"/>
|
||||
|
||||
<ShellContent
|
||||
x:Name="MoreTab"
|
||||
Title="More"
|
||||
Route="More"
|
||||
Icon="more.svg"/>
|
||||
</TabBar>
|
||||
</Shell>
|
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
@ -1,8 +1,10 @@
|
||||
using Models;
|
||||
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class MyListPage : ContentPage
|
||||
{
|
||||
public MyListPage()
|
||||
public MyListPage(Account account, IApp app)
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
@ -1,17 +1,24 @@
|
||||
using ShoopNCook.Controllers;
|
||||
|
||||
namespace ShoopNCook.Pages;
|
||||
|
||||
public partial class RegisterPage : ContentPage
|
||||
{
|
||||
public RegisterPage()
|
||||
private readonly RegisterController controller;
|
||||
public RegisterPage(RegisterController controller)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.controller = controller;
|
||||
}
|
||||
private async void LoginTapped(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.GoToAsync("//LoginPage");
|
||||
await Shell.Current.GoToAsync("//Login");
|
||||
}
|
||||
private async void RegisterTapped(object sender, EventArgs e)
|
||||
private void RegisterTapped(object sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.GoToAsync("//LoginPage");
|
||||
string email = EmailEntry.Text;
|
||||
string password = PasswordEntry.Text;
|
||||
string username = UserNameEntry.Text;
|
||||
controller.Register(username, email, password);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue