Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-andrich committed Jul 24, 2023
1 parent ac86a66 commit b24361f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 28 deletions.
30 changes: 13 additions & 17 deletions maERP.Client/maERP.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,53 +23,49 @@
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">31.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.22621.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.22621.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
<Product>$(AssemblyName)</Product>
<AssemblyName>maERP</AssemblyName>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-ios|AnyCPU'">
<CreatePackage>false</CreatePackage>
<CodesignKey>Apple Development: Created via API (47ASY6PQB5)</CodesignKey>
<CodesignEntitlements>Platforms\MacCatalyst\Entitlements.plist</CodesignEntitlements>
<CodesignProvision>VS: WildCard Development</CodesignProvision>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-ios|AnyCPU'">
<CreatePackage>false</CreatePackage>
<MtouchProfiling>True</MtouchProfiling>
<ApplicationTitle>maERP</ApplicationTitle>
<ApplicationDisplayVersion>0.1.0</ApplicationDisplayVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-maccatalyst|AnyCPU'">
<CreatePackage>false</CreatePackage>
<ApplicationTitle>maERP</ApplicationTitle>
<ApplicationDisplayVersion>0.1.0</ApplicationDisplayVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net7.0-ios'">
<CodesignKey>Apple Development: Created via API (47ASY6PQB5)</CodesignKey>
<CodesignProvision>VS: WildCard Development</CodesignProvision>
<CodesignProvision>VS: de.martin-andrich.maerp.client Development</CodesignProvision>
<ProvisioningType>automatic</ProvisioningType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-ios|AnyCPU'">
<MtouchProfiling>False</MtouchProfiling>
<MtouchUseLlvm>False</MtouchUseLlvm>
<ApplicationTitle>maERP</ApplicationTitle>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-android33.0|AnyCPU'">
<ApplicationTitle>maERP</ApplicationTitle>
<ApplicationDisplayVersion>0.1.0</ApplicationDisplayVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-windows10.0.22621.0|AnyCPU'">
<ApplicationTitle>maERP</ApplicationTitle>
<ApplicationDisplayVersion>0.1.0</ApplicationDisplayVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-maccatalyst|AnyCPU'">
<ApplicationTitle>maERP</ApplicationTitle>
<ApplicationDisplayVersion>0.1.0</ApplicationDisplayVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-android33.0|AnyCPU'">
<ApplicationTitle>maERP</ApplicationTitle>
<ApplicationDisplayVersion>0.1.0</ApplicationDisplayVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-windows10.0.22621.0|AnyCPU'">
<ApplicationTitle>maERP</ApplicationTitle>
<ApplicationDisplayVersion>0.1.0</ApplicationDisplayVersion>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
Expand All @@ -79,7 +75,7 @@
<MauiSplashScreen Include="MauiResources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

<!-- Images -->
<MauiFont Include="MauiResources\Fonts\*" />
<MauiFont Include="Resources\Fonts\*" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="MauiResources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
Expand Down
6 changes: 3 additions & 3 deletions maERP.Shared/Models/LoginFormModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace maERP.Shared.Models;

public class LoginFormModel
{
public string? UserName { get; set; }
public string? Password { get; set; }
public string? Server { get; set; }
public string? UserName { get; set; } = string.Empty;
public string? Password { get; set; } = string.Empty;
public List<string>? ServerList { get; set; }
public bool RememberMe { get; set; } = false;
}

Expand Down
26 changes: 18 additions & 8 deletions maERP.Shared/Pages/Auth/Login.razor
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
<MudForm Model="@_model" @ref="@_form" @bind-IsValid="@_success" ValidationDelay="0">

<MudText Typo="Typo.h4" GutterBottom="true">Login</MudText>
@*
<MudText>
Kein Account? <MudLink Href="/pages/authentication/register">Jetzt registrieren</MudLink>
</MudText>
*@
<MudTextField T="string"
@bind-Value="_model.UserName" For="@(() => _model.UserName)"
Label="E-Mail"
Expand All @@ -32,6 +34,13 @@
InputType="InputType.Password">
</MudTextField>

<MudTextField @bind-Value="_model.ServerList" For="@(() => _model.ServerList)"
Label="Server"
Variant="Variant.Outlined"
Required="true"
InputType="InputType.Password">
</MudTextField>

<div Class="d-flex justify-space-between align-center">
<MudCheckBox For="@(() => _model.RememberMe)" @bind-Checked="_model.RememberMe" Label="Login speichern" Color="Color.Primary" Class="ml-n1 my-3"></MudCheckBox>
<MudLink Href="/pages/authentication/forgot-password">Passwort vergessen</MudLink>
Expand Down Expand Up @@ -61,34 +70,35 @@
@code
{
private string _title = "Login";
// private UserManager<ApplicationUser> UserManager { get; set; } = default!;
// private AccessTokenProvider AccessTokenProvider { get; set; } = default!;

MudForm? _form;
bool _success;
bool _loading;

private LoginFormModel _model = new()
List<string> _server = new()
{
"https://localhost:8443"
};

LoginFormModel _model = new()
{
UserName = "admin@localhost.com",
Password = "maERP!12",
Server = "https://localhost:8443",
// Server = _server,
RememberMe = true
};

_model.ServerList = _server;

// LoginDto loginDto = new LoginDto { Email = "admin@localhost.com", Password = "maERP!12", Server = "https://localhost:8443" };
private string loginServer = "";
// private bool _showServerInput = true;
private string _spinnerClass = string.Empty;
private string _errorMessage = string.Empty;

protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
_title = "Login";
// UserManager = UserManager<ApplicationUser>>();
// AccessTokenProvider = ScopedServices.GetRequiredService<AccessTokenProvider>();
}

private async void OnSubmit()
Expand Down

0 comments on commit b24361f

Please sign in to comment.