Save
This commit is contained in:
		@@ -1,6 +1,9 @@
 | 
			
		||||
namespace decePubClient.Models;
 | 
			
		||||
using decePubClient.Models.Types;
 | 
			
		||||
 | 
			
		||||
namespace decePubClient.Models;
 | 
			
		||||
 | 
			
		||||
public class ActionBarFilter
 | 
			
		||||
{
 | 
			
		||||
	
 | 
			
		||||
	public TimelineType TimelineType { get; set; } = TimelineType.Home;
 | 
			
		||||
	public TimeSortingType TimeSortingType { get; set; } = TimeSortingType.Ascending;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								Models/Media.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								Models/Media.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
namespace decePubClient.Models
 | 
			
		||||
{
 | 
			
		||||
	public class Media
 | 
			
		||||
	{
 | 
			
		||||
		public string FileName { get; set; }
 | 
			
		||||
		public string Url { get; set; }
 | 
			
		||||
		public string ContentType { get; set; }
 | 
			
		||||
		public string AltText { get; set; }
 | 
			
		||||
		public byte[] Blob { get; set; } //TODO TEMPORARY
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								Models/Mention.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Models/Mention.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
namespace decePubClient.Models
 | 
			
		||||
{
 | 
			
		||||
	public class Mention
 | 
			
		||||
	{
 | 
			
		||||
		public string DisplayName { get; set; }
 | 
			
		||||
		public string UserName { get; set; }
 | 
			
		||||
		public string UserId { get; set; }
 | 
			
		||||
		public string ProfileUrl { get; set; }
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										23
									
								
								Models/Message.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								Models/Message.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
using System.ComponentModel;
 | 
			
		||||
using System.Text.Json.Serialization;
 | 
			
		||||
using decePubClient.Models.Types;
 | 
			
		||||
 | 
			
		||||
namespace decePubClient.Models
 | 
			
		||||
{
 | 
			
		||||
	public class Message
 | 
			
		||||
	{
 | 
			
		||||
		public MessageUser User { get; set; } = new();
 | 
			
		||||
		public MessageType MessageType { get; set; } = MessageType.Public;
 | 
			
		||||
		public string RootMessageId { get; set; }
 | 
			
		||||
		public string MessageId { get; set; }
 | 
			
		||||
		public string Title { get; set; }
 | 
			
		||||
		public string Content { get; set; }
 | 
			
		||||
		public bool IsFavourite { get; set; } = false;
 | 
			
		||||
		public bool IsBoosted { get; set; } = false;
 | 
			
		||||
		public List<Media> Medias { get; set; } = new();
 | 
			
		||||
		public DateTime CreatedAt { get; set; }
 | 
			
		||||
 | 
			
		||||
		[Bindable(false), JsonIgnore]
 | 
			
		||||
		public bool IsOptionsOpen { get; set; } = false;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +1,28 @@
 | 
			
		||||
namespace decePubClient.Models;
 | 
			
		||||
using System.ComponentModel;
 | 
			
		||||
using System.ComponentModel.DataAnnotations;
 | 
			
		||||
using System.Text.Json.Serialization;
 | 
			
		||||
 | 
			
		||||
using decePubClient.Models.Types;
 | 
			
		||||
using decePubClient.Resources;
 | 
			
		||||
 | 
			
		||||
namespace decePubClient.Models;
 | 
			
		||||
 | 
			
		||||
public class MessageForm
 | 
			
		||||
{
 | 
			
		||||
	
 | 
			
		||||
	public string RootMessageId { get; set; }
 | 
			
		||||
 | 
			
		||||
	[Required(ErrorMessageResourceName = ValidationNames.Required, ErrorMessageResourceType = typeof(ErrorMessages))]
 | 
			
		||||
	public MessageType MessageType { get; set; } = MessageType.Public;
 | 
			
		||||
	[Required(ErrorMessageResourceName = ValidationNames.Required, ErrorMessageResourceType = typeof(ErrorMessages))]
 | 
			
		||||
	public ContentType ContentType { get; set; } = ContentType.PlainText;
 | 
			
		||||
	[StringLength(64, ErrorMessageResourceName = ValidationNames.MaxLength, ErrorMessageResourceType = typeof(ErrorMessages))]
 | 
			
		||||
	public string Title { get; set; }
 | 
			
		||||
	[StringLength(5_000, ErrorMessageResourceName = ValidationNames.MaxLength, ErrorMessageResourceType = typeof(ErrorMessages))]
 | 
			
		||||
	public string Content { get; set; }
 | 
			
		||||
	public List<UploadMedia> Media { get; set; } = new();
 | 
			
		||||
 | 
			
		||||
	[JsonIgnore, Bindable(false)]
 | 
			
		||||
	public MediaType MediaType { get; set; } = MediaType.Images;
 | 
			
		||||
	[JsonIgnore, Bindable(false)]
 | 
			
		||||
	public bool IsScopeOptionsOpen { get; set; } = false;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								Models/MessageUser.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								Models/MessageUser.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
namespace decePubClient.Models
 | 
			
		||||
{
 | 
			
		||||
	public class MessageUser
 | 
			
		||||
	{
 | 
			
		||||
		public string UserId { get; set; } = "45f14fa8-c40f-4121-997c-ef2542196a50";
 | 
			
		||||
		public string UserName { get; set; } = "@loosy@letsrulethe.world";
 | 
			
		||||
		public string DisplayName { get; set; } = "loosy";
 | 
			
		||||
		public string PictureUrl { get; set; } = "https://letsrulethe.world/media/c22d7a6dfcce11e4d2d8d4f6298842a36751b0a179dc5333d24663e4b93793b4.jpg";
 | 
			
		||||
		public string BackgroundUrl { get; set; } = "https://letsrulethe.world/media/717cc7f5a090cfbe77be46941060b9a54454c351c74ff2f056363e002c8e2c3f.png";
 | 
			
		||||
		public string ProfileUrl { get; set; } = "https://letsrulethe.world/users/loosy";
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										7
									
								
								Models/SettingsOptions.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								Models/SettingsOptions.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
namespace decePubClient.Models
 | 
			
		||||
{
 | 
			
		||||
	public class SettingsOptions
 | 
			
		||||
	{
 | 
			
		||||
		public bool IsOpen { get; set; }
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +1,8 @@
 | 
			
		||||
namespace decePubClient.Models.Types;
 | 
			
		||||
 | 
			
		||||
public class ContentType
 | 
			
		||||
public enum ContentType
 | 
			
		||||
{
 | 
			
		||||
	
 | 
			
		||||
	PlainText,
 | 
			
		||||
	HTML,
 | 
			
		||||
	Markdown
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								Models/Types/MessageType.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Models/Types/MessageType.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
namespace decePubClient.Models.Types
 | 
			
		||||
{
 | 
			
		||||
	public enum MessageType
 | 
			
		||||
	{
 | 
			
		||||
		Direct,
 | 
			
		||||
		FollowersOnly,
 | 
			
		||||
		Unlisted,
 | 
			
		||||
		Public
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,3 +1,7 @@
 | 
			
		||||
namespace decePubClient.Models.Types;
 | 
			
		||||
 | 
			
		||||
public enum TimeSortingType {  }
 | 
			
		||||
public enum TimeSortingType
 | 
			
		||||
{
 | 
			
		||||
	Ascending,
 | 
			
		||||
	Descending
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +1,16 @@
 | 
			
		||||
namespace decePubClient.Models;
 | 
			
		||||
using System.ComponentModel;
 | 
			
		||||
using System.Text.Json.Serialization;
 | 
			
		||||
 | 
			
		||||
namespace decePubClient.Models;
 | 
			
		||||
 | 
			
		||||
public class UploadMedia
 | 
			
		||||
{
 | 
			
		||||
	
 | 
			
		||||
	public string ContentType { get; set; }
 | 
			
		||||
	public string FileName { get; set; }
 | 
			
		||||
	public string AltText { get; set; }
 | 
			
		||||
	public byte[] Blob { get; set; }
 | 
			
		||||
	public string Base64Preview { get; set; }
 | 
			
		||||
 | 
			
		||||
	[JsonIgnore, Bindable(false)]
 | 
			
		||||
	public long Size { get; set; }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										21
									
								
								Models/User.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								Models/User.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
namespace decePubClient.Models
 | 
			
		||||
{
 | 
			
		||||
	public class User
 | 
			
		||||
	{
 | 
			
		||||
		public string Id { get; set; } = "45f14fa8-c40f-4121-997c-ef2542196a50";
 | 
			
		||||
		public bool IsAuthenticated { get; set; } = false;
 | 
			
		||||
		public List<UserClaim> Claims { get; set; } = new();
 | 
			
		||||
		
 | 
			
		||||
		public string UserName { get; set; } = "@loosy@letsrulethe.world";
 | 
			
		||||
		public string DisplayName { get; set; } = "loosy";
 | 
			
		||||
		public string PictureUrl { get; set; } = "https://letsrulethe.world/media/c22d7a6dfcce11e4d2d8d4f6298842a36751b0a179dc5333d24663e4b93793b4.jpg";
 | 
			
		||||
		public string BackgroundUrl { get; set; } = "https://letsrulethe.world/media/717cc7f5a090cfbe77be46941060b9a54454c351c74ff2f056363e002c8e2c3f.png";
 | 
			
		||||
		public string ProfileUrl { get; set; } = "https://letsrulethe.world/users/loosy";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public class UserClaim
 | 
			
		||||
	{
 | 
			
		||||
		public string Type { get; set; }
 | 
			
		||||
		public string Value { get; set; }
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										7
									
								
								Models/VConstants.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								Models/VConstants.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
namespace decePubClient.Models
 | 
			
		||||
{
 | 
			
		||||
	public static class VConstants
 | 
			
		||||
	{
 | 
			
		||||
		public const string HideClass = "hidden";
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user