Skip to content

Commit 389dfa1

Browse files
committed
bump to YAF 4.0.1
1 parent 6d27cff commit 389dfa1

File tree

8 files changed

+15
-88
lines changed

8 files changed

+15
-88
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
YAF.SampleWebApplication
22
========================
33

4-
This Application is a Standard Visual Studio Sample ASP.NET Core Application (.NET 8.0), including integrated YAF.NET v4.0.0, and using the MS SQL as database.
4+
This Application is a Standard Visual Studio Sample ASP.NET Core Application (.NET 9.0), including integrated YAF.NET v4.0.1, and using the MS SQL as database.
55

66
> [!NOTE]
77
> The [netfx branch](https://github.com/YAFNET/YAF.SampleWebApplication/tree/netfx) includes the .NET Framework Version with YAF 3.2.x

YAF.SampleApp/Areas/Chat/Pages/Shared/_Layout.cshtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@using YAF.Core.Context
22
@using YAF.Core.Extensions
3-
@using YAF.Core.Services
43

54
@inject BoardContext Current
65

@@ -73,7 +72,7 @@
7372
</div>
7473
</footer>
7574

76-
<script src="@(Current.Get<BoardInfo>().GetUrlToScripts("forumExtensions.min.js"))" asp-append-version="true"></script>
75+
<script src="~/js/forumExtensions.min.js" asp-append-version="true"></script>
7776

7877
@if (!Current.IsGuest)
7978
{

YAF.SampleApp/Areas/Forums/Pages/Shared/_Layout.cshtml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,7 @@
1515
@inject BoardContext Current
1616

1717
@{
18-
ViewBag.CdvVersion = Current.BoardSettings.CdvVersion;
19-
20-
#if DEBUG
21-
ViewBag.ForumJs = Current.CurrentForumPage.IsAdminPage ? "forumAdminExtensions" : "forumExtensions";
22-
ViewBag.ForumCss = Current.CurrentForumPage.IsAdminPage ? "forum-admin" : "forum";
23-
#else
24-
ViewBag.ForumJs = Current.CurrentForumPage.IsAdminPage ? "forumAdminExtensions.min" : "forumExtensions.min";
25-
ViewBag.ForumCss = Current.CurrentForumPage.IsAdminPage ? "forum-admin.min" : "forum.min";
26-
#endif
27-
18+
ViewBag.ForumCss = Current.CurrentForumPage.IsAdminPage ? "forum-admin.min" : "forum.min";
2819
ViewBag.PageName = Current.CurrentForumPage.PageName.ToString();
2920
}
3021

@@ -249,7 +240,7 @@
249240
</div>
250241
</footer>
251242

252-
<script src="@(Current.Get<BoardInfo>().GetUrlToScripts($"{ViewBag.ForumJs}.js?v={ViewBag.CdvVersion}"))"></script>
243+
<script src="~/js/forumExtensions.min.js" asp-append-version="true"></script>
253244

254245

255246
@await RenderSectionAsync("Scripts", required: false)

YAF.SampleApp/Areas/Forums/Pages/Shared/_LoginBox.cshtml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -81,36 +81,6 @@
8181
text-localized-tag="FORUM_LOGIN"></button>
8282
</div>
8383
</form>
84-
@if (Current.BoardSettings.AllowSingleSignOn)
85-
{
86-
<section>
87-
<form asp-controller="LoginBox" asp-action="Auth">
88-
<div class="d-grid gap-2">
89-
@{
90-
var loginProviders = (await SignInManager.GetExternalAuthenticationSchemesAsync()).ToList();
91-
if (loginProviders.HasItems())
92-
{
93-
@foreach (var provider in loginProviders)
94-
{
95-
<button type="submit"
96-
asp-route-auth="@provider.Name"
97-
button-style="None"
98-
button-size="Small"
99-
class="@Html.Raw($"btn btn-social btn-{provider.Name} me-1 mb-1")"
100-
icon="@provider.Name"
101-
icon-css-class="fab"
102-
text-localized-tag="AUTH_CONNECT"
103-
title-localized-tag="AUTH_CONNECT"
104-
text-param0="@provider.DisplayName"
105-
title-param0="@provider.DisplayName">
106-
</button>
107-
}
108-
}
109-
}
110-
</div>
111-
</form>
112-
</section>
113-
}
11484
</div>
11585
</div>
11686

YAF.SampleApp/Pages/Shared/_Layout.cshtml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
@using Microsoft.AspNetCore.Mvc.TagHelpers
2-
@using YAF.Core.Context
1+
@using YAF.Core.Context
32
@using YAF.Core.Extensions
4-
@using YAF.Core.Services
5-
@using YAF.Web.TagHelpers
63

74
@inject BoardContext Current
85

@@ -79,12 +76,12 @@
7976
</div>
8077

8178
<footer class="border-top footer text-muted">
82-
<div class="container">
83-
&copy; 2024 - YAF.SampleApp
84-
</div>
79+
<div class="container">
80+
&copy; 2024 - YAF.SampleApp
81+
</div>
8582
</footer>
8683

87-
<script src="@(Current.Get<BoardInfo>().GetUrlToScripts("forumExtensions.min.js"))" asp-append-version="true"></script>
84+
<script src="~/js/forumExtensions.min.js" asp-append-version="true"></script>
8885

8986
@if (!Current.IsGuest)
9087
{

YAF.SampleApp/Pages/Shared/_LoginBox.cshtml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -81,36 +81,6 @@
8181
text-localized-tag="FORUM_LOGIN"></button>
8282
</div>
8383
</form>
84-
@if (Current.BoardSettings.AllowSingleSignOn)
85-
{
86-
<section>
87-
<form asp-controller="LoginBox" asp-action="Auth">
88-
<div class="d-grid gap-2">
89-
@{
90-
var loginProviders = (await SignInManager.GetExternalAuthenticationSchemesAsync()).ToList();
91-
if (loginProviders.HasItems())
92-
{
93-
@foreach (var provider in loginProviders)
94-
{
95-
<button type="submit"
96-
asp-route-auth="@provider.Name"
97-
button-style="None"
98-
button-size="Small"
99-
class="@Html.Raw($"btn btn-social btn-{provider.Name} me-1 mb-1")"
100-
icon="@provider.Name"
101-
icon-css-class="fab"
102-
text-localized-tag="AUTH_CONNECT"
103-
title-localized-tag="AUTH_CONNECT"
104-
text-param0="@provider.DisplayName"
105-
title-param0="@provider.DisplayName">
106-
</button>
107-
}
108-
}
109-
}
110-
</div>
111-
</form>
112-
</section>
113-
}
11484
</div>
11585
</div>
11686

YAF.SampleApp/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
app.UseSession();
7575

76-
app.UseYafCore(BoardContext.Current.ServiceLocator, app.Environment);
76+
app.UseYafCore(BoardContext.Current.ServiceLocator);
7777

7878
app.UseRobotsTxt(app.Environment);
7979

YAF.SampleApp/YAF.SampleApp.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<Content Remove="C:\Users\iherb\.nuget\packages\yafnet.razorpages\4.0.0\contentFiles\any\net9.0\package-lock.json" />
11-
<Content Remove="C:\Users\iherb\.nuget\packages\yafnet.ui.chat\4.0.0-rc02\contentFiles\any\net8.0\libman.json" />
10+
<Content Remove="C:\Users\iherb\.nuget\packages\yafnet.razorpages\4.0.1\contentFiles\any\net9.0\package-lock.json" />
11+
<Content Remove="C:\Users\iherb\.nuget\packages\yafnet.ui.chat\4.0.1\contentFiles\any\net8.0\libman.json" />
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="YAFNET.Data.SqlServer" Version="4.0.0" />
16-
<PackageReference Include="YAFNET.RazorPages" Version="4.0.0" />
17-
<PackageReference Include="YAFNET.UI.Chat" Version="4.0.0" />
15+
<PackageReference Include="YAFNET.Data.SqlServer" Version="4.0.1" />
16+
<PackageReference Include="YAFNET.RazorPages" Version="4.0.1" />
17+
<PackageReference Include="YAFNET.UI.Chat" Version="4.0.1" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

0 commit comments

Comments
 (0)