Merge remote-tracking branch 'oqtane/dev' into dev

This commit is contained in:
Leigh Pointer 2023-06-22 06:03:04 +02:00
commit b7c36c07c6
40 changed files with 127 additions and 162 deletions

View File

@ -195,7 +195,7 @@ else
if (_owner != "" && _module != "" && _template != "-") if (_owner != "" && _module != "" && _template != "-")
{ {
var template = _templates.FirstOrDefault(item => item.Name == _template); var template = _templates.FirstOrDefault(item => item.Name == _template);
_location = template.Location + _owner + "." + _module; _location = template.Location + _owner + ".Module." + _module;
} }
StateHasChanged(); StateHasChanged();

View File

@ -367,11 +367,11 @@
// appearance // appearance
_title = _page.Title; _title = _page.Title;
_themetype = _page.ThemeType; if (string.IsNullOrEmpty(_page.ThemeType))
if (string.IsNullOrEmpty(_themetype))
{ {
_themetype = PageState.Site.DefaultThemeType; _page.ThemeType = PageState.Site.DefaultThemeType;
} }
_themetype = _page.ThemeType;
_containers = ThemeService.GetContainerControls(PageState.Site.Themes, _themetype); _containers = ThemeService.GetContainerControls(PageState.Site.Themes, _themetype);
_containertype = _page.DefaultContainerType; _containertype = _page.DefaultContainerType;
if (string.IsNullOrEmpty(_containertype)) if (string.IsNullOrEmpty(_containertype))
@ -480,10 +480,15 @@
try try
{ {
_themetype = (string)e.Value; _themetype = (string)e.Value;
_containers = ThemeService.GetContainerControls(PageState.Site.Themes, _themetype); var oldTheme = PageState.Site.Themes.FirstOrDefault(item => item.Themes.Any(themecontrol => themecontrol.TypeName.Equals(_page.ThemeType)));
_containertype = "-"; var newTheme = PageState.Site.Themes.FirstOrDefault(item => item.Themes.Any(themecontrol => themecontrol.TypeName.Equals(_themetype)));
ThemeSettings(); if (oldTheme.ThemeName != newTheme.ThemeName)
StateHasChanged(); {
_containers = ThemeService.GetContainerControls(PageState.Site.Themes, _themetype);
_containertype = _containers.First().TypeName;
ThemeSettings();
StateHasChanged();
}
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -77,7 +77,7 @@ namespace Oqtane.Modules
{ {
if (PageState.Page.Resources != null) if (PageState.Page.Resources != null)
{ {
resources = PageState.Page.Resources.Where(item => item.ResourceType == ResourceType.Script && item.Namespace == type.Namespace).ToList(); resources = PageState.Page.Resources.Where(item => item.ResourceType == ResourceType.Script && item.Level != ResourceLevel.Site && item.Namespace == type.Namespace).ToList();
} }
} }
else // modulecontrolbase else // modulecontrolbase

View File

@ -40,7 +40,7 @@ namespace Oqtane.Themes
{ {
if (PageState.Page.Resources != null) if (PageState.Page.Resources != null)
{ {
resources = PageState.Page.Resources.Where(item => item.ResourceType == ResourceType.Script && item.Namespace == type.Namespace).ToList(); resources = PageState.Page.Resources.Where(item => item.ResourceType == ResourceType.Script && item.Level != ResourceLevel.Site && item.Namespace == type.Namespace).ToList();
} }
} }
else // themecontrolbase, containerbase else // themecontrolbase, containerbase

View File

@ -513,22 +513,25 @@
{ {
foreach (var resource in resources) foreach (var resource in resources)
{ {
if (resource.Url.StartsWith("~")) if (resource.Level != ResourceLevel.Site)
{ {
resource.Url = resource.Url.Replace("~", "/" + type + "/" + name + "/").Replace("//", "/"); if (resource.Url.StartsWith("~"))
} {
if (!resource.Url.Contains("://") && alias.BaseUrl != "" && !resource.Url.StartsWith(alias.BaseUrl)) resource.Url = resource.Url.Replace("~", "/" + type + "/" + name + "/").Replace("//", "/");
{ }
resource.Url = alias.BaseUrl + resource.Url; if (!resource.Url.Contains("://") && alias.BaseUrl != "" && !resource.Url.StartsWith(alias.BaseUrl))
} {
resource.Url = alias.BaseUrl + resource.Url;
}
// ensure resource does not exist already // ensure resource does not exist already
if (!pageresources.Exists(item => item.Url.ToLower() == resource.Url.ToLower())) if (!pageresources.Exists(item => item.Url.ToLower() == resource.Url.ToLower()))
{ {
resource.Level = level; resource.Level = level;
resource.Namespace = name; resource.Namespace = name;
pageresources.Add(resource); pageresources.Add(resource);
} }
}
} }
} }
return pageresources; return pageresources;

View File

@ -42,13 +42,6 @@
} }
headcontent += $"<link id=\"app-favicon\" rel=\"shortcut icon\" type=\"image/{favicontype}\" href=\"{favicon}\" />\n"; headcontent += $"<link id=\"app-favicon\" rel=\"shortcut icon\" type=\"image/{favicontype}\" href=\"{favicon}\" />\n";
// stylesheets
//foreach (Resource resource in PageState.Page.Resources.Where(item => item.ResourceType == ResourceType.Stylesheet))
//{
// var url = (resource.Url.Contains("://")) ? resource.Url : PageState.Alias.BaseUrl + resource.Url;
// headcontent += "<link rel=\"stylesheet\" href=\"" + url + "\"" + (!string.IsNullOrEmpty(resource.Integrity) ? " integrity=\"" + resource.Integrity + "\"" : "") + (!string.IsNullOrEmpty(resource.CrossOrigin) ? " crossorigin=\"" + resource.CrossOrigin + "\"" : "") + " type=\"text/css\"/>" + "\n";
//}
// head content // head content
AddHeadContent(headcontent, PageState.Site.HeadContent); AddHeadContent(headcontent, PageState.Site.HeadContent);
if (!string.IsNullOrEmpty(PageState.Site.HeadContent)) if (!string.IsNullOrEmpty(PageState.Site.HeadContent))
@ -103,49 +96,24 @@
} }
} }
if (PageState.Page.Resources != null) // style sheets
if (PageState.Page.Resources != null && PageState.Page.Resources.Exists(item => item.ResourceType == ResourceType.Stylesheet))
{ {
if (PageState.Page.Resources.Exists(item => item.ResourceType == ResourceType.Stylesheet)) var interop = new Interop(JSRuntime);
string batch = DateTime.UtcNow.ToString("yyyyMMddHHmmssfff");
var links = new List<object>();
foreach (Resource resource in PageState.Page.Resources.Where(item => item.ResourceType == ResourceType.Stylesheet))
{ {
var interop = new Interop(JSRuntime); var prefix = "app-stylesheet-" + resource.Level.ToString().ToLower();
string batch = DateTime.UtcNow.ToString("yyyyMMddHHmmssfff"); var url = (resource.Url.Contains("://")) ? resource.Url : PageState.Alias.BaseUrl + resource.Url;
var links = new List<object>(); links.Add(new { id = prefix + "-" + batch + "-" + (links.Count + 1).ToString("00"), rel = "stylesheet", href = url, type = "text/css", integrity = resource.Integrity ?? "", crossorigin = resource.CrossOrigin ?? "", insertbefore = prefix });
foreach (Resource resource in PageState.Page.Resources.Where(item => item.ResourceType == ResourceType.Stylesheet))
{
var prefix = "app-stylesheet-" + resource.Level.ToString().ToLower();
var url = (resource.Url.Contains("://")) ? resource.Url : PageState.Alias.BaseUrl + resource.Url;
links.Add(new { id = prefix + "-" + batch + "-" + (links.Count + 1).ToString("00"), rel = "stylesheet", href = url, type = "text/css", integrity = resource.Integrity ?? "", crossorigin = resource.CrossOrigin ?? "", insertbefore = prefix });
}
if (links.Any())
{
await interop.IncludeLinks(links.ToArray());
}
await interop.RemoveElementsById("app-stylesheet-page-", "", "app-stylesheet-page-" + batch + "-00");
await interop.RemoveElementsById("app-stylesheet-module-", "", "app-stylesheet-module-" + batch + "-00");
} }
if (links.Any())
//if (PageState.Page.Resources.Exists(item => item.ResourceType == ResourceType.Script)) {
//{ await interop.IncludeLinks(links.ToArray());
// var scripts = new List<object>(); }
// var inline = 0; await interop.RemoveElementsById("app-stylesheet-page-", "", "app-stylesheet-page-" + batch + "-00");
// foreach (Resource resource in PageState.Page.Resources.Where(item => item.ResourceType == ResourceType.Script && item.Level != ResourceLevel.Site)) await interop.RemoveElementsById("app-stylesheet-module-", "", "app-stylesheet-module-" + batch + "-00");
// {
// if (!string.IsNullOrEmpty(resource.Url))
// {
// var url = (resource.Url.Contains("://")) ? resource.Url : PageState.Alias.BaseUrl + resource.Url;
// scripts.Add(new { href = url, bundle = resource.Bundle ?? "", integrity = resource.Integrity ?? "", crossorigin = resource.CrossOrigin ?? "", es6module = resource.ES6Module, location = resource.Location.ToString().ToLower() });
// }
// else
// {
// inline += 1;
// await interop.IncludeScript(GetType().Namespace.ToLower() + inline.ToString(), "", "", "", resource.Content, resource.Location.ToString().ToLower());
// }
// }
// if (scripts.Any())
// {
// await interop.IncludeScripts(scripts.ToArray());
// }
//}
} }
} }

View File

@ -9,8 +9,8 @@
<script src="js/app.js"></script> <script src="js/app.js"></script>
<script src="js/loadjs.min.js"></script> <script src="js/loadjs.min.js"></script>
<link rel="stylesheet" href="css/app.css" /> <link rel="stylesheet" href="css/app.css" />
<link id="app-stylesheet-page" rel="stylesheet" href="css/empty.css" disabled /> <link id="app-stylesheet-page" />
<link id="app-stylesheet-module" rel="stylesheet" href="css/empty.css" disabled /> <link id="app-stylesheet-module" />
</head> </head>
<body> <body>

View File

@ -123,14 +123,14 @@ namespace Oqtane.Controllers
if (moduleDefinition.Template.ToLower().Contains("internal")) if (moduleDefinition.Template.ToLower().Contains("internal"))
{ {
rootPath = Utilities.PathCombine(rootFolder.FullName, Path.DirectorySeparatorChar.ToString()); rootPath = Utilities.PathCombine(rootFolder.FullName, Path.DirectorySeparatorChar.ToString());
moduleDefinition.ModuleDefinitionName = moduleDefinition.Owner + "." + moduleDefinition.Name + ", Oqtane.Client"; moduleDefinition.ModuleDefinitionName = moduleDefinition.Owner + ".Module." + moduleDefinition.Name + ", Oqtane.Client";
moduleDefinition.ServerManagerType = moduleDefinition.Owner + "." + moduleDefinition.Name + ".Manager." + moduleDefinition.Name + "Manager, Oqtane.Server"; moduleDefinition.ServerManagerType = moduleDefinition.Owner + ".Module." + moduleDefinition.Name + ".Manager." + moduleDefinition.Name + "Manager, Oqtane.Server";
} }
else else
{ {
rootPath = Utilities.PathCombine(rootFolder.Parent.FullName, moduleDefinition.Owner + "." + moduleDefinition.Name, Path.DirectorySeparatorChar.ToString()); rootPath = Utilities.PathCombine(rootFolder.Parent.FullName, moduleDefinition.Owner + ".Module." + moduleDefinition.Name, Path.DirectorySeparatorChar.ToString());
moduleDefinition.ModuleDefinitionName = moduleDefinition.Owner + "." + moduleDefinition.Name + ", " + moduleDefinition.Owner + "." + moduleDefinition.Name + ".Client.Oqtane"; moduleDefinition.ModuleDefinitionName = moduleDefinition.Owner + ".Module." + moduleDefinition.Name + ", " + moduleDefinition.Owner + ".Module." + moduleDefinition.Name + ".Client.Oqtane";
moduleDefinition.ServerManagerType = moduleDefinition.Owner + "." + moduleDefinition.Name + ".Manager." + moduleDefinition.Name + "Manager, " + moduleDefinition.Owner + "." + moduleDefinition.Name + ".Server.Oqtane"; moduleDefinition.ServerManagerType = moduleDefinition.Owner + ".Module." + moduleDefinition.Name + ".Manager." + moduleDefinition.Name + "Manager, " + moduleDefinition.Owner + ".Module." + moduleDefinition.Name + ".Server.Oqtane";
} }
ProcessTemplatesRecursively(new DirectoryInfo(templatePath), rootPath, rootFolder.Name, templatePath, moduleDefinition); ProcessTemplatesRecursively(new DirectoryInfo(templatePath), rootPath, rootFolder.Name, templatePath, moduleDefinition);

View File

@ -21,10 +21,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="wwwroot\Modules\Templates\**" /> <Compile Remove="wwwroot\Modules\Templates\**" />
<Content Remove="wwwroot\Modules\Templates\**" />
<EmbeddedResource Remove="wwwroot\Modules\Templates\**" />
<Compile Remove="wwwroot\Themes\Templates\**" /> <Compile Remove="wwwroot\Themes\Templates\**" />
<Content Remove="wwwroot\Modules\Templates\**" />
<Content Remove="wwwroot\Themes\Templates\**" /> <Content Remove="wwwroot\Themes\Templates\**" />
<EmbeddedResource Remove="wwwroot\Modules\Templates\**" />
<EmbeddedResource Remove="wwwroot\Themes\Templates\**" /> <EmbeddedResource Remove="wwwroot\Themes\Templates\**" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -63,15 +63,4 @@
<!-- 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>

View File

@ -15,8 +15,8 @@
{ {
<link id="app-manifest" rel="manifest" /> <link id="app-manifest" rel="manifest" />
} }
<style id="app-stylesheet-page"></style> <link id="app-stylesheet-page" />
<style id="app-stylesheet-module"></style> <link id="app-stylesheet-module" />
<component type="typeof(Oqtane.Head)" render-mode="@((RenderMode)Enum.Parse(typeof(RenderMode), Model.RenderMode, true))" /> <component type="typeof(Oqtane.Head)" render-mode="@((RenderMode)Enum.Parse(typeof(RenderMode), Model.RenderMode, true))" />
@Html.Raw(Model.HeadResources) @Html.Raw(Model.HeadResources)
</head> </head>

View File

@ -475,8 +475,8 @@ namespace Oqtane.Pages
{ {
var url = (resource.Url.Contains("://")) ? resource.Url : alias.BaseUrl + resource.Url; var url = (resource.Url.Contains("://")) ? resource.Url : alias.BaseUrl + resource.Url;
return "<script src=\"" + url + "\"" + return "<script src=\"" + url + "\"" +
((!string.IsNullOrEmpty(resource.CrossOrigin)) ? " crossorigin=\"" + resource.CrossOrigin + "\"" : "") +
((!string.IsNullOrEmpty(resource.Integrity)) ? " integrity=\"" + resource.Integrity + "\"" : "") + ((!string.IsNullOrEmpty(resource.Integrity)) ? " integrity=\"" + resource.Integrity + "\"" : "") +
((!string.IsNullOrEmpty(resource.CrossOrigin)) ? " crossorigin=\"" + resource.CrossOrigin + "\"" : "") +
"></script>"; "></script>";
} }
else else

View File

@ -1,4 +1,4 @@
using System.Resources; using System.Resources;
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
[assembly: RootNamespace("[Owner].[Module].Client")] [assembly: RootNamespace("[Owner].Module.[Module].Client")]

View File

@ -1,7 +1,7 @@
using Microsoft.JSInterop; using Microsoft.JSInterop;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace [Owner].[Module] namespace [Owner].Module.[Module]
{ {
public class Interop public class Interop
{ {

View File

@ -1,8 +1,8 @@
@using Oqtane.Modules.Controls @using Oqtane.Modules.Controls
@using [Owner].[Module].Services @using [Owner].Module.[Module].Services
@using [Owner].[Module].Models @using [Owner].Module.[Module].Models
@namespace [Owner].[Module] @namespace [Owner].Module.[Module]
@inherits ModuleBase @inherits ModuleBase
@inject I[Module]Service [Module]Service @inject I[Module]Service [Module]Service
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager

View File

@ -1,7 +1,7 @@
@using [Owner].[Module].Services @using [Owner].Module.[Module].Services
@using [Owner].[Module].Models @using [Owner].Module.[Module].Models
@namespace [Owner].[Module] @namespace [Owner].Module.[Module]
@inherits ModuleBase @inherits ModuleBase
@inject I[Module]Service [Module]Service @inject I[Module]Service [Module]Service
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager

View File

@ -1,7 +1,7 @@
using Oqtane.Models; using Oqtane.Models;
using Oqtane.Modules; using Oqtane.Modules;
namespace [Owner].[Module] namespace [Owner].Module.[Module]
{ {
public class ModuleInfo : IModule public class ModuleInfo : IModule
{ {
@ -12,8 +12,8 @@ namespace [Owner].[Module]
Version = "1.0.0", Version = "1.0.0",
ServerManagerType = "[ServerManagerType]", ServerManagerType = "[ServerManagerType]",
ReleaseVersions = "1.0.0", ReleaseVersions = "1.0.0",
Dependencies = "[Owner].[Module].Shared.Oqtane", Dependencies = "[Owner].Module.[Module].Shared.Oqtane",
PackageName = "[Owner].[Module]" PackageName = "[Owner].Module.[Module]"
}; };
} }
} }

View File

@ -1,4 +1,4 @@
@namespace [Owner].[Module] @namespace [Owner].Module.[Module]
@inherits ModuleBase @inherits ModuleBase
@inject ISettingService SettingService @inject ISettingService SettingService
@inject IStringLocalizer<Settings> Localizer @inject IStringLocalizer<Settings> Localizer

View File

@ -1,8 +1,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using [Owner].[Module].Models; using [Owner].Module.[Module].Models;
namespace [Owner].[Module].Services namespace [Owner].Module.[Module].Services
{ {
public interface I[Module]Service public interface I[Module]Service
{ {

View File

@ -5,9 +5,9 @@ using System.Threading.Tasks;
using Oqtane.Modules; using Oqtane.Modules;
using Oqtane.Services; using Oqtane.Services;
using Oqtane.Shared; using Oqtane.Shared;
using [Owner].[Module].Models; using [Owner].Module.[Module].Models;
namespace [Owner].[Module].Services namespace [Owner].Module.[Module].Services
{ {
public class [Module]Service : ServiceBase, I[Module]Service, IService public class [Module]Service : ServiceBase, I[Module]Service, IService
{ {

View File

@ -7,9 +7,9 @@
<Authors>[Owner]</Authors> <Authors>[Owner]</Authors>
<Company>[Owner]</Company> <Company>[Owner]</Company>
<Description>[Description]</Description> <Description>[Description]</Description>
<Product>[Owner].[Module]</Product> <Product>[Owner].Module.[Module]</Product>
<Copyright>[Owner]</Copyright> <Copyright>[Owner]</Copyright>
<AssemblyName>[Owner].[Module].Client.Oqtane</AssemblyName> <AssemblyName>[Owner].Module.[Module].Client.Oqtane</AssemblyName>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -22,7 +22,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Shared\[Owner].[Module].Shared.csproj" /> <ProjectReference Include="..\Shared\[Owner].Module.[Module].Shared.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -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,9 +13,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Client\[Owner].[Module].Client.csproj" /> <ProjectReference Include="..\Client\[Owner].Module.[Module].Client.csproj" />
<ProjectReference Include="..\Server\[Owner].[Module].Server.csproj" /> <ProjectReference Include="..\Server\[Owner].Module.[Module].Server.csproj" />
<ProjectReference Include="..\Shared\[Owner].[Module].Shared.csproj" /> <ProjectReference Include="..\Shared\[Owner].Module.[Module].Shared.csproj" />
</ItemGroup> </ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> <Target Name="PostBuild" AfterTargets="PostBuildEvent">

View File

@ -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].[Module]</id> <id>[Owner].Module.[Module]</id>
<version>1.0.0</version> <version>1.0.0</version>
<authors>[Owner]</authors> <authors>[Owner]</authors>
<owners>[Owner]</owners> <owners>[Owner]</owners>
@ -20,12 +20,12 @@
</dependencies> </dependencies>
</metadata> </metadata>
<files> <files>
<file src="..\Client\bin\Release\net7.0\[Owner].[Module].Client.Oqtane.dll" target="lib\net7.0" /> <file src="..\Client\bin\Release\net7.0\[Owner].Module.[Module].Client.Oqtane.dll" target="lib\net7.0" />
<file src="..\Client\bin\Release\net7.0\[Owner].[Module].Client.Oqtane.pdb" target="lib\net7.0" /> <file src="..\Client\bin\Release\net7.0\[Owner].Module.[Module].Client.Oqtane.pdb" target="lib\net7.0" />
<file src="..\Server\bin\Release\net7.0\[Owner].[Module].Server.Oqtane.dll" target="lib\net7.0" /> <file src="..\Server\bin\Release\net7.0\[Owner].Module.[Module].Server.Oqtane.dll" target="lib\net7.0" />
<file src="..\Server\bin\Release\net7.0\[Owner].[Module].Server.Oqtane.pdb" target="lib\net7.0" /> <file src="..\Server\bin\Release\net7.0\[Owner].Module.[Module].Server.Oqtane.pdb" target="lib\net7.0" />
<file src="..\Shared\bin\Release\net7.0\[Owner].[Module].Shared.Oqtane.dll" target="lib\net7.0" /> <file src="..\Shared\bin\Release\net7.0\[Owner].Module.[Module].Shared.Oqtane.dll" target="lib\net7.0" />
<file src="..\Shared\bin\Release\net7.0\[Owner].[Module].Shared.Oqtane.pdb" target="lib\net7.0" /> <file src="..\Shared\bin\Release\net7.0\[Owner].Module.[Module].Shared.Oqtane.pdb" target="lib\net7.0" />
<file src="..\Server\wwwroot\**\*.*" target="wwwroot" /> <file src="..\Server\wwwroot\**\*.*" target="wwwroot" />
<file src="icon.png" target="" /> <file src="icon.png" target="" />
</files> </files>

View File

@ -1,7 +1,7 @@
XCOPY "..\Client\bin\Debug\net7.0\[Owner].[Module].Client.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y XCOPY "..\Client\bin\Debug\net7.0\[Owner].Module.[Module].Client.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y
XCOPY "..\Client\bin\Debug\net7.0\[Owner].[Module].Client.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y XCOPY "..\Client\bin\Debug\net7.0\[Owner].Module.[Module].Client.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y
XCOPY "..\Server\bin\Debug\net7.0\[Owner].[Module].Server.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y XCOPY "..\Server\bin\Debug\net7.0\[Owner].Module.[Module].Server.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y
XCOPY "..\Server\bin\Debug\net7.0\[Owner].[Module].Server.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y XCOPY "..\Server\bin\Debug\net7.0\[Owner].Module.[Module].Server.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y
XCOPY "..\Shared\bin\Debug\net7.0\[Owner].[Module].Shared.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y XCOPY "..\Shared\bin\Debug\net7.0\[Owner].Module.[Module].Shared.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y
XCOPY "..\Shared\bin\Debug\net7.0\[Owner].[Module].Shared.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y XCOPY "..\Shared\bin\Debug\net7.0\[Owner].Module.[Module].Shared.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y
XCOPY "..\Server\wwwroot\*" "..\..\[RootFolder]\Oqtane.Server\wwwroot\" /Y /S /I XCOPY "..\Server\wwwroot\*" "..\..\[RootFolder]\Oqtane.Server\wwwroot\" /Y /S /I

View File

@ -1,3 +1,3 @@
"..\..\[RootFolder]\oqtane.package\nuget.exe" pack [Owner].[Module].nuspec "..\..\[RootFolder]\oqtane.package\nuget.exe" pack [Owner].Module.[Module].nuspec
XCOPY "*.nupkg" "..\..\[RootFolder]\Oqtane.Server\Packages\" /Y XCOPY "*.nupkg" "..\..\[RootFolder]\Oqtane.Server\Packages\" /Y

View File

@ -5,11 +5,11 @@ using Microsoft.AspNetCore.Http;
using Oqtane.Shared; using Oqtane.Shared;
using Oqtane.Enums; using Oqtane.Enums;
using Oqtane.Infrastructure; using Oqtane.Infrastructure;
using [Owner].[Module].Repository; using [Owner].Module.[Module].Repository;
using Oqtane.Controllers; using Oqtane.Controllers;
using System.Net; using System.Net;
namespace [Owner].[Module].Controllers namespace [Owner].Module.[Module].Controllers
{ {
[Route(ControllerRoutes.ApiRoute)] [Route(ControllerRoutes.ApiRoute)]
public class [Module]Controller : ModuleControllerBase public class [Module]Controller : ModuleControllerBase

View File

@ -7,9 +7,9 @@ using Oqtane.Models;
using Oqtane.Infrastructure; using Oqtane.Infrastructure;
using Oqtane.Enums; using Oqtane.Enums;
using Oqtane.Repository; using Oqtane.Repository;
using [Owner].[Module].Repository; using [Owner].Module.[Module].Repository;
namespace [Owner].[Module].Manager namespace [Owner].Module.[Module].Manager
{ {
public class [Module]Manager : MigratableModuleBase, IInstallable, IPortable public class [Module]Manager : MigratableModuleBase, IInstallable, IPortable
{ {
@ -32,7 +32,7 @@ namespace [Owner].[Module].Manager
return Migrate(new [Module]Context(_DBContextDependencies), tenant, MigrationType.Down); return Migrate(new [Module]Context(_DBContextDependencies), tenant, MigrationType.Down);
} }
public string ExportModule(Module module) public string ExportModule(Oqtane.Models.Module module)
{ {
string content = ""; string content = "";
List<Models.[Module]> [Module]s = _[Module]Repository.Get[Module]s(module.ModuleId).ToList(); List<Models.[Module]> [Module]s = _[Module]Repository.Get[Module]s(module.ModuleId).ToList();
@ -43,7 +43,7 @@ namespace [Owner].[Module].Manager
return content; return content;
} }
public void ImportModule(Module module, string content, string version) public void ImportModule(Oqtane.Models.Module module, string content, string version)
{ {
List<Models.[Module]> [Module]s = null; List<Models.[Module]> [Module]s = null;
if (!string.IsNullOrEmpty(content)) if (!string.IsNullOrEmpty(content))

View File

@ -2,13 +2,13 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Oqtane.Databases.Interfaces; using Oqtane.Databases.Interfaces;
using Oqtane.Migrations; using Oqtane.Migrations;
using [Owner].[Module].Migrations.EntityBuilders; using [Owner].Module.[Module].Migrations.EntityBuilders;
using [Owner].[Module].Repository; using [Owner].Module.[Module].Repository;
namespace [Owner].[Module].Migrations namespace [Owner].Module.[Module].Migrations
{ {
[DbContext(typeof([Module]Context))] [DbContext(typeof([Module]Context))]
[Migration("[Owner].[Module].01.00.00.00")] [Migration("[Owner].Module.[Module].01.00.00.00")]
public class InitializeModule : MultiDatabaseMigration public class InitializeModule : MultiDatabaseMigration
{ {
public InitializeModule(IDatabase database) : base(database) public InitializeModule(IDatabase database) : base(database)

View File

@ -5,7 +5,7 @@ using Oqtane.Databases.Interfaces;
using Oqtane.Migrations; using Oqtane.Migrations;
using Oqtane.Migrations.EntityBuilders; using Oqtane.Migrations.EntityBuilders;
namespace [Owner].[Module].Migrations.EntityBuilders namespace [Owner].Module.[Module].Migrations.EntityBuilders
{ {
public class [Module]EntityBuilder : AuditableBaseEntityBuilder<[Module]EntityBuilder> public class [Module]EntityBuilder : AuditableBaseEntityBuilder<[Module]EntityBuilder>
{ {

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using [Owner].[Module].Models; using [Owner].Module.[Module].Models;
namespace [Owner].[Module].Repository namespace [Owner].Module.[Module].Repository
{ {
public interface I[Module]Repository public interface I[Module]Repository
{ {

View File

@ -5,7 +5,7 @@ using Oqtane.Repository;
using Oqtane.Infrastructure; using Oqtane.Infrastructure;
using Oqtane.Repository.Databases.Interfaces; using Oqtane.Repository.Databases.Interfaces;
namespace [Owner].[Module].Repository namespace [Owner].Module.[Module].Repository
{ {
public class [Module]Context : DBContextBase, ITransientService, IMultiDatabase public class [Module]Context : DBContextBase, ITransientService, IMultiDatabase
{ {

View File

@ -2,9 +2,9 @@ using Microsoft.EntityFrameworkCore;
using System.Linq; using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using Oqtane.Modules; using Oqtane.Modules;
using [Owner].[Module].Models; using [Owner].Module.[Module].Models;
namespace [Owner].[Module].Repository namespace [Owner].Module.[Module].Repository
{ {
public class [Module]Repository : I[Module]Repository, ITransientService public class [Module]Repository : I[Module]Repository, ITransientService
{ {

View File

@ -4,12 +4,12 @@
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<Version>1.0.0</Version> <Version>1.0.0</Version>
<Product>[Owner].[Module]</Product> <Product>[Owner].Module.[Module]</Product>
<Authors>[Owner]</Authors> <Authors>[Owner]</Authors>
<Company>[Owner]</Company> <Company>[Owner]</Company>
<Description>[Description]</Description> <Description>[Description]</Description>
<Copyright>[Owner]</Copyright> <Copyright>[Owner]</Copyright>
<AssemblyName>[Owner].[Module].Server.Oqtane</AssemblyName> <AssemblyName>[Owner].Module.[Module].Server.Oqtane</AssemblyName>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup> </PropertyGroup>
@ -26,7 +26,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Shared\[Owner].[Module].Shared.csproj" /> <ProjectReference Include="..\Shared\[Owner].Module.[Module].Shared.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,5 +1,5 @@
/* Module Script */ /* Module Script */
var [Owner] = [Owner] || {}; var [Owner] = [Owner] || {};
[Owner].[Module] = { [Owner].Module.[Module] = {
}; };

View File

@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using Oqtane.Models; using Oqtane.Models;
namespace [Owner].[Module].Models namespace [Owner].Module.[Module].Models
{ {
[Table("[Owner][Module]")] [Table("[Owner][Module]")]
public class [Module] : IAuditable public class [Module] : IAuditable

View File

@ -3,12 +3,12 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<Version>1.0.0</Version> <Version>1.0.0</Version>
<Product>[Owner].[Module]</Product> <Product>[Owner].Module.[Module]</Product>
<Authors>[Owner]</Authors> <Authors>[Owner]</Authors>
<Company>[Owner]</Company> <Company>[Owner]</Company>
<Description>[Description]</Description> <Description>[Description]</Description>
<Copyright>[Owner]</Copyright> <Copyright>[Owner]</Copyright>
<AssemblyName>[Owner].[Module].Shared.Oqtane</AssemblyName> <AssemblyName>[Owner].Module.[Module].Shared.Oqtane</AssemblyName>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,17 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 16
VisualStudioVersion = 16.0.28621.142 VisualStudioVersion = 16.0.28621.142
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oqtane.Server", "..\[RootFolder]\Oqtane.Server\Oqtane.Server.csproj", "{3AB6FCC9-EFEB-4C0E-A2CF-8103914C5196}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oqtane.Server", "..\[RootFolder]\Oqtane.Server\Oqtane.Server.csproj", "{3AB6FCC9-EFEB-4C0E-A2CF-8103914C5196}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "[Owner].[Module].Client", "Client\[Owner].[Module].Client.csproj", "{AA8E58A1-CD09-4208-BF66-A8BB341FD669}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "[Owner].Module.[Module].Client", "Client\[Owner].Module.[Module].Client.csproj", "{AA8E58A1-CD09-4208-BF66-A8BB341FD669}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "[Owner].[Module].Server", "Server\[Owner].[Module].Server.csproj", "{04B05448-788F-433D-92C0-FED35122D45A}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "[Owner].Module.[Module].Server", "Server\[Owner].Module.[Module].Server.csproj", "{04B05448-788F-433D-92C0-FED35122D45A}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "[Owner].[Module].Shared", "Shared\[Owner].[Module].Shared.csproj", "{18D73F73-D7BE-4388-85BA-FBD9AC96FCA2}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "[Owner].Module.[Module].Shared", "Shared\[Owner].Module.[Module].Shared.csproj", "{18D73F73-D7BE-4388-85BA-FBD9AC96FCA2}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "[Owner].[Module].Package", "Package\[Owner].[Module].Package.csproj", "{C5CE512D-CBB7-4545-AF0F-9B6591A0C3A7}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "[Owner].Module.[Module].Package", "Package\[Owner].Module.[Module].Package.csproj", "{C5CE512D-CBB7-4545-AF0F-9B6591A0C3A7}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution