files tree made better.
This commit is contained in:
parent
ffbf032480
commit
ccc91bbf19
1630 changed files with 18209 additions and 41860 deletions
16
src/Yavsc/ViewModels/Account/SendCodeViewModel.cs
Normal file
16
src/Yavsc/ViewModels/Account/SendCodeViewModel.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.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; }
|
||||
}
|
||||
}
|
||||
11
src/Yavsc/ViewModels/Auth/EditRequirement.cs
Normal file
11
src/Yavsc/ViewModels/Auth/EditRequirement.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using Microsoft.AspNet.Authorization;
|
||||
|
||||
namespace Yavsc.ViewModels.Auth
|
||||
{
|
||||
public class EditRequirement : IAuthorizationRequirement
|
||||
{
|
||||
public EditRequirement()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
25
src/Yavsc/ViewModels/Auth/FileSpotInfo.cs
Normal file
25
src/Yavsc/ViewModels/Auth/FileSpotInfo.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
using System.IO;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
using Yavsc.Models.Blog;
|
||||
|
||||
namespace Yavsc.ViewModel.Auth {
|
||||
|
||||
public class FileSpotInfo : IAuthorizationRequirement
|
||||
{
|
||||
public DirectoryInfo PathInfo { get; private set; }
|
||||
|
||||
public FileSpotInfo(string path, BlogPost b) {
|
||||
PathInfo = new DirectoryInfo(path);
|
||||
AuthorId = b.AuthorId;
|
||||
BlogEntryId = b.Id;
|
||||
}
|
||||
public string AuthorId { get; private set; }
|
||||
public long BlogEntryId { get; private set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
9
src/Yavsc/ViewModels/Auth/ModerationRequirement.cs
Normal file
9
src/Yavsc/ViewModels/Auth/ModerationRequirement.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using Microsoft.AspNet.Authorization;
|
||||
|
||||
namespace Yavsc.ViewModels.Auth
|
||||
{
|
||||
public class ModerationRequirement : IAuthorizationRequirement
|
||||
{
|
||||
public ModerationRequirement() {}
|
||||
}
|
||||
}
|
||||
8
src/Yavsc/ViewModels/Auth/PrivateChatEntryRequirement.cs
Normal file
8
src/Yavsc/ViewModels/Auth/PrivateChatEntryRequirement.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
using Microsoft.AspNet.Authorization;
|
||||
|
||||
namespace Yavsc.ViewModels.Auth
|
||||
{
|
||||
public class PrivateChatEntryRequirement : IAuthorizationRequirement
|
||||
{
|
||||
}
|
||||
}
|
||||
11
src/Yavsc/ViewModels/Auth/ViewFileContext.cs
Normal file
11
src/Yavsc/ViewModels/Auth/ViewFileContext.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using Microsoft.AspNet.FileProviders;
|
||||
|
||||
namespace Yavsc.ViewModels.Auth
|
||||
{
|
||||
public class ViewFileContext
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
public IFileInfo File { get; set; }
|
||||
public string Path { get; set; }
|
||||
}
|
||||
}
|
||||
11
src/Yavsc/ViewModels/Auth/ViewRequirement.cs
Normal file
11
src/Yavsc/ViewModels/Auth/ViewRequirement.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using Microsoft.AspNet.Authorization;
|
||||
|
||||
namespace Yavsc.ViewModels.Auth
|
||||
{
|
||||
public class ViewRequirement : IAuthorizationRequirement
|
||||
{
|
||||
public ViewRequirement()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
using System.Linq;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.ViewModels.FrontOffice
|
||||
{
|
||||
public class PerformerProfileViewModel
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
public string PerformerId { get; set; }
|
||||
public bool Active { get; set; }
|
||||
public bool AcceptNotifications { get; set; }
|
||||
public bool AcceptPublicContact { get; set; }
|
||||
public UserActivity Context { get; set; }
|
||||
|
||||
public object Settings { get; set; }
|
||||
public UserActivity[] Extra { get; set; }
|
||||
|
||||
public string WebSite { get; set; }
|
||||
public string SettingsClassName { get; set; }
|
||||
|
||||
public PerformerProfileViewModel(PerformerProfile profile, string activityCode, object settings)
|
||||
{
|
||||
UserName = profile.Performer.UserName;
|
||||
PerformerId = profile.PerformerId;
|
||||
Active = profile.Active;
|
||||
AcceptNotifications = profile.AcceptNotifications;
|
||||
AcceptPublicContact = profile.AcceptPublicContact;
|
||||
Context = profile.Activity.FirstOrDefault(a => a.DoesCode == activityCode);
|
||||
SettingsClassName = Context.Does.SettingsClassName;
|
||||
|
||||
Settings = settings;
|
||||
WebSite = profile.WebSite;
|
||||
Extra = profile.Activity.Where(a => a.DoesCode != activityCode).ToArray();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
19
src/Yavsc/ViewModels/Gen/PdfGenerationViewModel.cs
Normal file
19
src/Yavsc/ViewModels/Gen/PdfGenerationViewModel.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
|
||||
namespace Yavsc.ViewModels.Gen
|
||||
{
|
||||
public class PdfGenerationViewModel
|
||||
{
|
||||
|
||||
[Required]
|
||||
public string TeXSource { get; set; }
|
||||
[Required]
|
||||
public string BaseFileName { get; set; }
|
||||
[Required]
|
||||
public string DestDir { get; set; }
|
||||
public bool Generated { get; set; }
|
||||
public HtmlString GenerationErrorMessage { get; set; }
|
||||
public string Temp { get; set; }
|
||||
}
|
||||
}
|
||||
13
src/Yavsc/ViewModels/Manage/ChangeUserNameViewModel.cs
Normal file
13
src/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
src/Yavsc/ViewModels/Manage/ConfigureTwoFactorViewModel.cs
Normal file
12
src/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; }
|
||||
}
|
||||
}
|
||||
55
src/Yavsc/ViewModels/Manage/IndexViewModel.cs
Normal file
55
src/Yavsc/ViewModels/Manage/IndexViewModel.cs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.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 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 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; }
|
||||
|
||||
}
|
||||
}
|
||||
13
src/Yavsc/ViewModels/Manage/ManageLoginsViewModel.cs
Normal file
13
src/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; }
|
||||
}
|
||||
}
|
||||
16
src/Yavsc/ViewModels/Streaming/LiveCastMeta.cs
Normal file
16
src/Yavsc/ViewModels/Streaming/LiveCastMeta.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Concurrent;
|
||||
using System.Net.WebSockets;
|
||||
|
||||
namespace Yavsc.ViewModels.Streaming
|
||||
{
|
||||
public class LiveCastClient {
|
||||
public string UserName { get; set; }
|
||||
public WebSocket Socket { get; set; }
|
||||
}
|
||||
|
||||
public class LiveCastMeta
|
||||
{
|
||||
public WebSocket Socket { get; set; }
|
||||
public ConcurrentDictionary<string, WebSocket> Listeners { get; set; } = new ConcurrentDictionary<string, WebSocket>();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue