This commit is contained in:
JacobTech 2024-11-18 23:25:19 -05:00
parent 5c5b975b93
commit e891c3ea6b
8 changed files with 73 additions and 66 deletions

View File

@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Title>Luski.Shared</Title> <Title>Luski.Shared</Title>
<Version>1.1.0-alpha44</Version> <Version>1.1.0-alpha48</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -9,18 +9,9 @@ public class CategoryPostCTS : CTS
[JsonInclude] [JsonInclude]
[JsonPropertyName("parent")] [JsonPropertyName("parent")]
public long Parent { get; set; } public long Parent { get; set; }
[JsonInclude]
[JsonPropertyName("color_type")]
public ColorType ColorType { get; set; } = ColorType.Full;
[JsonInclude]
[JsonPropertyName("color")]
public string Color { get; set; } = string.Empty;
[JsonInclude] [JsonInclude]
[JsonPropertyName("name")] [JsonPropertyName("name")]
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;
[JsonInclude] [JsonInclude]
[JsonPropertyName("description")] [JsonPropertyName("description")]
public string Description { get; set; } = string.Empty; public string Description { get; set; } = string.Empty;

View File

@ -10,12 +10,6 @@ public class ChannelPostCTS : CTS
[JsonPropertyName("parent")] [JsonPropertyName("parent")]
public long Parent { get; set; } public long Parent { get; set; }
[JsonInclude] [JsonInclude]
[JsonPropertyName("color_type")]
public ColorType ColorType { get; set; } = ColorType.Full;
[JsonInclude]
[JsonPropertyName("color")]
public string Color { get; set; } = string.Empty;
[JsonInclude]
[JsonPropertyName("type")] [JsonPropertyName("type")]
public ChannelType Type { get; set; } = ChannelType.TextAndVoice; public ChannelType Type { get; set; } = ChannelType.TextAndVoice;
[JsonInclude] [JsonInclude]

View File

@ -157,4 +157,16 @@ public enum ServerPermission : long
[GlobalAttributes.DisplayName("Create Profiles")] [GlobalAttributes.DisplayName("Create Profiles")]
[Category("Personalization")] [Category("Personalization")]
CreateProfile = 0b_0000000000000000000000000001000000000000000000000000000000000000, CreateProfile = 0b_0000000000000000000000000001000000000000000000000000000000000000,
[Description("User can change profile text restrictions")]
[GlobalAttributes.DisplayName("Change Profile Text Restrictions")]
[Category("General")]
ChangeProfileTextRestrictions = 0b_0000000000000000000000000010000000000000000000000000000000000000,
[Description("User can change channel title text restrictions")]
[GlobalAttributes.DisplayName("Change Channel Title Text Restrictions")]
[Category("General")]
ChangeChannelTitleTextRestrictions = 0b_0000000000000000000000000100000000000000000000000000000000000000,
[Description("User can change category title text restrictions")]
[GlobalAttributes.DisplayName("Change Category Title Text Restrictions")]
[Category("General")]
ChangeCategoryTitleTextRestrictions = 0b_0000000000000000000000001000000000000000000000000000000000000000,
} }

View File

@ -0,0 +1,13 @@
namespace Luski.Shared.PublicServers.V1.Enums;
[Flags]
public enum TextModification : byte
{
Rainbow = 0b_0000_0001,
Gradient = 0b_0000_0010,
Color = 0b_0000_0100,
FontSize = 0b_0000_1000,
PX = 0b_0001_0000,
URL = 0b_0010_0000,
Italic = 0b_0100_0000,
}

View File

@ -13,12 +13,6 @@ public class CategorySTC : STC
[JsonPropertyName("picture_type")] [JsonPropertyName("picture_type")]
public PictureType PictureType { get; set; } public PictureType PictureType { get; set; }
[JsonInclude] [JsonInclude]
[JsonPropertyName("color_type")]
public ColorType ColorType { get; set; } = ColorType.Full;
[JsonInclude]
[JsonPropertyName("color")]
public string Color { get; set; } = string.Empty;
[JsonInclude]
[JsonPropertyName("name")] [JsonPropertyName("name")]
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;
[JsonInclude] [JsonInclude]

View File

@ -13,12 +13,6 @@ public class ChannelSTC : STC
[JsonPropertyName("parent")] [JsonPropertyName("parent")]
public long Parent { get; set; } public long Parent { get; set; }
[JsonInclude] [JsonInclude]
[JsonPropertyName("color_type")]
public ColorType ColorType { get; set; } = ColorType.Full;
[JsonInclude]
[JsonPropertyName("color")]
public string Color { get; set; } = string.Empty;
[JsonInclude]
[JsonPropertyName("type")] [JsonPropertyName("type")]
public ChannelType Type { get; set; } public ChannelType Type { get; set; }
[JsonInclude] [JsonInclude]

View File

@ -22,6 +22,15 @@ public class ServerInfoSTC : STC
[JsonPropertyName("picture_type")] [JsonPropertyName("picture_type")]
public PictureType PictureType { get; set; } public PictureType PictureType { get; set; }
[JsonInclude] [JsonInclude]
[JsonPropertyName("allowed_profile_text_modifications")]
public TextModification ProfileModifications { get; set; } = TextModification.Rainbow | TextModification.Gradient | TextModification.Color | TextModification.Italic;
[JsonInclude]
[JsonPropertyName("allowed_channel_text_modifications")]
public TextModification ChannelModifications { get; set; } = TextModification.Rainbow | TextModification.Gradient | TextModification.Color | TextModification.Italic;
[JsonInclude]
[JsonPropertyName("allowed_category_text_modifications")]
public TextModification CategoryModifications { get; set; } = TextModification.Rainbow | TextModification.Gradient | TextModification.Color | TextModification.Italic;
[JsonInclude]
[JsonPropertyName("alternate_servers")] [JsonPropertyName("alternate_servers")]
public ServerData[] AlternateServers { get; set; } =Array.Empty<ServerData>(); public ServerData[] AlternateServers { get; set; } =Array.Empty<ServerData>();
} }