Merge pull request #2898 from vnetonline/dev
[ENHANCE] - Added Theme to Name Space [Owner].Theme.[Theme]
This commit is contained in:
commit
8ccee87378
|
@ -142,7 +142,7 @@
|
||||||
if (_owner != "" && _theme != "" && _template != "-")
|
if (_owner != "" && _theme != "" && _template != "-")
|
||||||
{
|
{
|
||||||
var template = _templates.FirstOrDefault(item => item.Name == _template);
|
var template = _templates.FirstOrDefault(item => item.Name == _template);
|
||||||
_location = template.Location + _owner + "." + _theme;
|
_location = template.Location + _owner + ".Theme." + _theme;
|
||||||
|
|
||||||
}
|
}
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
|
|
|
@ -171,12 +171,12 @@ namespace Oqtane.Controllers
|
||||||
if (theme.Template.ToLower().Contains("internal"))
|
if (theme.Template.ToLower().Contains("internal"))
|
||||||
{
|
{
|
||||||
rootPath = Utilities.PathCombine(rootFolder.FullName, Path.DirectorySeparatorChar.ToString());
|
rootPath = Utilities.PathCombine(rootFolder.FullName, Path.DirectorySeparatorChar.ToString());
|
||||||
theme.ThemeName = theme.Owner + "." + theme.Name + ", Oqtane.Client";
|
theme.ThemeName = theme.Owner + ".Theme." + theme.Name + ", Oqtane.Client";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rootPath = Utilities.PathCombine(rootFolder.Parent.FullName, theme.Owner + "." + theme.Name, Path.DirectorySeparatorChar.ToString());
|
rootPath = Utilities.PathCombine(rootFolder.Parent.FullName, theme.Owner + ".Theme." + theme.Name, Path.DirectorySeparatorChar.ToString());
|
||||||
theme.ThemeName = theme.Owner + "." + theme.Name + ", " + theme.Owner + "." + theme.Name + ".Client.Oqtane";
|
theme.ThemeName = theme.Owner + ".Theme." + theme.Name + ", " + theme.Owner + ".Theme." + theme.Name + ".Client.Oqtane";
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessTemplatesRecursively(new DirectoryInfo(templatePath), rootPath, rootFolder.Name, templatePath, theme);
|
ProcessTemplatesRecursively(new DirectoryInfo(templatePath), rootPath, rootFolder.Name, templatePath, theme);
|
||||||
|
|
|
@ -63,4 +63,15 @@
|
||||||
<!-- extends watching group to include *.dll files and exclude the ones cause an infinite loop -->
|
<!-- extends watching group to include *.dll files and exclude the ones cause an infinite loop -->
|
||||||
<Watch Include="**\*.dll" Exclude="**\Microsoft.EntityFrameworkCore.*.dll;**\Oqtane.Database.*.dll;" />
|
<Watch Include="**\*.dll" Exclude="**\Microsoft.EntityFrameworkCore.*.dll;**\Oqtane.Database.*.dll;" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="wwwroot\Themes\Templates\External\Client\wwwroot\Themes\[Owner].Theme.[Theme]\Theme.css" />
|
||||||
|
<Content Include="wwwroot\Themes\Templates\External\Package\icon.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="wwwroot\Themes\Templates\External\Client\[Owner].Theme.[Theme].Client.csproj" />
|
||||||
|
<None Include="wwwroot\Themes\Templates\External\Package\debug.cmd" />
|
||||||
|
<None Include="wwwroot\Themes\Templates\External\Package\release.cmd" />
|
||||||
|
<None Include="wwwroot\Themes\Templates\External\Package\[Owner].Theme.[Theme].nuspec" />
|
||||||
|
<None Include="wwwroot\Themes\Templates\External\Package\[Owner].Theme.[Theme].Package.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System.Resources;
|
using System.Resources;
|
||||||
using Microsoft.Extensions.Localization;
|
using Microsoft.Extensions.Localization;
|
||||||
|
|
||||||
[assembly: RootNamespace("[Owner].[Theme].Client")]
|
[assembly: RootNamespace("[Owner].Theme.[Theme].Client")]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@namespace [Owner].[Theme]
|
@namespace [Owner].Theme.[Theme]
|
||||||
@inherits ContainerBase
|
@inherits ContainerBase
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
using Oqtane.Themes;
|
using Oqtane.Themes;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
|
|
||||||
namespace [Owner].[Theme]
|
namespace [Owner].Theme.[Theme]
|
||||||
{
|
{
|
||||||
public class ThemeInfo : ITheme
|
public class ThemeInfo : ITheme
|
||||||
{
|
{
|
||||||
public Theme Theme => new Theme
|
public Oqtane.Models.Theme Theme => new Oqtane.Models.Theme
|
||||||
{
|
{
|
||||||
Name = "[Theme]",
|
Name = "[Theme]",
|
||||||
Version = "1.0.0",
|
Version = "1.0.0",
|
||||||
PackageName = "[Owner].[Theme]",
|
PackageName = "[Owner].Theme.[Theme]",
|
||||||
Resources = new List<Resource>()
|
Resources = new List<Resource>()
|
||||||
{
|
{
|
||||||
// obtained from https://cdnjs.com/libraries
|
// obtained from https://cdnjs.com/libraries
|
||||||
new Resource { ResourceType = ResourceType.Stylesheet, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/css/bootstrap.min.css", Integrity = "sha512-t4GWSVZO1eC8BM339Xd7Uphw5s17a86tIZIj8qRxhnKub6WoyhnrxeCIMeAqBPgdZGlCcG2PrZjMc+Wr78+5Xg==", CrossOrigin = "anonymous" },
|
new Resource { ResourceType = ResourceType.Stylesheet, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/css/bootstrap.min.css", Integrity = "sha512-t4GWSVZO1eC8BM339Xd7Uphw5s17a86tIZIj8qRxhnKub6WoyhnrxeCIMeAqBPgdZGlCcG2PrZjMc+Wr78+5Xg==", CrossOrigin = "anonymous" },
|
||||||
new Resource { ResourceType = ResourceType.Stylesheet, Url = "~/Theme.css" },
|
new Resource { ResourceType = ResourceType.Stylesheet, Url = "~/Theme.css" },
|
||||||
new Resource { ResourceType = ResourceType.Script, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js", Integrity = "sha512-VK2zcvntEufaimc+efOYi622VN5ZacdnufnmX7zIhCPmjhKnOi9ZDMtg1/ug5l183f19gG1/cBstPO4D8N/Img==", CrossOrigin = "anonymous" }
|
new Resource { ResourceType = ResourceType.Script, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js", Integrity = "sha512-VK2zcvntEufaimc+efOYi622VN5ZacdnufnmX7zIhCPmjhKnOi9ZDMtg1/ug5l183f19gG1/cBstPO4D8N/Img==", CrossOrigin = "anonymous" }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@namespace [Owner].[Theme]
|
@namespace [Owner].Theme.[Theme]
|
||||||
@inherits ThemeBase
|
@inherits ThemeBase
|
||||||
|
|
||||||
<main role="main">
|
<main role="main">
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
<Authors>[Owner]</Authors>
|
<Authors>[Owner]</Authors>
|
||||||
<Company>[Owner]</Company>
|
<Company>[Owner]</Company>
|
||||||
<Description>[Description]</Description>
|
<Description>[Description]</Description>
|
||||||
<Product>[Owner].[Theme]</Product>
|
<Product>[Owner].Theme.[Theme]</Product>
|
||||||
<Copyright>[Owner]</Copyright>
|
<Copyright>[Owner]</Copyright>
|
||||||
<AssemblyName>[Owner].[Theme].Client.Oqtane</AssemblyName>
|
<AssemblyName>[Owner].Theme.[Theme].Client.Oqtane</AssemblyName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
|
@ -1,4 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Client\[Owner].[Theme].Client.csproj" />
|
<ProjectReference Include="..\Client\[Owner].Theme.[Theme].Client.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>[Owner].[Theme]</id>
|
<id>[Owner].Theme.[Theme]</id>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<authors>[Owner]</authors>
|
<authors>[Owner]</authors>
|
||||||
<owners>[Owner]</owners>
|
<owners>[Owner]</owners>
|
||||||
|
@ -20,8 +20,8 @@
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
<file src="..\Client\bin\Release\net7.0\[Owner].[Theme].Client.Oqtane.dll" target="lib\net7.0" />
|
<file src="..\Client\bin\Release\net7.0\[Owner].Theme.[Theme].Client.Oqtane.dll" target="lib\net7.0" />
|
||||||
<file src="..\Client\bin\Release\net7.0\[Owner].[Theme].Client.Oqtane.pdb" target="lib\net7.0" />
|
<file src="..\Client\bin\Release\net7.0\[Owner].Theme.[Theme].Client.Oqtane.pdb" target="lib\net7.0" />
|
||||||
<file src="..\Client\wwwroot\**\*.*" target="wwwroot" />
|
<file src="..\Client\wwwroot\**\*.*" target="wwwroot" />
|
||||||
<file src="icon.png" target="" />
|
<file src="icon.png" target="" />
|
||||||
</files>
|
</files>
|
|
@ -1,3 +1,3 @@
|
||||||
XCOPY "..\Client\bin\Debug\net7.0\[Owner].[Theme].Client.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y
|
XCOPY "..\Client\bin\Debug\net7.0\[Owner].Theme.[Theme].Client.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y
|
||||||
XCOPY "..\Client\bin\Debug\net7.0\[Owner].[Theme].Client.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y
|
XCOPY "..\Client\bin\Debug\net7.0\[Owner].Theme.[Theme].Client.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y
|
||||||
XCOPY "..\Client\wwwroot\*" "..\..\[RootFolder]\Oqtane.Server\wwwroot\" /Y /S /I
|
XCOPY "..\Client\wwwroot\*" "..\..\[RootFolder]\Oqtane.Server\wwwroot\" /Y /S /I
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
"..\..\[RootFolder]\oqtane.package\nuget.exe" pack [Owner].[Theme].nuspec
|
"..\..\[RootFolder]\oqtane.package\nuget.exe" pack [Owner].Theme.[Theme].nuspec
|
||||||
XCOPY "*.nupkg" "..\..\[RootFolder]\Oqtane.Server\wwwroot\Themes\" /Y
|
XCOPY "*.nupkg" "..\..\[RootFolder]\Oqtane.Server\wwwroot\Themes\" /Y
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 16
|
|
||||||
VisualStudioVersion = 16.0.28621.142
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oqtane.Server", "..\[RootFolder]\Oqtane.Server\Oqtane.Server.csproj", "{3AB6FCC9-EFEB-4C0E-A2CF-8103914C5196}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "[Owner].[Theme].Client", "Client\[Owner].[Theme].Client.csproj", "{AA8E58A1-CD09-4208-BF66-A8BB341FD669}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "[Owner].[Theme].Package", "Package\[Owner].[Theme].Package.csproj", "{C5CE512D-CBB7-4545-AF0F-9B6591A0C3A7}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{3AB6FCC9-EFEB-4C0E-A2CF-8103914C5196}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{3AB6FCC9-EFEB-4C0E-A2CF-8103914C5196}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{3AB6FCC9-EFEB-4C0E-A2CF-8103914C5196}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{3AB6FCC9-EFEB-4C0E-A2CF-8103914C5196}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{AA8E58A1-CD09-4208-BF66-A8BB341FD669}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{AA8E58A1-CD09-4208-BF66-A8BB341FD669}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{AA8E58A1-CD09-4208-BF66-A8BB341FD669}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{AA8E58A1-CD09-4208-BF66-A8BB341FD669}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{C5CE512D-CBB7-4545-AF0F-9B6591A0C3A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{C5CE512D-CBB7-4545-AF0F-9B6591A0C3A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{C5CE512D-CBB7-4545-AF0F-9B6591A0C3A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{C5CE512D-CBB7-4545-AF0F-9B6591A0C3A7}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {1D016F15-46FE-4726-8DFD-2E4FD4DC7668}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
Loading…
Reference in New Issue
Block a user