This commit is contained in:
parent
46f5c107b8
commit
fa34ed249b
233 changed files with 4000 additions and 1396 deletions
12
Yavsc/ViewModels/Manage/AddPhoneNumberViewModel.cs
Normal file
12
Yavsc/ViewModels/Manage/AddPhoneNumberViewModel.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class AddPhoneNumberViewModel
|
||||
{
|
||||
[Required]
|
||||
[Phone]
|
||||
[Display(Name = "Phone number")]
|
||||
public string PhoneNumber { get; set; }
|
||||
}
|
||||
}
|
||||
23
Yavsc/ViewModels/Manage/ChangePasswordViewModel.cs
Normal file
23
Yavsc/ViewModels/Manage/ChangePasswordViewModel.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class ChangePasswordViewModel
|
||||
{
|
||||
[Required]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Current password")]
|
||||
public string OldPassword { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "New password")]
|
||||
public string NewPassword { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm new password")]
|
||||
[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
}
|
||||
}
|
||||
13
Yavsc/ViewModels/Manage/ChangeUserNameViewModel.cs
Normal file
13
Yavsc/ViewModels/Manage/ChangeUserNameViewModel.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class ChangeUserNameViewModel
|
||||
{
|
||||
[Required]
|
||||
[Display(Name = "New user name"),RegularExpression(Constants.UserNameRegExp)]
|
||||
public string NewUserName { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
12
Yavsc/ViewModels/Manage/ConfigureTwoFactorViewModel.cs
Normal file
12
Yavsc/ViewModels/Manage/ConfigureTwoFactorViewModel.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class ConfigureTwoFactorViewModel
|
||||
{
|
||||
public string SelectedProvider { get; set; }
|
||||
|
||||
public ICollection<SelectListItem> Providers { get; set; }
|
||||
}
|
||||
}
|
||||
7
Yavsc/ViewModels/Manage/FactorViewModel.cs
Normal file
7
Yavsc/ViewModels/Manage/FactorViewModel.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class FactorViewModel
|
||||
{
|
||||
public string Purpose { get; set; }
|
||||
}
|
||||
}
|
||||
31
Yavsc/ViewModels/Manage/IndexViewModel.cs
Normal file
31
Yavsc/ViewModels/Manage/IndexViewModel.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class IndexViewModel
|
||||
{
|
||||
public string UserName {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 Activity Activity { get; set; }
|
||||
|
||||
public long PostsCounter { get; set; }
|
||||
|
||||
public AccountBalance Balance { get; set; }
|
||||
|
||||
public long ActiveCommandCount { get; set; }
|
||||
|
||||
public bool HasDedicatedCalendar { get; set; }
|
||||
}
|
||||
}
|
||||
13
Yavsc/ViewModels/Manage/ManageLoginsViewModel.cs
Normal file
13
Yavsc/ViewModels/Manage/ManageLoginsViewModel.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Http.Authentication;
|
||||
using Microsoft.AspNet.Identity;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class ManageLoginsViewModel
|
||||
{
|
||||
public IList<UserLoginInfo> CurrentLogins { get; set; }
|
||||
|
||||
public IList<AuthenticationDescription> OtherLogins { get; set; }
|
||||
}
|
||||
}
|
||||
8
Yavsc/ViewModels/Manage/RemoveLoginViewModel.cs
Executable file
8
Yavsc/ViewModels/Manage/RemoveLoginViewModel.cs
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class RemoveLoginViewModel
|
||||
{
|
||||
public string LoginProvider { get; set; }
|
||||
public string ProviderKey { get; set; }
|
||||
}
|
||||
}
|
||||
18
Yavsc/ViewModels/Manage/SetPasswordViewModel.cs
Normal file
18
Yavsc/ViewModels/Manage/SetPasswordViewModel.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class SetPasswordViewModel
|
||||
{
|
||||
[Required]
|
||||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "New password")]
|
||||
public string NewPassword { get; set; }
|
||||
|
||||
[DataType(DataType.Password)]
|
||||
[Display(Name = "Confirm new password")]
|
||||
[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
|
||||
public string ConfirmPassword { get; set; }
|
||||
}
|
||||
}
|
||||
15
Yavsc/ViewModels/Manage/VerifyPhoneNumberViewModel.cs
Normal file
15
Yavsc/ViewModels/Manage/VerifyPhoneNumberViewModel.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public class VerifyPhoneNumberViewModel
|
||||
{
|
||||
[Required]
|
||||
public string Code { get; set; }
|
||||
|
||||
[Required]
|
||||
[Phone]
|
||||
[Display(Name = "Phone number")]
|
||||
public string PhoneNumber { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue