From 160477d612fa2c0db4ef6c7abbb203ac5f5d62da Mon Sep 17 00:00:00 2001 From: sbwalker Date: Thu, 8 Jun 2023 08:39:20 -0400 Subject: [PATCH 01/17] add ScrollToPageTop method to ThemeBase --- Oqtane.Client/Themes/ThemeBase.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Oqtane.Client/Themes/ThemeBase.cs b/Oqtane.Client/Themes/ThemeBase.cs index 0528259a..68519430 100644 --- a/Oqtane.Client/Themes/ThemeBase.cs +++ b/Oqtane.Client/Themes/ThemeBase.cs @@ -170,6 +170,12 @@ namespace Oqtane.Themes } } + public async Task ScrollToPageTop() + { + var interop = new Interop(JSRuntime); + await interop.ScrollTo(0, 0, "smooth"); + } + [Obsolete("ContentUrl(int fileId) is deprecated. Use FileUrl(int fileId) instead.", false)] public string ContentUrl(int fileid) { From 5d650bd276a5c20cfb4bd33d8dddb3423c759f93 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Fri, 9 Jun 2023 08:49:41 -0400 Subject: [PATCH 02/17] order theme controls and container comtrols in alphabetical order based on name --- Oqtane.Client/Services/ThemeService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Services/ThemeService.cs b/Oqtane.Client/Services/ThemeService.cs index c8f4aaa4..6bf99a34 100644 --- a/Oqtane.Client/Services/ThemeService.cs +++ b/Oqtane.Client/Services/ThemeService.cs @@ -27,7 +27,7 @@ namespace Oqtane.Services public List GetThemeControls(List themes) { - return themes.SelectMany(item => item.Themes).ToList(); + return themes.SelectMany(item => item.Themes).OrderBy(item => item.Name).ToList(); } //[Obsolete("This method is deprecated.", false)] @@ -39,7 +39,7 @@ namespace Oqtane.Services public List GetContainerControls(List themes, string themeName) { return themes.Where(item => Utilities.GetTypeName(themeName).StartsWith(Utilities.GetTypeName(item.ThemeName))) - .SelectMany(item => item.Containers).ToList(); + .SelectMany(item => item.Containers).OrderBy(item => item.Name).ToList(); } public async Task UpdateThemeAsync(Theme theme) From a9d871e9afcc5ad69a3ec22596eba690b45b54c5 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Fri, 9 Jun 2023 12:33:07 -0400 Subject: [PATCH 03/17] improvements to page template processing in cases where a page parent and name is specified without a path --- Oqtane.Server/Repository/SiteRepository.cs | 24 +++++++++++++++------- Oqtane.Shared/Models/SiteTemplate.cs | 1 + 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Oqtane.Server/Repository/SiteRepository.cs b/Oqtane.Server/Repository/SiteRepository.cs index 948992a6..3fa2dc03 100644 --- a/Oqtane.Server/Repository/SiteRepository.cs +++ b/Oqtane.Server/Repository/SiteRepository.cs @@ -319,6 +319,15 @@ namespace Oqtane.Repository { pages = _pageRepository.GetPages(site.SiteId).ToList(); } + Page parent = null; + if (string.IsNullOrEmpty(pageTemplate.Path)) + { + if (!string.IsNullOrEmpty(pageTemplate.Parent)) + { + parent = pages.FirstOrDefault(item => item.Path.ToLower() == pageTemplate.Parent.ToLower()); + } + pageTemplate.Path = (parent != null) ? parent.Path + "/" + pageTemplate.Name : pageTemplate.Name; + } var page = pages.FirstOrDefault(item => item.Path.ToLower() == pageTemplate.Path.ToLower()); if (page == null) { @@ -326,17 +335,18 @@ namespace Oqtane.Repository page.SiteId = site.SiteId; page.Path = pageTemplate.Path.ToLower(); } - page.Name = (!string.IsNullOrEmpty(pageTemplate.Name)) ? pageTemplate.Name : page.Path; - page.Name = (page.Name.Contains("/")) ? page.Name.Substring(page.Name.LastIndexOf("/") + 1) : page.Name; - int? parentid = null; - if (!string.IsNullOrEmpty(pageTemplate.Parent)) + if (string.IsNullOrEmpty(pageTemplate.Parent)) { - if (pages.Any(item => item.Path.ToLower() == pageTemplate.Parent.ToLower())) + if (pageTemplate.Path.Contains("/")) { - parentid = pages.FirstOrDefault(item => item.Path.ToLower() == pageTemplate.Parent.ToLower()).PageId; + parent = pages.FirstOrDefault(item => item.Path.ToLower() == pageTemplate.Path.Substring(0, pageTemplate.Path.LastIndexOf("/"))); } } - page.ParentId = parentid; + page.ParentId = (parent != null) ? parent.PageId : null; + if (string.IsNullOrEmpty(pageTemplate.Name)) + { + page.Name = (pageTemplate.Path.Contains("/")) ? pageTemplate.Path.Substring(pageTemplate.Name.LastIndexOf("/") + 1) : pageTemplate.Path; + } page.Title = pageTemplate.Title; page.Order = pageTemplate.Order; page.Url = pageTemplate.Url; diff --git a/Oqtane.Shared/Models/SiteTemplate.cs b/Oqtane.Shared/Models/SiteTemplate.cs index 9bc19c4c..5e449a9b 100644 --- a/Oqtane.Shared/Models/SiteTemplate.cs +++ b/Oqtane.Shared/Models/SiteTemplate.cs @@ -44,6 +44,7 @@ namespace Oqtane.Models } public string Path { get; set; } + // note that Parent actually means Parent Path public string Parent { get; set; } public string Name { get; set; } public string Title { get; set; } From 2299375aaa75942c2ceb172f91d3098e226725f4 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Fri, 9 Jun 2023 12:36:15 -0400 Subject: [PATCH 04/17] change project tagline --- Oqtane.Client/Oqtane.Client.csproj | 2 +- .../Infrastructure/SiteTemplates/DefaultSiteTemplate.cs | 2 +- Oqtane.Server/Oqtane.Server.csproj | 2 +- Oqtane.Shared/Oqtane.Shared.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Oqtane.Client/Oqtane.Client.csproj b/Oqtane.Client/Oqtane.Client.csproj index d77cb89e..9ea4853c 100644 --- a/Oqtane.Client/Oqtane.Client.csproj +++ b/Oqtane.Client/Oqtane.Client.csproj @@ -9,7 +9,7 @@ Oqtane Shaun Walker .NET Foundation - Modular Application Framework for Blazor and MAUI + CMS and Application Framework for Blazor and .NET MAUI .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE diff --git a/Oqtane.Server/Infrastructure/SiteTemplates/DefaultSiteTemplate.cs b/Oqtane.Server/Infrastructure/SiteTemplates/DefaultSiteTemplate.cs index 04824881..7ff17805 100644 --- a/Oqtane.Server/Infrastructure/SiteTemplates/DefaultSiteTemplate.cs +++ b/Oqtane.Server/Infrastructure/SiteTemplates/DefaultSiteTemplate.cs @@ -57,7 +57,7 @@ namespace Oqtane.SiteTemplates new Permission(PermissionNames.View, RoleNames.Admin, true), new Permission(PermissionNames.Edit, RoleNames.Admin, true) }, - Content = "

Oqtane is an open source modular application framework that provides advanced functionality for developing web, mobile, and desktop applications on .NET Core. It leverages the Blazor component model to compose a fully dynamic web development experience which can be hosted either client-side or server-side. Whether you are looking for a platform to accelerate your web development efforts, or simply interested in exploring the anatomy of a large-scale Blazor application, Oqtane provides a solid foundation based on proven enterprise architectural principles.

" + + Content = "

Oqtane is an open source CMS and Application Framework that provides advanced functionality for developing web, mobile, and desktop applications on .NET Core. It leverages the Blazor component model to compose a fully dynamic web development experience which can be hosted either client-side or server-side. Whether you are looking for a platform to accelerate your web development efforts, or simply interested in exploring the anatomy of a large-scale Blazor application, Oqtane provides a solid foundation based on proven enterprise architectural principles.

" + "

Join Our Community  Clone Our Repo

" + "

Blazor is an open source and cross-platform web UI framework for building single-page applications using .NET and C#. Blazor applications can be hosted in a variety of ways. Blazor Server uses SignalR (WebSockets) to host your application on a web server and provide a responsive and robust development experience. Blazor WebAssembly relies on Wasm, an open web standard that does not require plugins in order for applications to run natively in a web browser. Blazor Hybrid is part of .NET MAUI and uses a Web View to render components natively on mobile and desktop devices. Razor components can be used with all of the hosting models without any modification.

" + "

Blazor is a feature of .NET Core, the popular cross platform web development framework from Microsoft that extends the .NET developer platform with tools and libraries for building web apps.

" diff --git a/Oqtane.Server/Oqtane.Server.csproj b/Oqtane.Server/Oqtane.Server.csproj index 612d59a2..5bd71c9e 100644 --- a/Oqtane.Server/Oqtane.Server.csproj +++ b/Oqtane.Server/Oqtane.Server.csproj @@ -7,7 +7,7 @@ Oqtane Shaun Walker .NET Foundation - Modular Application Framework for Blazor and MAUI + CMS and Application Framework for Blazor and .NET MAUI .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE diff --git a/Oqtane.Shared/Oqtane.Shared.csproj b/Oqtane.Shared/Oqtane.Shared.csproj index 5c3f82a5..793a2db5 100644 --- a/Oqtane.Shared/Oqtane.Shared.csproj +++ b/Oqtane.Shared/Oqtane.Shared.csproj @@ -7,7 +7,7 @@ Oqtane Shaun Walker .NET Foundation - Modular Application Framework for Blazor and MAUI + CMS and Application Framework for Blazor and .NET MAUI .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE From 605828657702f29cf35896375fdd6f5359491266 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Fri, 9 Jun 2023 12:37:28 -0400 Subject: [PATCH 05/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index af1f1b65..b2d30007 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ![Oqtane](https://github.com/oqtane/framework/blob/master/oqtane.png?raw=true "Oqtane") -Oqtane is a Modular Application Framework. It leverages Blazor, an open source and cross-platform web UI framework for building single-page apps using .NET and C# instead of JavaScript. Blazor apps are composed of reusable web UI components implemented using C#, HTML, and CSS. Both client and server code is written in C#, allowing you to share code and libraries. +Oqtane is a CMS and Application Framework. It leverages Blazor, an open source and cross-platform web UI framework for building single-page apps using .NET and C# instead of JavaScript. Blazor apps are composed of reusable web UI components implemented using C#, HTML, and CSS. Both client and server code is written in C#, allowing you to share code and libraries. Oqtane is being developed based on some fundamental principles which are outlined in the [Oqtane Philosophy](https://www.oqtane.org/blog/!/20/oqtane-philosophy). From d52809c91458fe6c0e3db415736be1bc419828fa Mon Sep 17 00:00:00 2001 From: sbwalker Date: Sat, 10 Jun 2023 09:17:52 -0400 Subject: [PATCH 06/17] fix page template logic on install --- Oqtane.Client/Installer/Installer.razor | 2 +- Oqtane.Client/Resources/Installer/Installer.resx | 3 +++ Oqtane.Server/Repository/SiteRepository.cs | 16 ++++++++++------ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Oqtane.Client/Installer/Installer.razor b/Oqtane.Client/Installer/Installer.razor index eac10c3f..5283291a 100644 --- a/Oqtane.Client/Installer/Installer.razor +++ b/Oqtane.Client/Installer/Installer.razor @@ -13,7 +13,7 @@
-
@SharedLocalizer["Version"] @Constants.Version
+
@SharedLocalizer["Version"] @Constants.Version @SharedLocalizer["For"] .NET 7

diff --git a/Oqtane.Client/Resources/Installer/Installer.resx b/Oqtane.Client/Resources/Installer/Installer.resx index ec83b9bb..cc67d0a7 100644 --- a/Oqtane.Client/Resources/Installer/Installer.resx +++ b/Oqtane.Client/Resources/Installer/Installer.resx @@ -180,4 +180,7 @@ Enter Connection String + + for + \ No newline at end of file diff --git a/Oqtane.Server/Repository/SiteRepository.cs b/Oqtane.Server/Repository/SiteRepository.cs index 3fa2dc03..596d13f7 100644 --- a/Oqtane.Server/Repository/SiteRepository.cs +++ b/Oqtane.Server/Repository/SiteRepository.cs @@ -328,25 +328,29 @@ namespace Oqtane.Repository } pageTemplate.Path = (parent != null) ? parent.Path + "/" + pageTemplate.Name : pageTemplate.Name; } + pageTemplate.Path = (pageTemplate.Path.ToLower() == "home") ? "" : pageTemplate.Path; + pageTemplate.Path = (pageTemplate.Path == "/") ? "" : pageTemplate.Path; var page = pages.FirstOrDefault(item => item.Path.ToLower() == pageTemplate.Path.ToLower()); if (page == null) { page = new Page(); page.SiteId = site.SiteId; - page.Path = pageTemplate.Path.ToLower(); + page.Path = pageTemplate.Path; + } + page.Name = pageTemplate.Name; + if (string.IsNullOrEmpty(page.Name)) + { + page.Name = (pageTemplate.Path.Contains("/")) ? pageTemplate.Path.Substring(pageTemplate.Name.LastIndexOf("/") + 1) : pageTemplate.Path; } if (string.IsNullOrEmpty(pageTemplate.Parent)) { if (pageTemplate.Path.Contains("/")) { - parent = pages.FirstOrDefault(item => item.Path.ToLower() == pageTemplate.Path.Substring(0, pageTemplate.Path.LastIndexOf("/"))); + parent = pages.FirstOrDefault(item => item.Path.ToLower() == pageTemplate.Path.Substring(0, pageTemplate.Path.LastIndexOf("/")).ToLower()); } } page.ParentId = (parent != null) ? parent.PageId : null; - if (string.IsNullOrEmpty(pageTemplate.Name)) - { - page.Name = (pageTemplate.Path.Contains("/")) ? pageTemplate.Path.Substring(pageTemplate.Name.LastIndexOf("/") + 1) : pageTemplate.Path; - } + page.Path = page.Path.ToLower(); page.Title = pageTemplate.Title; page.Order = pageTemplate.Order; page.Url = pageTemplate.Url; From 88c489a58586b223e1f252ac194fb099a4082724 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Sat, 10 Jun 2023 10:10:34 -0400 Subject: [PATCH 07/17] fix for child pages in templates --- Oqtane.Client/Installer/Installer.razor | 2 +- Oqtane.Server/Repository/SiteRepository.cs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Oqtane.Client/Installer/Installer.razor b/Oqtane.Client/Installer/Installer.razor index 5283291a..2450cdf3 100644 --- a/Oqtane.Client/Installer/Installer.razor +++ b/Oqtane.Client/Installer/Installer.razor @@ -13,7 +13,7 @@
-
@SharedLocalizer["Version"] @Constants.Version @SharedLocalizer["For"] .NET 7
+
@SharedLocalizer["Version"] @Constants.Version @Localizer["For"] .NET 7

diff --git a/Oqtane.Server/Repository/SiteRepository.cs b/Oqtane.Server/Repository/SiteRepository.cs index 596d13f7..138e0a16 100644 --- a/Oqtane.Server/Repository/SiteRepository.cs +++ b/Oqtane.Server/Repository/SiteRepository.cs @@ -349,6 +349,10 @@ namespace Oqtane.Repository parent = pages.FirstOrDefault(item => item.Path.ToLower() == pageTemplate.Path.Substring(0, pageTemplate.Path.LastIndexOf("/")).ToLower()); } } + else + { + parent = pages.FirstOrDefault(item => item.Path.ToLower() == pageTemplate.Parent.ToLower()); + } page.ParentId = (parent != null) ? parent.PageId : null; page.Path = page.Path.ToLower(); page.Title = pageTemplate.Title; From 3b644338bc2512d88a6f8909b2c2fe3780cfdd9c Mon Sep 17 00:00:00 2001 From: sbwalker Date: Sat, 10 Jun 2023 13:35:22 -0400 Subject: [PATCH 08/17] move logic for populating theme control names --- Oqtane.Server/Repository/ThemeRepository.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Oqtane.Server/Repository/ThemeRepository.cs b/Oqtane.Server/Repository/ThemeRepository.cs index 7a2de735..02e4a9c0 100644 --- a/Oqtane.Server/Repository/ThemeRepository.cs +++ b/Oqtane.Server/Repository/ThemeRepository.cs @@ -130,14 +130,16 @@ namespace Oqtane.Repository { // override user customizable property values Theme.Name = (!string.IsNullOrEmpty(theme.Name)) ? theme.Name : Theme.Name; - foreach (var themecontrol in Theme.Themes) - { - themecontrol.Name = Theme.Name + " - " + themecontrol.Name; - } // remove theme from list as it is already synced themes.Remove(theme); } + // format theme control names + foreach (var themecontrol in Theme.Themes) + { + themecontrol.Name = Theme.Name + " - " + themecontrol.Name; + } + Theme.ThemeId = theme.ThemeId; Theme.CreatedBy = theme.CreatedBy; Theme.CreatedOn = theme.CreatedOn; From 8367f15638242760bf6efaa471634ba8cc26ce1a Mon Sep 17 00:00:00 2001 From: vnetonline Date: Mon, 12 Jun 2023 23:51:36 +1000 Subject: [PATCH 09/17] Made the default SQL Server and App Service provisioned Basic Tier --- azuredeploy.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azuredeploy.json b/azuredeploy.json index dc1fd89a..95728590 100644 --- a/azuredeploy.json +++ b/azuredeploy.json @@ -4,7 +4,7 @@ "parameters": { "sqlDatabaseEditionTierDtuCapacity": { "type": "string", - "defaultValue": "Standard-S1-20-250", + "defaultValue": "Basic-Basic-5-2", "allowedValues": [ "Basic-Basic-5-2", "Standard-S0-10-250", From a10db462ebba319394869ee8190bb3ea1a675fb9 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Mon, 12 Jun 2023 12:00:25 -0400 Subject: [PATCH 10/17] allow PNG and GIF for favicon specification --- Oqtane.Client/Modules/Admin/Site/Index.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Client/Modules/Admin/Site/Index.razor b/Oqtane.Client/Modules/Admin/Site/Index.razor index c3abedbb..213812ad 100644 --- a/Oqtane.Client/Modules/Admin/Site/Index.razor +++ b/Oqtane.Client/Modules/Admin/Site/Index.razor @@ -71,7 +71,7 @@
- +
From 726f9375e114fd56d375e28218d313bab53c2401 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Mon, 12 Jun 2023 12:30:56 -0400 Subject: [PATCH 11/17] handle type for favicon and improve helptext --- Oqtane.Client/Resources/Modules/Admin/Site/Index.resx | 2 +- Oqtane.Client/UI/ThemeBuilder.razor | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx index 0c5655db..e4a4c438 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx @@ -175,7 +175,7 @@ Specify a logo for the site - Specify a Favicon + Specify a Favicon. The format for the image must be 16×16, 32×32, 48×48, or 64×64 pixels in size, and 8-bit, 24-bit, or 32-bit in color depth. The format of the image must be ICO, PNG, or GIF. Select the sites default theme diff --git a/Oqtane.Client/UI/ThemeBuilder.razor b/Oqtane.Client/UI/ThemeBuilder.razor index dc03e12e..a26f3e26 100644 --- a/Oqtane.Client/UI/ThemeBuilder.razor +++ b/Oqtane.Client/UI/ThemeBuilder.razor @@ -33,11 +33,13 @@ var headcontent = ""; // favicon var favicon = "favicon.ico"; + var favicontype = "x-icon"; if (PageState.Site.FaviconFileId != null) { favicon = Utilities.FileUrl(PageState.Alias, PageState.Site.FaviconFileId.Value); + favicontype = favicon.Substring(favicon.LastIndexOf(".") + 1); } - headcontent += $"\n"; + headcontent += $"\n"; // stylesheets foreach (Resource resource in PageState.Page.Resources.Where(item => item.ResourceType == ResourceType.Stylesheet)) { From f248d2fe4e52687f942588c0571c22d3925f030a Mon Sep 17 00:00:00 2001 From: sbwalker Date: Tue, 13 Jun 2023 13:10:20 -0400 Subject: [PATCH 12/17] upgraded external module template to .NET 7 --- .../External/Client/[Owner].[Module].Client.csproj | 12 ++++++------ .../Package/[Owner].[Module].Package.csproj | 2 +- .../External/Package/[Owner].[Module].nuspec | 14 +++++++------- .../Modules/Templates/External/Package/debug.cmd | 12 ++++++------ .../External/Server/[Owner].[Module].Server.csproj | 11 +++++------ .../External/Shared/[Owner].[Module].Shared.csproj | 2 +- .../Modules/Templates/External/template.json | 2 +- 7 files changed, 27 insertions(+), 28 deletions(-) diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/[Owner].[Module].Client.csproj b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/[Owner].[Module].Client.csproj index bca553fd..423c3e27 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Client/[Owner].[Module].Client.csproj +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Client/[Owner].[Module].Client.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 3.0 1.0.0 [Owner] @@ -13,12 +13,12 @@ - - - + + + + + - - diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].Package.csproj b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].Package.csproj index d450d0df..50fa0fbf 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].Package.csproj +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].Package.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 false diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].nuspec b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].nuspec index c497ba57..70658e74 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].nuspec +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].nuspec @@ -6,7 +6,7 @@ [Owner] [Owner] [Module] - [Module] + [Description] [Owner] false MIT @@ -20,12 +20,12 @@ - - - - - - + + + + + + diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/debug.cmd b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/debug.cmd index 2dd5f97c..4f0cf6d4 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/debug.cmd +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/debug.cmd @@ -1,7 +1,7 @@ -XCOPY "..\Client\bin\Debug\net6.0\[Owner].[Module].Client.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net6.0\" /Y -XCOPY "..\Client\bin\Debug\net6.0\[Owner].[Module].Client.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net6.0\" /Y -XCOPY "..\Server\bin\Debug\net6.0\[Owner].[Module].Server.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net6.0\" /Y -XCOPY "..\Server\bin\Debug\net6.0\[Owner].[Module].Server.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net6.0\" /Y -XCOPY "..\Shared\bin\Debug\net6.0\[Owner].[Module].Shared.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net6.0\" /Y -XCOPY "..\Shared\bin\Debug\net6.0\[Owner].[Module].Shared.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net6.0\" /Y +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].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].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].Shared.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y XCOPY "..\Server\wwwroot\*" "..\..\[RootFolder]\Oqtane.Server\wwwroot\" /Y /S /I diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Server/[Owner].[Module].Server.csproj b/Oqtane.Server/wwwroot/Modules/Templates/External/Server/[Owner].[Module].Server.csproj index 22a198e5..db68d2ef 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Server/[Owner].[Module].Server.csproj +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Server/[Owner].[Module].Server.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 true 1.0.0 [Owner].[Module] @@ -19,11 +19,10 @@ - - - - - + + + + diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Shared/[Owner].[Module].Shared.csproj b/Oqtane.Server/wwwroot/Modules/Templates/External/Shared/[Owner].[Module].Shared.csproj index 8d9d1aae..c638241d 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Shared/[Owner].[Module].Shared.csproj +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Shared/[Owner].[Module].Shared.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 1.0.0 [Owner].[Module] [Owner] diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/template.json b/Oqtane.Server/wwwroot/Modules/Templates/External/template.json index 89075449..f70ee9bc 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/template.json +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/template.json @@ -1,5 +1,5 @@ { "Title": "Default Module Template", "Type": "External", - "Version": "3.3.0" + "Version": "4.0.0" } From dd2c2dbe61ee3b617344909721bb4b0da16d12a5 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Tue, 13 Jun 2023 14:00:09 -0400 Subject: [PATCH 13/17] fix regression issue from #2852 --- Oqtane.Client/UI/SiteRouter.razor | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Oqtane.Client/UI/SiteRouter.razor b/Oqtane.Client/UI/SiteRouter.razor index 9c16aa86..38b5d993 100644 --- a/Oqtane.Client/UI/SiteRouter.razor +++ b/Oqtane.Client/UI/SiteRouter.razor @@ -397,10 +397,6 @@ typename = module.ModuleDefinition.ControlTypeTemplate; // handle default action - if (moduleid != module.ModuleId) - { - action = Constants.DefaultAction; - } if (action == Constants.DefaultAction && !string.IsNullOrEmpty(module.ModuleDefinition.DefaultAction)) { action = module.ModuleDefinition.DefaultAction; From f57a1904056e899569b3fbf7fd2059258f307a13 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Tue, 13 Jun 2023 14:16:43 -0400 Subject: [PATCH 14/17] upgrade external theme template to .NET 7 --- .../Themes/Templates/External/Client/ThemeInfo.cs | 8 +++++++- .../Templates/External/Client/Themes/Theme1.razor | 8 -------- .../External/Client/[Owner].[Theme].Client.csproj | 12 ++++++------ .../External/Package/[Owner].[Theme].Package.csproj | 2 +- .../External/Package/[Owner].[Theme].nuspec | 8 ++++---- .../Themes/Templates/External/Package/debug.cmd | 4 ++-- .../wwwroot/Themes/Templates/External/template.json | 2 +- 7 files changed, 21 insertions(+), 23 deletions(-) diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/ThemeInfo.cs b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/ThemeInfo.cs index f2aa8771..61e416ae 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/ThemeInfo.cs +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/ThemeInfo.cs @@ -9,7 +9,13 @@ namespace [Owner].[Theme] { Name = "[Theme]", Version = "1.0.0", - PackageName = "[Owner].[Theme]" + PackageName = "[Owner].[Theme]", + Resources = new List() + { + new Resource { ResourceType = ResourceType.Stylesheet, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.0/css/bootstrap.min.css", Integrity = "sha512-XWTTruHZEYJsxV3W/lSXG1n3Q39YIWOstqvmFsdNEEQfHoZ6vm6E9GK2OrF6DSJSpIbRbi+Nn0WDPID9O7xB2Q==", CrossOrigin = "anonymous" }, + new Resource { ResourceType = ResourceType.Stylesheet, Url = "~/Theme.css" }, + new Resource { ResourceType = ResourceType.Script, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.0/js/bootstrap.bundle.min.js", Integrity = "sha512-9GacT4119eY3AcosfWtHMsT5JyZudrexyEVzTBWV3viP/YfB9e2pEy3N7WXL3SV6ASXpTU0vzzSxsbfsuUH4sQ==", CrossOrigin = "anonymous" } + } }; } diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/Themes/Theme1.razor b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/Themes/Theme1.razor index d285c05d..00bffa62 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/Themes/Theme1.razor +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/Themes/Theme1.razor @@ -97,12 +97,4 @@ public override string Name => "Theme1"; public override string Panes => PaneNames.Admin + ",Top Full Width,Top 100%,Left 50%,Right 50%,Left 33%,Center 33%,Right 33%,Left Outer 25%,Left Inner 25%,Right Inner 25%,Right Outer 25%,Left 25%,Center 50%,Right 25%,Left Sidebar 66%,Right Sidebar 33%,Left Sidebar 33%,Right Sidebar 66%,Bottom 100%,Bottom Full Width"; - - public override List Resources => new List - () - { - new Resource { ResourceType = ResourceType.Stylesheet, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.0/css/bootstrap.min.css", Integrity = "sha512-XWTTruHZEYJsxV3W/lSXG1n3Q39YIWOstqvmFsdNEEQfHoZ6vm6E9GK2OrF6DSJSpIbRbi+Nn0WDPID9O7xB2Q==", CrossOrigin = "anonymous" }, - new Resource { ResourceType = ResourceType.Stylesheet, Url = ThemePath() + "Theme.css" }, - new Resource { ResourceType = ResourceType.Script, Bundle = "Bootstrap", Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.0/js/bootstrap.bundle.min.js", Integrity = "sha512-9GacT4119eY3AcosfWtHMsT5JyZudrexyEVzTBWV3viP/YfB9e2pEy3N7WXL3SV6ASXpTU0vzzSxsbfsuUH4sQ==", CrossOrigin = "anonymous" } - }; } diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/[Owner].[Theme].Client.csproj b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/[Owner].[Theme].Client.csproj index 8806a07c..2384950b 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/[Owner].[Theme].Client.csproj +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/[Owner].[Theme].Client.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 3.0 1.0.0 [Owner] @@ -13,11 +13,11 @@ - - - - - + + + + + diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].Package.csproj b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].Package.csproj index b4df9848..146de14b 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].Package.csproj +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].Package.csproj @@ -1,7 +1,7 @@  - net6.0 + net7.0 false diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].nuspec b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].nuspec index 160a9d0c..01bed2e2 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].nuspec +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].nuspec @@ -6,13 +6,13 @@ [Owner] [Owner] [Theme] - [Theme] + [Description] [Owner] false MIT https://github.com/oqtane/oqtane.framework icon.png - oqtane module + oqtane theme @@ -20,8 +20,8 @@ - - + + diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.cmd b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.cmd index 2007d2a1..bc59c5d5 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.cmd +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.cmd @@ -1,3 +1,3 @@ -XCOPY "..\Client\bin\Debug\net6.0\[Owner].[Theme].Client.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net6.0\" /Y -XCOPY "..\Client\bin\Debug\net6.0\[Owner].[Theme].Client.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net6.0\" /Y +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].Client.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\net7.0\" /Y XCOPY "..\Client\wwwroot\*" "..\..\[RootFolder]\Oqtane.Server\wwwroot\" /Y /S /I diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/template.json b/Oqtane.Server/wwwroot/Themes/Templates/External/template.json index d142303d..04ee5175 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/template.json +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/template.json @@ -1,5 +1,5 @@ { "Title": "Default Theme Template", "Type": "External", - "Version": "3.0.0" + "Version": "4.0.0" } From 3c18a258ff588d9ad662c9ed9b378a1b6a073d28 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Tue, 13 Jun 2023 17:09:49 -0400 Subject: [PATCH 15/17] upgrade to Bootstrap 5.3 --- Oqtane.Client/Installer/Installer.razor | 4 ++-- Oqtane.Client/Themes/BlazorTheme/Themes/Default.razor | 4 ++-- Oqtane.Client/Themes/OqtaneTheme/ThemeInfo.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Oqtane.Client/Installer/Installer.razor b/Oqtane.Client/Installer/Installer.razor index 2450cdf3..18259555 100644 --- a/Oqtane.Client/Installer/Installer.razor +++ b/Oqtane.Client/Installer/Installer.razor @@ -186,8 +186,8 @@ if (firstRender) { var interop = new Interop(JSRuntime); - await interop.IncludeLink("", "stylesheet", "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.0/css/bootstrap.min.css", "text/css", "sha512-XWTTruHZEYJsxV3W/lSXG1n3Q39YIWOstqvmFsdNEEQfHoZ6vm6E9GK2OrF6DSJSpIbRbi+Nn0WDPID9O7xB2Q==", "anonymous", ""); - await interop.IncludeScript("", "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.0/js/bootstrap.bundle.min.js", "sha512-9GacT4119eY3AcosfWtHMsT5JyZudrexyEVzTBWV3viP/YfB9e2pEy3N7WXL3SV6ASXpTU0vzzSxsbfsuUH4sQ==", "anonymous", "", "head"); + await interop.IncludeLink("", "stylesheet", "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/css/bootstrap.min.css", "text/css", "sha512-t4GWSVZO1eC8BM339Xd7Uphw5s17a86tIZIj8qRxhnKub6WoyhnrxeCIMeAqBPgdZGlCcG2PrZjMc+Wr78+5Xg==", "anonymous", ""); + await interop.IncludeScript("", "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js", "sha512-VK2zcvntEufaimc+efOYi622VN5ZacdnufnmX7zIhCPmjhKnOi9ZDMtg1/ug5l183f19gG1/cBstPO4D8N/Img==", "anonymous", "", "head"); } } diff --git a/Oqtane.Client/Themes/BlazorTheme/Themes/Default.razor b/Oqtane.Client/Themes/BlazorTheme/Themes/Default.razor index e4c77abf..2c67444a 100644 --- a/Oqtane.Client/Themes/BlazorTheme/Themes/Default.razor +++ b/Oqtane.Client/Themes/BlazorTheme/Themes/Default.razor @@ -31,9 +31,9 @@ public override List Resources => new List() { // obtained from https://cdnjs.com/libraries - new Resource { ResourceType = ResourceType.Stylesheet, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.0/css/bootstrap.min.css", Integrity = "sha512-XWTTruHZEYJsxV3W/lSXG1n3Q39YIWOstqvmFsdNEEQfHoZ6vm6E9GK2OrF6DSJSpIbRbi+Nn0WDPID9O7xB2Q==", 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 = ThemePath() + "Theme.css" }, - new Resource { ResourceType = ResourceType.Script, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.0/js/bootstrap.bundle.min.js", Integrity = "sha512-9GacT4119eY3AcosfWtHMsT5JyZudrexyEVzTBWV3viP/YfB9e2pEy3N7WXL3SV6ASXpTU0vzzSxsbfsuUH4sQ==", 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" } }; } \ No newline at end of file diff --git a/Oqtane.Client/Themes/OqtaneTheme/ThemeInfo.cs b/Oqtane.Client/Themes/OqtaneTheme/ThemeInfo.cs index e6105970..49f21038 100644 --- a/Oqtane.Client/Themes/OqtaneTheme/ThemeInfo.cs +++ b/Oqtane.Client/Themes/OqtaneTheme/ThemeInfo.cs @@ -16,9 +16,9 @@ namespace Oqtane.Themes.OqtaneTheme ContainerSettingsType = "Oqtane.Themes.OqtaneTheme.ContainerSettings, Oqtane.Client", Resources = new List() { - new Resource { ResourceType = ResourceType.Stylesheet, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.2.0/cyborg/bootstrap.min.css", Integrity = "sha512-d6pZJl/sNcj0GFkp4kTjXtPE14deuUsOqFQtxkj0KyBJQl+4e0qsEyuIDcNqrYuGoauAW3sWyDCQp49mhF4Syw==", CrossOrigin = "anonymous" }, + new Resource { ResourceType = ResourceType.Stylesheet, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.3.0/cyborg/bootstrap.min.css", Integrity = "sha512-jwIqEv8o/kTBMJVtbNCBrDqhBojl0YSUam+EFpLjVOC86Ci6t4ZciTnIkelFNOik+dEQVymKGcQLiaJZNAfWRg==", CrossOrigin = "anonymous" }, new Resource { ResourceType = ResourceType.Stylesheet, Url = "~/Theme.css" }, - new Resource { ResourceType = ResourceType.Script, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.0/js/bootstrap.bundle.min.js", Integrity = "sha512-9GacT4119eY3AcosfWtHMsT5JyZudrexyEVzTBWV3viP/YfB9e2pEy3N7WXL3SV6ASXpTU0vzzSxsbfsuUH4sQ==", 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" } } }; } From 9e86d972538b161d6112c5547bc6e1dc9c8dfe3d Mon Sep 17 00:00:00 2001 From: sbwalker Date: Tue, 13 Jun 2023 17:13:59 -0400 Subject: [PATCH 16/17] upgrade external theme template to Bootstrap 5.3 --- .../wwwroot/Themes/Templates/External/Client/ThemeInfo.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/ThemeInfo.cs b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/ThemeInfo.cs index 61e416ae..5a2028b7 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Client/ThemeInfo.cs +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Client/ThemeInfo.cs @@ -12,9 +12,10 @@ namespace [Owner].[Theme] PackageName = "[Owner].[Theme]", Resources = new List() { - new Resource { ResourceType = ResourceType.Stylesheet, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.0/css/bootstrap.min.css", Integrity = "sha512-XWTTruHZEYJsxV3W/lSXG1n3Q39YIWOstqvmFsdNEEQfHoZ6vm6E9GK2OrF6DSJSpIbRbi+Nn0WDPID9O7xB2Q==", CrossOrigin = "anonymous" }, + // 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 = "~/Theme.css" }, - new Resource { ResourceType = ResourceType.Script, Url = "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.0/js/bootstrap.bundle.min.js", Integrity = "sha512-9GacT4119eY3AcosfWtHMsT5JyZudrexyEVzTBWV3viP/YfB9e2pEy3N7WXL3SV6ASXpTU0vzzSxsbfsuUH4sQ==", 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" } } }; From d7928a70bfb9305c74e18f7a20865b7d574739bb Mon Sep 17 00:00:00 2001 From: sbwalker Date: Tue, 13 Jun 2023 17:26:07 -0400 Subject: [PATCH 17/17] update Installer to use new method for including CSS --- Oqtane.Client/Installer/Installer.razor | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Installer/Installer.razor b/Oqtane.Client/Installer/Installer.razor index 18259555..f339367c 100644 --- a/Oqtane.Client/Installer/Installer.razor +++ b/Oqtane.Client/Installer/Installer.razor @@ -8,6 +8,7 @@ @inject IJSRuntime JSRuntime @inject IStringLocalizer Localizer @inject IStringLocalizer SharedLocalizer +@inject SiteState SiteState
@@ -137,7 +138,18 @@ protected override async Task OnInitializedAsync() { - _togglePassword = SharedLocalizer["ShowPassword"]; + // include CSS + var content = ""; + if (string.IsNullOrEmpty(SiteState.Properties.HeadContent)) + { + SiteState.Properties.HeadContent = content; + } + else if (!SiteState.Properties.HeadContent.Contains(content)) + { + SiteState.Properties.HeadContent += content; + } + + _togglePassword = SharedLocalizer["ShowPassword"]; _toggleConfirmPassword = SharedLocalizer["ShowPassword"]; _databases = await DatabaseService.GetDatabasesAsync(); @@ -185,8 +197,8 @@ { if (firstRender) { + // include JavaScript var interop = new Interop(JSRuntime); - await interop.IncludeLink("", "stylesheet", "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/css/bootstrap.min.css", "text/css", "sha512-t4GWSVZO1eC8BM339Xd7Uphw5s17a86tIZIj8qRxhnKub6WoyhnrxeCIMeAqBPgdZGlCcG2PrZjMc+Wr78+5Xg==", "anonymous", ""); await interop.IncludeScript("", "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js", "sha512-VK2zcvntEufaimc+efOYi622VN5ZacdnufnmX7zIhCPmjhKnOi9ZDMtg1/ug5l183f19gG1/cBstPO4D8N/Img==", "anonymous", "", "head"); } }