v1.2.11.3 deployed
This commit is contained in:
@@ -142,6 +142,20 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
}
|
||||
}
|
||||
}
|
||||
public class Api
|
||||
{
|
||||
public static class Session
|
||||
{
|
||||
public static class Cookie
|
||||
{
|
||||
/// <summary>Default cookie name: '.AspNetCore.Session'</summary>
|
||||
public static String Name { get; } = "Saxonite.Api.Session";
|
||||
public static bool HttpOnly { get; } = true;
|
||||
public static TimeSpan IdleTimeout { get; } = SacsSystem.DebugMode ? TimeSpan.FromMinutes(5) : TimeSpan.FromMinutes(15);
|
||||
public static long KeepLoggedInTimeoutMillis { get; } = (long)(SacsSystem.DebugMode ? TimeSpan.FromMinutes(1) : TimeSpan.FromMinutes(5)).TotalMilliseconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
public class Admin
|
||||
{
|
||||
public static class Session
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
//-------------------------------------------------------------------
|
||||
// 1.2.11 6-Jul-2023
|
||||
// - Organisation associations, admin download [Feb24].
|
||||
// - Basic Api app [Apr24].
|
||||
// 1.2.10 11-Oct-2022
|
||||
// - Online organisations display issue fixed.
|
||||
// - User Sport 'Preparing' options.
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace Saxonite.Net.Standard.Base.App
|
||||
public enum Application
|
||||
{
|
||||
Online = 100,
|
||||
Api = 400,
|
||||
Admin = 900,
|
||||
}
|
||||
|
||||
|
||||
@@ -53,21 +53,21 @@ namespace Saxonite.Net.Standard.Base.Consoles
|
||||
if (EmailContainsTag(emailData, EmailTag_MainStylesheet))
|
||||
{
|
||||
// Tag replacement is expanded to avoid reading main stylesheet resource unless required.
|
||||
ReplaceDynamicEmailTag(emailData, EmailTag_MainStylesheet, "<style>\n" + SaxResourceHelper.GetTextResource(SaxResourceHelper.TextResource.Email_Main_Css) + "</style>");
|
||||
ReplaceDynamicEmailTag(emailData, EmailTag_MainStylesheet, "<style>\n" + SaxResourceHelper.GetResourceText(SaxResourceHelper.TextResource.Email_Main_Css) + "</style>");
|
||||
}
|
||||
|
||||
// Partial content - Header.
|
||||
if (EmailContainsTag(emailData, EmailTag_Header))
|
||||
{
|
||||
// Tag replacement is expanded to avoid reading Header resource unless required.
|
||||
ReplaceDynamicEmailTag(emailData, EmailTag_Header, SaxResourceHelper.GetTextResource(SaxResourceHelper.TextResource.Email_Header_Html));
|
||||
ReplaceDynamicEmailTag(emailData, EmailTag_Header, SaxResourceHelper.GetResourceText(SaxResourceHelper.TextResource.Email_Header_Html));
|
||||
}
|
||||
|
||||
// Partial content - Footer.
|
||||
if (EmailContainsTag(emailData, EmailTag_Footer))
|
||||
{
|
||||
// Tag replacement is expanded to avoid reading Footer resource unless required.
|
||||
ReplaceDynamicEmailTag(emailData, EmailTag_Footer, SaxResourceHelper.GetTextResource(SaxResourceHelper.TextResource.Email_Footer_Html));
|
||||
ReplaceDynamicEmailTag(emailData, EmailTag_Footer, SaxResourceHelper.GetResourceText(SaxResourceHelper.TextResource.Email_Footer_Html));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using Sarand.Net.Standard.Base.Helpers;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
@@ -31,9 +32,15 @@ namespace Saxonite.Net.Standard.Base.Helpers
|
||||
Saxonite_logo_h75_png,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public static Assembly MyAssembly { get; } = typeof(SaxResourceHelper).GetTypeInfo().Assembly;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Text resources.
|
||||
public static String GetTextResource(TextResource textResource)
|
||||
|
||||
/// <summary> Retrieve contents of text resource in this assembly by type.</summary>
|
||||
public static String GetResourceText(TextResource textResource)
|
||||
{
|
||||
String partialPath = "";
|
||||
String resourceFilename = "";
|
||||
@@ -62,11 +69,16 @@ namespace Saxonite.Net.Standard.Base.Helpers
|
||||
resourceFilename = "CountriesWithRegions.txt";
|
||||
break;
|
||||
}
|
||||
if (!StringUtil.IsEmpty(resourceFilename))
|
||||
return GetResourceText(resourceFilename, partialPath);
|
||||
}
|
||||
|
||||
/// <summary> Retrieve contents of text resource in this assembly by name.</summary>
|
||||
public static String GetResourceText(String resourceFilename, String partialPath = "")
|
||||
{
|
||||
if (!StringUtil.IsBlank(resourceFilename))
|
||||
{
|
||||
var assembly = typeof(SaxResourceHelper).GetTypeInfo().Assembly;
|
||||
String resourceText = SacsResourceHelper.GetManifestResourceAsText(assembly, partialPath, resourceFilename);
|
||||
if (!StringUtil.IsEmpty(resourceText))
|
||||
String resourceText = SacsResourceHelper.GetManifestResourceAsText(MyAssembly, partialPath, resourceFilename);
|
||||
if (!StringUtil.IsBlank(resourceText))
|
||||
return resourceText;
|
||||
}
|
||||
return "";
|
||||
@@ -74,7 +86,7 @@ namespace Saxonite.Net.Standard.Base.Helpers
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Image resources.
|
||||
public static byte[] GetImageResource(ImageResource imageResource)
|
||||
public static byte[] GetResourceImage(ImageResource imageResource)
|
||||
{
|
||||
String partialPath = "";
|
||||
String resourceFilename = "";
|
||||
@@ -94,6 +106,21 @@ namespace Saxonite.Net.Standard.Base.Helpers
|
||||
return new byte[0];
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Resource stream.
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve stream to resource in this assembly.
|
||||
/// </summary>
|
||||
public static Stream GetResourceStream(String resourceFilename, String partialPath = "")
|
||||
{
|
||||
if (!StringUtil.IsBlank(resourceFilename))
|
||||
{
|
||||
return SacsResourceHelper.GetManifestResourceStream(MyAssembly, partialPath, resourceFilename);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
|
||||
@@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Saxonite.Net.Standard.Base.App;
|
||||
using Sarand.Net.Standard.Proc.Excel;
|
||||
|
||||
namespace Saxonite.Net.Standard.Base.Procs
|
||||
{
|
||||
@@ -53,6 +54,34 @@ namespace Saxonite.Net.Standard.Base.Procs
|
||||
public SaxItemDataMgr ItemDataMgr { get { return Internals.ItemDataMgr; } }
|
||||
public SaxSupportMgr SupportMgr { get { return Internals.SupportMgr; } }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Excel Spreadsheet utilities.
|
||||
//-------------------------------------------------------------------
|
||||
protected virtual SaMsExcelColumnHeading_Config GetExcelColumnHeadingConfig()
|
||||
{
|
||||
SaMsExcelColumnHeading_Config configHeading = new SaMsExcelColumnHeading_Config();
|
||||
configHeading.FontAttr.Name = "Arial";
|
||||
configHeading.FontAttr.HeightInPoints = 10;
|
||||
configHeading.FontAttr.ColourIndex = SaXlColourIndex.DarkBlue;
|
||||
configHeading.FontAttr.Bold = true;
|
||||
configHeading.HeadingTextWrap = true;
|
||||
configHeading.ForegroundColourIndex = SaXlColourIndex.LightYellow;
|
||||
configHeading.BorderWeight = SaXlBorderWeight.Medium;
|
||||
return configHeading;
|
||||
}
|
||||
|
||||
protected virtual SaMsExcelStyleAttr GetExcelDefaultWorkbookStyle()
|
||||
{
|
||||
SaMsExcelStyleAttr styleAttr = new SaMsExcelStyleAttr();
|
||||
styleAttr.FontAttr.Name = "Arial";
|
||||
styleAttr.FontAttr.HeightInPoints = 9;
|
||||
styleAttr.FontAttr.ColourIndex = SaXlColourIndex.Black;
|
||||
styleAttr.HorizontalAlignment = (short)XlHAlign.xlHAlignLeft;
|
||||
styleAttr.VerticalAlignment = (short)XlVAlign.xlVAlignTop;
|
||||
styleAttr.WrapText = true;
|
||||
return styleAttr;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"EmailConfigs": {
|
||||
"SAX-SF-Dev": {
|
||||
"Message": {
|
||||
"AddressFrom": "DoNotReply@sportierre.com"
|
||||
},
|
||||
"SMTP": {
|
||||
"Server": "smtp.ionos.co.uk",
|
||||
"ServerPort": 587,
|
||||
"UseSSL": true
|
||||
},
|
||||
"Send": {
|
||||
"Using": 2,
|
||||
"UserName": "info@sportierre.com",
|
||||
"Password": "5p0rTi3rre-info-2021!"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"AppConfigs": {
|
||||
"Saxonite-Dev": {
|
||||
"Environments": [ "Development" ],
|
||||
"Instance": "Dev",
|
||||
"URLs": {
|
||||
"Online": {
|
||||
"Root": "https://localhost:44364/"
|
||||
}
|
||||
},
|
||||
"Databases": {
|
||||
"Core": {
|
||||
"Location": "MsSql:Sarand110\\SQL2016.Saxonite_Core_Dev",
|
||||
"User": "saxonite",
|
||||
"Password": "sax-dev-2021"
|
||||
},
|
||||
"Support": {
|
||||
"Location": "MsSql:Sarand110\\SQL2016.Saxonite_Support_Dev",
|
||||
"User": "saxonite",
|
||||
"Password": "sax-dev-2021"
|
||||
}
|
||||
},
|
||||
"Email": {
|
||||
"Context": "SAX-SF-Dev",
|
||||
"ContactUs": {
|
||||
"AddressesTo": [ "info@sportierre.com" ]
|
||||
}
|
||||
},
|
||||
"Documents": {
|
||||
"RootFolder": "D:\\Sarand\\Projects\\Users\\AHoward\\VS2022\\Saxonite\\Docs"
|
||||
},
|
||||
"Logging": {
|
||||
"RootFolder": "D:\\Sarand\\Projects\\Users\\AHoward\\VS2022\\Saxonite\\Logs"
|
||||
}
|
||||
},
|
||||
"Saxonite-Test": {
|
||||
"Environments": [ "Production" ],
|
||||
"Instance": "QC",
|
||||
"Databases": {
|
||||
"Core": {
|
||||
"Location": "MsSql:Sarand110\\SQL2016.Saxonite_Core_Dev",
|
||||
"User": "saxonite",
|
||||
"Password": "sax-dev-2021"
|
||||
}
|
||||
},
|
||||
"Email": {
|
||||
"Context": "SAX-SF-Dev",
|
||||
"ContactUs": {
|
||||
"AddressesTo": [ "info@sportierre.com" ],
|
||||
"AddressesBcc": []
|
||||
|
||||
}
|
||||
},
|
||||
"Documents": {
|
||||
"RootFolder": "D:\\Sarand\\Projects\\Users\\AHoward\\VS2022\\Saxonite\\Docs"
|
||||
},
|
||||
"Logging": {
|
||||
"RootFolder": "D:\\Sarand\\Projects\\Users\\AHoward\\VS2022\\Saxonite\\QC\\Logs"
|
||||
},
|
||||
"Variants": [
|
||||
{
|
||||
"ApplicationRootFolder": "D:\\Sarand\\Projects\\Users\\AHoward\\VS2022\\Saxonite\\QC2\\App",
|
||||
"Instance": "QC",
|
||||
"Logging": {
|
||||
"RootFolder": "D:\\Sarand\\Projects\\Users\\AHoward\\VS2022\\Saxonite\\QC2\\Logs"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"AppConfigs": {
|
||||
"SAX-Prod": {
|
||||
"Environments": [ "Production" ],
|
||||
"Instance": "",
|
||||
"URLs": {
|
||||
"Online": {
|
||||
"Root": "https://sportierre.com/"
|
||||
}
|
||||
},
|
||||
"Databases": {
|
||||
"Core": {
|
||||
"Location": "MsSql:.\\SQL2016Exp.Saxonite_Core_Demo",
|
||||
"User": "sax-demo-user",
|
||||
"Password": "sax-demo-202105"
|
||||
},
|
||||
"Support": {
|
||||
"Location": "MsSql:.\\SQL2016Exp.Saxonite_Support_Demo",
|
||||
"User": "sax-demo-user",
|
||||
"Password": "sax-demo-202105"
|
||||
}
|
||||
},
|
||||
"Security": {
|
||||
"Password": {
|
||||
"MinLength": 9
|
||||
},
|
||||
"SignIn": {
|
||||
"KeepLoggedIn": {
|
||||
"Allowed": true,
|
||||
"CookieExpiresDays": 5
|
||||
},
|
||||
"PasswordRequest": {
|
||||
"LinkExpiresMins": 30
|
||||
}
|
||||
}
|
||||
},
|
||||
"Email": {
|
||||
"Context": "SAX-SF-Prod",
|
||||
"ContactUs": {
|
||||
"AddressesTo": [],
|
||||
"AddressesBcc": [ "info@sportierre.com" ]
|
||||
},
|
||||
"Signup": {
|
||||
"Activate": {
|
||||
"AddressesBcc": [ "info@sportierre.com" ]
|
||||
},
|
||||
"Welcome": {
|
||||
"AddressesBcc": [ "info@sportierre.com" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
"Documents": {
|
||||
"RootFolder": "C:\\Sarand\\Saxonite\\Demo\\Docs"
|
||||
},
|
||||
"Logging": {
|
||||
"RootFolder": "C:\\Sarand\\Saxonite\\Demo\\Logs"
|
||||
},
|
||||
"Variants": [
|
||||
{
|
||||
"ApplicationRootFolder": "C:\\Sarand\\Saxonite\\Demo",
|
||||
"Instance": "Demo",
|
||||
"Documents": {
|
||||
"RootFolder": "C:\\Sarand\\Saxonite\\Demo\\Docs"
|
||||
},
|
||||
"Logging": {
|
||||
"RootFolder": "C:\\Sarand\\Saxonite\\Demo\\Logs"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"EmailConfigs": {
|
||||
"SAX-SF-Prod": {
|
||||
"Message": {
|
||||
"AddressFrom": "DoNotReply@sportierre.com"
|
||||
},
|
||||
"SMTP": {
|
||||
"Server": "smtp.ionos.co.uk",
|
||||
"ServerPort": 587,
|
||||
"UseSSL": true
|
||||
},
|
||||
"Send": {
|
||||
"Using": 2,
|
||||
"UserName": "info@sportierre.com",
|
||||
"Password": "5p0rTi3rre-info-2021!"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
Reference in New Issue
Block a user