Skip to content

Commit

Permalink
Merge pull request #117 from Lombiq/issue/OCC-245
Browse files Browse the repository at this point in the history
OCC-245: Update OC preview version
  • Loading branch information
Piedone authored Jul 28, 2024
2 parents 23a0f44 + 970e5ff commit 125bd37
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.Admin" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Theme.Targets" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Admin" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.Theme.Targets" Version="2.0.0-preview-18282" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

@* You can even include shapes conditionally. In this case we want a link to the admin dashboard but only for users who
are able to access it. Using this approach can be much easier than implementing a custom layer condition. *@
@if (await AuthorizationService.AuthorizeAsync(User, Permissions.AccessAdminPanel))
@if (await AuthorizationService.AuthorizeAsync(User, AdminPermissions.AccessAdminPanel))
{
<zone name="@ZoneNames.Footer" position="1">
<div class="zoneInsertionExample_footer">
Expand Down
2 changes: 1 addition & 1 deletion Lombiq.BaseTheme.Tests.UI/Lombiq.BaseTheme.Tests.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.Tests.UI" Version="10.0.1" />
<PackageReference Include="Lombiq.Tests.UI" Version="10.0.2-alpha.1.occ-245" />
</ItemGroup>

<ItemGroup>
Expand Down
20 changes: 10 additions & 10 deletions Lombiq.BaseTheme/Lombiq.BaseTheme.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.Theme.Targets" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Menu" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Media" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.ContentManagement" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.DisplayManagement" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.ResourceManagement" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Theme.Targets" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.Menu" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.Media" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.ContentManagement" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.DisplayManagement" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.ResourceManagement" Version="2.0.0-preview-18282" />
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' != 'true'">
Expand All @@ -59,11 +59,11 @@
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.HelpfulLibraries" Version="10.0.0" />
<PackageReference Include="Lombiq.HelpfulExtensions" Version="8.0.1" />
<PackageReference Include="Lombiq.HelpfulLibraries" Version="10.0.1-alpha.2.occ-245" />
<PackageReference Include="Lombiq.HelpfulExtensions" Version="8.0.2-alpha.0.occ-245" />
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="2.1.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.SourceGenerators" Version="10.0.0" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<PackageReference Include="Lombiq.HelpfulLibraries.Attributes" Version="10.0.0" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />
<PackageReference Include="Lombiq.HelpfulLibraries.SourceGenerators" Version="10.0.1-alpha.2.occ-245" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<PackageReference Include="Lombiq.HelpfulLibraries.Attributes" Version="10.0.1-alpha.2.occ-245" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />

<Content Include="Assets/Styles/**/*.*">
<IncludeInPackage>true</IncludeInPackage>
Expand Down
10 changes: 4 additions & 6 deletions Lombiq.BaseTheme/Services/MainMenuWidgetFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@ protected override async Task<MenuWidgetViewModel> GetViewModelAsync()
_cssClassHolder.AddClassToZone(ZoneNames.Navigation, "navbar-expand-md");
_cssClassHolder.AddClassToZone(ZoneNames.Navigation, "navbar");

return new()
{
MenuItems = await _navigationManager.BuildMenuAsync(
return new(
noWrapper: true, // The navigation zone is already the wrapper.
menuItems: await _navigationManager.BuildMenuAsync(
MainMenuNavigationProviderBase.MainNavigationName,
_actionContextAccessor.ActionContext),
NoWrapper = true, // The navigation zone is already the wrapper.
};
_actionContextAccessor.ActionContext));
}
}
9 changes: 2 additions & 7 deletions Lombiq.BaseTheme/Services/ResourceManagerDecorator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;

namespace Lombiq.BaseTheme.Services;

Expand Down Expand Up @@ -93,9 +92,7 @@ public void RenderStylesheet(TextWriter writer)

var first = true;

var styleSheets = GetRequiredResources("stylesheet").ToList();

foreach (var context in styleSheets)
foreach (var context in GetRequiredResources("stylesheet"))
{
if (context.Settings.Location == ResourceLocation.Inline)
{
Expand All @@ -119,10 +116,8 @@ public void RenderStylesheet(TextWriter writer)
context.WriteTo(writer, _options.ContentBasePath);
}

var registeredStyles = GetRegisteredStyles().ToArray();
for (var i = 0; i < registeredStyles.Length; i++)
foreach (var context in GetRegisteredStyles())
{
var context = registeredStyles[i];
if (!first)
{
writer.Write(Environment.NewLine);
Expand Down
10 changes: 10 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!-- Ignore global configuration -->
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="OrchardCorePreview" value="https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json" />
<add key="Lombiq" value="https://nuget.cloudsmith.io/lombiq/open-source-orchard-core-extensions/v3/index.json" />
</packageSources>
</configuration>

0 comments on commit 125bd37

Please sign in to comment.