reorg
This commit is contained in:
parent
d000f77098
commit
40e8e08690
3487 changed files with 39 additions and 21 deletions
14
src/Yavsc.Org/ViewModels/Account/LoginInputModel.cs
Normal file
14
src/Yavsc.Org/ViewModels/Account/LoginInputModel.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class LoginInputModel
|
||||
{
|
||||
[Required]
|
||||
public string Username { get; set; }
|
||||
[Required]
|
||||
public string Password { get; set; }
|
||||
public bool RememberLogin { get; set; }
|
||||
public string ReturnUrl { get; set; }
|
||||
}
|
||||
}
|
||||
14
src/Yavsc.Org/ViewModels/Account/LoginViewModel.cs
Normal file
14
src/Yavsc.Org/ViewModels/Account/LoginViewModel.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class LoginViewModel : LoginInputModel
|
||||
{
|
||||
public bool AllowRememberLogin { get; set; } = true;
|
||||
public bool EnableLocalLogin { get; set; } = true;
|
||||
|
||||
public IEnumerable<ExternalProvider> ExternalProviders { get; set; } = Enumerable.Empty<ExternalProvider>();
|
||||
public IEnumerable<ExternalProvider> VisibleExternalProviders => ExternalProviders.Where(x => !String.IsNullOrWhiteSpace(x.DisplayName));
|
||||
|
||||
public bool IsExternalLoginOnly => EnableLocalLogin == false && ExternalProviders?.Count() == 1;
|
||||
public string ExternalLoginScheme => IsExternalLoginOnly ? ExternalProviders?.SingleOrDefault()?.AuthenticationScheme : null;
|
||||
}
|
||||
}
|
||||
7
src/Yavsc.Org/ViewModels/Account/RedirectViewModel.cs
Normal file
7
src/Yavsc.Org/ViewModels/Account/RedirectViewModel.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class RedirectViewModel
|
||||
{
|
||||
public string RedirectUrl { get; set; }
|
||||
}
|
||||
}
|
||||
16
src/Yavsc.Org/ViewModels/Account/SendCodeViewModel.cs
Normal file
16
src/Yavsc.Org/ViewModels/Account/SendCodeViewModel.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
public class SendCodeViewModel
|
||||
{
|
||||
public string SelectedProvider { get; set; }
|
||||
|
||||
public ICollection<SelectListItem> Providers { get; set; }
|
||||
|
||||
public string ReturnUrl { get; set; }
|
||||
|
||||
public bool RememberMe { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue