v1.2.6.0
This commit is contained in:
@@ -73,8 +73,29 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
public static int Periodic { get; } = SacsSystem.DebugMode ? 120 : 1800;
|
||||
}
|
||||
}
|
||||
public static class Profile
|
||||
{
|
||||
public static class User
|
||||
{
|
||||
public static class Image
|
||||
{
|
||||
public static ushort WidthMax { get; } = 320;
|
||||
public static ushort HeightMax { get; } = 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
public static class Articles
|
||||
{
|
||||
public static class Segments
|
||||
{
|
||||
public static ushort Max { get; } = 12;
|
||||
public static ushort CharsMax { get; } = 8000;
|
||||
}
|
||||
public static class Images
|
||||
{
|
||||
public static ushort WidthMax { get; } = 800;
|
||||
public static ushort HeightMax { get; } = 640;
|
||||
}
|
||||
public static ushort PublishMaxDaysBefore { get; } = 7;
|
||||
public static ushort PublishMaxDaysAhead { get; } = 10;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
public static class Version
|
||||
{
|
||||
private static String version { get; } = "1.2.5.1";
|
||||
private static String version { get; } = "1.2.6.0";
|
||||
// Retrieve version.
|
||||
public static String GetFullVersion () { return version; }
|
||||
public static String GetAppVersion ()
|
||||
@@ -40,6 +40,8 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
// Version history.
|
||||
//-------------------------------------------------------------------
|
||||
// 1.2.6 ??-May-2022 Image resizing
|
||||
// - Profile and article images resized to maximum width/height.
|
||||
// 1.2.5 20-Apr-2022 Article feedback
|
||||
// - Online Activity/Article feedback 5 stars, summary on Article list/popup.
|
||||
// - Online Activity filter.
|
||||
|
||||
@@ -211,6 +211,37 @@ namespace Saxonite.Net.Standard.Base.Bus
|
||||
return new ItemId((short)Sax.DataItemType.ItemImage, Id);
|
||||
}
|
||||
|
||||
// Validation.
|
||||
public static List<Sax.DataItemType> ValidItemTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
return new List<Sax.DataItemType> { Sax.DataItemType.UserAccount, Sax.DataItemType.Organisation, Sax.DataItemType.Article };
|
||||
}
|
||||
}
|
||||
public static List<Sacs.MimeType> GetValidMimeTypes(Sax.DataItemType itemType)
|
||||
{
|
||||
switch (itemType)
|
||||
{
|
||||
case Sax.DataItemType.UserAccount:
|
||||
case Sax.DataItemType.Organisation:
|
||||
case Sax.DataItemType.Article:
|
||||
return new List<Sacs.MimeType> { Sacs.MimeType.Jpeg, Sacs.MimeType.Webp, Sacs.MimeType.Png };
|
||||
}
|
||||
return new List<Sacs.MimeType>();
|
||||
}
|
||||
public static List<String> GetValidContentTypes(Sax.DataItemType itemType)
|
||||
{
|
||||
switch (itemType)
|
||||
{
|
||||
case Sax.DataItemType.UserAccount:
|
||||
case Sax.DataItemType.Organisation:
|
||||
case Sax.DataItemType.Article:
|
||||
return new List<string> { "image/jpg", "image/jpeg", "image/webp", "image/png" };
|
||||
}
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
|
||||
@@ -72,10 +72,18 @@ namespace Saxonite.Net.Standard.Base.Mgr
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Item Id.
|
||||
if (errField.ItemId != SacsHierarchyItem.ValidValue.Ignore && !ItemId.IsValid(data.ItemId))
|
||||
if (errField.ItemId != SacsHierarchyItem.ValidValue.Ignore)
|
||||
{
|
||||
errField.ItemId = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState("Item Id must be specified");
|
||||
if (!ItemId.IsValid(data.ItemId))
|
||||
{
|
||||
errField.ItemId = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState("Item Id must be specified");
|
||||
}
|
||||
if (!SaxItemImage.ValidItemTypes.Contains((Sax.DataItemType)data.ItemId.Type))
|
||||
{
|
||||
errField.ItemId = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return SetErrorState("Invalid item type specified");
|
||||
}
|
||||
}
|
||||
// Image type.
|
||||
if (errField.ImageType != SacsHierarchyItem.ValidValue.Ignore && (int)data.ImageType < 1)
|
||||
|
||||
Reference in New Issue
Block a user