Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
support committed Dec 23, 2023
1 parent 10499ff commit fd10f5a
Show file tree
Hide file tree
Showing 449 changed files with 536 additions and 28,796 deletions.
28 changes: 27 additions & 1 deletion GrandNode.sln
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grand.Web.Common.Tests", "s
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grand.Web.Vendor", "src\Web\Grand.Web.Vendor\Grand.Web.Vendor.csproj", "{061F07B8-067A-43E6-B0FF-250027EE705F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Themes", "Themes", "{A3C011A2-F29C-42BE-9ED0-269E1447BADD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grand.Web.Models", "src\Web\Grand.Web.Models\Grand.Web.Models.csproj", "{68C8E712-4F32-4018-9037-71627EF11183}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{E87D3FAC-3BC3-433A-99A6-2EC31ABD6E73}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebUI.BasicTheme", "src\Themes\WebUI.BasicTheme\WebUI.BasicTheme.csproj", "{EEB90339-F110-41C4-840F-0082038A8A53}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebUI.ApiTheme", "src\Themes\WebUI.ApiTheme\WebUI.ApiTheme.csproj", "{534F6B76-582C-40DA-9A65-62A1AEE03FE1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -336,6 +346,18 @@ Global
{061F07B8-067A-43E6-B0FF-250027EE705F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{061F07B8-067A-43E6-B0FF-250027EE705F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{061F07B8-067A-43E6-B0FF-250027EE705F}.Release|Any CPU.Build.0 = Release|Any CPU
{68C8E712-4F32-4018-9037-71627EF11183}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68C8E712-4F32-4018-9037-71627EF11183}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68C8E712-4F32-4018-9037-71627EF11183}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68C8E712-4F32-4018-9037-71627EF11183}.Release|Any CPU.Build.0 = Release|Any CPU
{EEB90339-F110-41C4-840F-0082038A8A53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EEB90339-F110-41C4-840F-0082038A8A53}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EEB90339-F110-41C4-840F-0082038A8A53}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EEB90339-F110-41C4-840F-0082038A8A53}.Release|Any CPU.Build.0 = Release|Any CPU
{534F6B76-582C-40DA-9A65-62A1AEE03FE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{534F6B76-582C-40DA-9A65-62A1AEE03FE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{534F6B76-582C-40DA-9A65-62A1AEE03FE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{534F6B76-582C-40DA-9A65-62A1AEE03FE1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -354,7 +376,6 @@ Global
{9B4BF192-F99A-4969-8472-A0C36B615DB3} = {6EAC4D2C-4A86-4C9F-8427-CB374F69F08C}
{6F9902AA-DBCE-4BB8-AEBE-47264A10D933} = {6EAC4D2C-4A86-4C9F-8427-CB374F69F08C}
{D2E8AC42-2751-4AF9-87E4-54A8B2034360} = {6EAC4D2C-4A86-4C9F-8427-CB374F69F08C}
{1A6A0104-F610-4DD3-88BE-C4029034E5DA} = {38ECA068-176F-463C-A1D7-044341D4CACB}
{34A46D97-5996-46B3-BDCA-631EDAA0E210} = {FA350BD6-C29D-40D9-BA47-FE5FBDFC84A0}
{BA4579AF-9C20-477A-891B-926968B11C68} = {F6F48227-B3C5-4A51-B33F-FF9AD96352DB}
{6F24BF9C-EA4E-42AB-A9A8-435CE69362B8} = {F6F48227-B3C5-4A51-B33F-FF9AD96352DB}
Expand Down Expand Up @@ -391,6 +412,11 @@ Global
{0B2B4B1B-EBF7-447F-9E5F-C55CE3247929} = {6360202A-F931-4BBD-ADBD-C9A628EE59F8}
{6969D83E-567C-47A7-8E7F-7FE40940704E} = {6360202A-F931-4BBD-ADBD-C9A628EE59F8}
{061F07B8-067A-43E6-B0FF-250027EE705F} = {38ECA068-176F-463C-A1D7-044341D4CACB}
{E87D3FAC-3BC3-433A-99A6-2EC31ABD6E73} = {38ECA068-176F-463C-A1D7-044341D4CACB}
{68C8E712-4F32-4018-9037-71627EF11183} = {E87D3FAC-3BC3-433A-99A6-2EC31ABD6E73}
{1A6A0104-F610-4DD3-88BE-C4029034E5DA} = {E87D3FAC-3BC3-433A-99A6-2EC31ABD6E73}
{EEB90339-F110-41C4-840F-0082038A8A53} = {A3C011A2-F29C-42BE-9ED0-269E1447BADD}
{534F6B76-582C-40DA-9A65-62A1AEE03FE1} = {A3C011A2-F29C-42BE-9ED0-269E1447BADD}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {88B478F4-FD3B-4C24-9E84-4FAAF0254397}
Expand Down
38 changes: 0 additions & 38 deletions src/Core/Grand.Infrastructure/Plugins/ThemeInfo.cs

This file was deleted.

4 changes: 4 additions & 0 deletions src/Core/Grand.Infrastructure/StartupBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Grand.Infrastructure.Mapper;
using Grand.Infrastructure.Plugins;
using Grand.Infrastructure.Roslyn;
using Grand.Infrastructure.Themes;
using Grand.Infrastructure.TypeConverters;
using Grand.Infrastructure.TypeSearch;
using Grand.Infrastructure.Validators;
Expand Down Expand Up @@ -138,6 +139,9 @@ private static void RegisterExtensions(IMvcCoreBuilder mvcCoreBuilder, IConfigur
//Load plugins
PluginManager.Load(mvcCoreBuilder, configuration);

//Load themes
ThemeManager.Load(mvcCoreBuilder, configuration);

//Load CTX scripts
RoslynCompiler.Load(mvcCoreBuilder.PartManager, configuration);
}
Expand Down
70 changes: 70 additions & 0 deletions src/Core/Grand.Infrastructure/Themes/ThemeInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
using Grand.SharedKernel;
using Microsoft.Extensions.DependencyInjection;
using System.Reflection;

namespace Grand.Infrastructure.Themes
{
public sealed class ThemeInfo
{
public ThemeInfo(
FileInfo originalAssemblyFile,
Assembly referencedAssembly)
: this()
{
ReferencedAssembly = referencedAssembly;
OriginalAssemblyFile = originalAssemblyFile;
}
public ThemeInfo()
{
}

/// <summary>
/// The assembly that has been shadow copied that is active in the application
/// </summary>
public Assembly ReferencedAssembly { get; internal set; }

/// <summary>
/// The original assembly file that a shadow copy was made from it
/// </summary>
public FileInfo OriginalAssemblyFile { get; internal set; }

public string ThemeFileName { get; set; }

/// <summary>
/// Gets or sets the theme system name
/// </summary>
public string SystemName { get; set; }

/// <summary>
/// Gets or sets the theme friendly name
/// </summary>
public string FriendlyName { get; set; }

/// <summary>
/// Gets or sets the author of theme
/// </summary>
public string Author { get; set; }

public string SupportedVersion { get; set; }

/// <summary>
/// Gets or sets the theme system name
/// </summary>
public string Version { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the theme supports RTL (right-to-left)
/// </summary>
public bool SupportRtl { get; set; }

/// <summary>
/// Gets or sets the path to the preview image of the theme
/// </summary>
public string PreviewImageUrl { get; set; }

/// <summary>
/// Gets or sets the preview text of the theme
/// </summary>
public string PreviewText { get; set; }
}
}
27 changes: 27 additions & 0 deletions src/Core/Grand.Infrastructure/Themes/ThemeInfoAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System.Reflection;

namespace Grand.Infrastructure.Themes
{
[AttributeUsage(AttributeTargets.Assembly)]
public class ThemeInfoAttribute : Attribute
{
public ThemeInfoAttribute()
{
Assembly assembly = Assembly.GetExecutingAssembly();
Version fullVersion = assembly.GetName().Version;
SupportedVersion = $"{fullVersion?.Minor}.{fullVersion?.Major}";

}
public string FriendlyName { get; set; } = string.Empty;
public string SystemName { get; set; } = string.Empty;
public string Author { get; set; } = string.Empty;

public string SupportedVersion { get; set; }

public string Version { get; set; }

public bool SupportRtl { get; set; }
public string PreviewImageUrl { get; set; }= string.Empty;
public string PreviewText { get; set; }= string.Empty;
}
}
Loading

0 comments on commit fd10f5a

Please sign in to comment.