From 278aab537f08ae37ef47a992b35cfa932b5ac6a7 Mon Sep 17 00:00:00 2001 From: iJungleboy Date: Thu, 11 Feb 2021 10:41:43 +0100 Subject: [PATCH 1/4] fix typo memeber = member --- Oqtane.Shared/Shared/Constants.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Shared/Shared/Constants.cs b/Oqtane.Shared/Shared/Constants.cs index cd0761dd..51e71450 100644 --- a/Oqtane.Shared/Shared/Constants.cs +++ b/Oqtane.Shared/Shared/Constants.cs @@ -44,7 +44,7 @@ namespace Oqtane.Shared { public const string MasterTenant = TenantNames.Master; public const string DefaultSite = "Default Site"; - const string RoleObsoleteMessage = "Use the corresponding memeber from Oqtane.Shared.RoleNames"; + const string RoleObsoleteMessage = "Use the corresponding member from Oqtane.Shared.RoleNames"; [Obsolete(RoleObsoleteMessage)] public const string AllUsersRole = RoleNames.Everyone; From c6e2c2e5017ff9bf37ff2c819b8821742b971e2d Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Thu, 11 Feb 2021 15:38:37 +0100 Subject: [PATCH 2/4] DirectorySeparator issue when black or forward slash. Tested on Apple mac and Windows --- Oqtane.Client/Modules/Admin/ModuleCreator/Index.razor | 11 ++++++++--- Oqtane.Client/Services/FileService.cs | 8 ++++---- Oqtane.Client/Services/FolderService.cs | 8 ++++---- .../Extensions/OqtaneServiceCollectionExtensions.cs | 2 +- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/ModuleCreator/Index.razor b/Oqtane.Client/Modules/Admin/ModuleCreator/Index.razor index e0826c86..66794ad5 100644 --- a/Oqtane.Client/Modules/Admin/ModuleCreator/Index.razor +++ b/Oqtane.Client/Modules/Admin/ModuleCreator/Index.razor @@ -7,6 +7,7 @@ @inject ISettingService SettingService @inject IStringLocalizer Localizer @using System.Text.RegularExpressions +@using System.IO; @if (string.IsNullOrEmpty(_moduledefinitionname)) { @@ -171,14 +172,18 @@ else Dictionary systeminfo = await SystemService.GetSystemInfoAsync(); if (systeminfo != null) { - string[] path = systeminfo["serverpath"].Split('\\'); + string[] path = systeminfo["serverpath"].Split(Path.DirectorySeparatorChar); if (_template == "internal") { - _location = string.Join("\\", path, 0, path.Length - 1) + "\\Oqtane.Client\\Modules\\" + _owner + "." + _module; + _location = string.Join(Path.DirectorySeparatorChar, path, 0, path.Length - 1) + + Path.DirectorySeparatorChar + "Oqtane.Client" + + Path.DirectorySeparatorChar + "Modules" + + Path.DirectorySeparatorChar + _owner + "." + _module; } else { - _location = string.Join("\\", path, 0, path.Length - 2) + "\\" + _owner + "." + _module; + _location = string.Join(Path.DirectorySeparatorChar, path, 0, path.Length - 2) + + Path.DirectorySeparatorChar + _owner + "." + _module; } } } diff --git a/Oqtane.Client/Services/FileService.cs b/Oqtane.Client/Services/FileService.cs index cbef816a..d4508168 100644 --- a/Oqtane.Client/Services/FileService.cs +++ b/Oqtane.Client/Services/FileService.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Threading; @@ -37,11 +37,11 @@ namespace Oqtane.Services { if (!(folderPath.EndsWith(System.IO.Path.DirectorySeparatorChar) || folderPath.EndsWith(System.IO.Path.AltDirectorySeparatorChar))) { - folderPath = Utilities.PathCombine(folderPath,"\\"); + folderPath = Utilities.PathCombine(folderPath, System.IO.Path.DirectorySeparatorChar.ToString()); } - + var path = WebUtility.UrlEncode(folderPath); - + return await GetJsonAsync>($"{Apiurl}/{siteId}/{path}"); } diff --git a/Oqtane.Client/Services/FolderService.cs b/Oqtane.Client/Services/FolderService.cs index 2b58fa17..691f87ab 100644 --- a/Oqtane.Client/Services/FolderService.cs +++ b/Oqtane.Client/Services/FolderService.cs @@ -1,4 +1,4 @@ -using Oqtane.Models; +using Oqtane.Models; using System.Threading.Tasks; using System.Linq; using System.Net.Http; @@ -37,11 +37,11 @@ namespace Oqtane.Services { if (!(folderPath.EndsWith(System.IO.Path.DirectorySeparatorChar) || folderPath.EndsWith(System.IO.Path.AltDirectorySeparatorChar))) { - folderPath = Utilities.PathCombine(folderPath, "\\"); + folderPath = Utilities.PathCombine(folderPath, System.IO.Path.DirectorySeparatorChar.ToString()); } - + var path = WebUtility.UrlEncode(folderPath); - + return await GetJsonAsync($"{ApiUrl}/{siteId}/{path}"); } diff --git a/Oqtane.Server/Extensions/OqtaneServiceCollectionExtensions.cs b/Oqtane.Server/Extensions/OqtaneServiceCollectionExtensions.cs index bcfdf9a8..36c41601 100644 --- a/Oqtane.Server/Extensions/OqtaneServiceCollectionExtensions.cs +++ b/Oqtane.Server/Extensions/OqtaneServiceCollectionExtensions.cs @@ -178,7 +178,7 @@ namespace Microsoft.Extensions.DependencyInjection private static Assembly ResolveDependencies(AssemblyLoadContext context, AssemblyName name) { - var assemblyPath = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location) + "\\" + name.Name + ".dll"; + var assemblyPath = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location) + Path.DirectorySeparatorChar + name.Name + ".dll"; if (File.Exists(assemblyPath)) { return context.LoadFromStream(new MemoryStream(File.ReadAllBytes(assemblyPath))); From fcd795be3d06087c8a15740e20fc5d2b2d38b45b Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Sat, 13 Feb 2021 07:33:12 +0100 Subject: [PATCH 3/4] #1106 Fix issue where Section would not initialize collapsed. --- Oqtane.Client/Modules/Controls/Section.razor | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Oqtane.Client/Modules/Controls/Section.razor b/Oqtane.Client/Modules/Controls/Section.razor index 027b0e85..7f253cc2 100644 --- a/Oqtane.Client/Modules/Controls/Section.razor +++ b/Oqtane.Client/Modules/Controls/Section.razor @@ -16,13 +16,14 @@

-
+
@ChildContent
@code { private string _heading = string.Empty; private string _expanded = string.Empty; + private string _show = string.Empty; [Parameter] public RenderFragment ChildContent { get; set; } @@ -40,6 +41,7 @@ { _heading = (!string.IsNullOrEmpty(Heading)) ? Heading : Name; _expanded = (!string.IsNullOrEmpty(Expanded)) ? Expanded : "false"; + if (_expanded == "true") { _show = "show"; } } protected override void OnParametersSet() From 510f4758163c27bb48344d18eb8c5f1265fcabec Mon Sep 17 00:00:00 2001 From: hishamco Date: Mon, 15 Feb 2021 03:27:47 +0300 Subject: [PATCH 4/4] Remove LangVerion from Oqtane.Server --- Oqtane.Server/Oqtane.Server.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/Oqtane.Server/Oqtane.Server.csproj b/Oqtane.Server/Oqtane.Server.csproj index 15ca0a15..474b9335 100644 --- a/Oqtane.Server/Oqtane.Server.csproj +++ b/Oqtane.Server/Oqtane.Server.csproj @@ -2,7 +2,6 @@ net5.0 - 7.3 Debug;Release 2.0.0 Oqtane