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; }
|
||||
}
|
||||
}
|
||||
15
src/Yavsc.Org/ViewModels/Administration/EnrolerViewModel.cs
Normal file
15
src/Yavsc.Org/ViewModels/Administration/EnrolerViewModel.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.ViewModels
|
||||
{
|
||||
public partial class EnrolerViewModel {
|
||||
|
||||
[Required]
|
||||
public string EnroledUserId { get; set; }
|
||||
|
||||
|
||||
[Required]
|
||||
public string RoleName { get; set; }
|
||||
}
|
||||
}
|
||||
19
src/Yavsc.Org/ViewModels/Administration/FireViewModel.cs
Normal file
19
src/Yavsc.Org/ViewModels/Administration/FireViewModel.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.ViewModels
|
||||
{
|
||||
public partial class FireViewModel {
|
||||
|
||||
[Display(Name="EnroledLabel", ResourceType=typeof(EnrolerViewModel))]
|
||||
public string EnroledUserName { get; set; }
|
||||
|
||||
[YaRequired]
|
||||
public string EnroledUserId { get; set; }
|
||||
|
||||
|
||||
[Display(Name="RoleNameLabel", ResourceType=typeof(EnrolerViewModel))]
|
||||
[YaRequired]
|
||||
public string RoleName { get; set; }
|
||||
}
|
||||
}
|
||||
21
src/Yavsc.Org/ViewModels/Gen/PdfGenerationViewModel.cs
Normal file
21
src/Yavsc.Org/ViewModels/Gen/PdfGenerationViewModel.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNetCore.Html;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.ViewModels.Gen
|
||||
{
|
||||
public class PdfGenerationViewModel
|
||||
{
|
||||
|
||||
[YaRequired]
|
||||
public string TeXSource { get; set; }
|
||||
[YaRequired]
|
||||
public string BaseFileName { get; set; }
|
||||
[YaRequired]
|
||||
public string DestDir { get; set; }
|
||||
public bool Generated { get; set; }
|
||||
public HtmlString GenerationErrorMessage { get; set; }
|
||||
public string Temp { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class ConfigureTwoFactorViewModel
|
||||
{
|
||||
public string SelectedProvider { get; set; }
|
||||
|
||||
public ICollection<SelectListItem> Providers { get; set; }
|
||||
}
|
||||
}
|
||||
56
src/Yavsc.Org/ViewModels/Manage/IndexViewModel.cs
Normal file
56
src/Yavsc.Org/ViewModels/Manage/IndexViewModel.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
using Models.Bank;
|
||||
using Models;
|
||||
using Models.Workflow;
|
||||
public class IndexViewModel
|
||||
{
|
||||
public string UserName {get; set; }
|
||||
|
||||
public string Avatar { get; set; }
|
||||
public string Address { get; set; }
|
||||
|
||||
public bool HasPassword { get; set; }
|
||||
|
||||
public IList<UserLoginInfo> Logins { get; set; }
|
||||
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
public bool TwoFactor { get; set; }
|
||||
|
||||
public bool BrowserRemembered { get; set; }
|
||||
|
||||
public List<UserActivity> Activity { get; set; }
|
||||
|
||||
public bool HaveProfessionalSettings { get; set; }
|
||||
public bool HaveActivityToConfigure { get; set; }
|
||||
|
||||
public long PostsCounter { get; set; }
|
||||
|
||||
public AccountBalance Balance { get; set; }
|
||||
|
||||
public long ActiveCommandCount { get; set; }
|
||||
|
||||
public bool HasDedicatedCalendar { get; set; }
|
||||
|
||||
public IEnumerable<string> Roles { get; set; }
|
||||
|
||||
public string FullName { get; set; }
|
||||
|
||||
public string PostalAddress { get; set; }
|
||||
|
||||
public List<BankIdentity> BankInfo { get; set; }
|
||||
public long DiskQuota { get; set; }
|
||||
public long DiskUsage { get; set; }
|
||||
|
||||
public string DedicatedCalendarId { get; set; }
|
||||
|
||||
public string EMail { get; set; }
|
||||
public bool EmailConfirmed { get; set; }
|
||||
public bool AllowMonthlyEmail { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
10
src/Yavsc.Org/ViewModels/Manage/ManageLoginsViewModel.cs
Normal file
10
src/Yavsc.Org/ViewModels/Manage/ManageLoginsViewModel.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class ManageLoginsViewModel
|
||||
{
|
||||
public IList<UserLoginInfo> CurrentLogins { get; set; }
|
||||
}
|
||||
}
|
||||
13
src/Yavsc.Org/ViewModels/Manage/SetFullNameViewModel.cs
Normal file
13
src/Yavsc.Org/ViewModels/Manage/SetFullNameViewModel.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class SetFullNameViewModel
|
||||
{
|
||||
[YaRequired]
|
||||
[Display(Name = "Your full name"), YaStringLength(512)]
|
||||
public string FullName { get; set; }
|
||||
}
|
||||
}
|
||||
14
src/Yavsc.Org/ViewModels/Manage/SetUserNameViewModel.cs
Normal file
14
src/Yavsc.Org/ViewModels/Manage/SetUserNameViewModel.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class SetUserNameViewModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "User name"),RegularExpression(Constants.UserNameRegExp)]
|
||||
public string UserName { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue