Skip to content

Commit 82cb7a8

Browse files
authored
Merge pull request #5920 from oqtane/dev
10.0.2 Release
2 parents 33da580 + cae61ab commit 82cb7a8

File tree

58 files changed

+499
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+499
-276
lines changed

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<PropertyGroup>
33
<TargetFramework>net10.0</TargetFramework>
44
<Configurations>Debug;Release</Configurations>
5-
<Version>10.0.1</Version>
5+
<Version>10.0.2</Version>
66
<Product>Oqtane</Product>
77
<Authors>Shaun Walker</Authors>
88
<Company>.NET Foundation</Company>
99
<Description>CMS and Application Framework for Blazor and .NET MAUI</Description>
1010
<Copyright>.NET Foundation</Copyright>
1111
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
1212
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
13-
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v10.0.1</PackageReleaseNotes>
13+
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v10.0.2</PackageReleaseNotes>
1414
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
1515
<RepositoryType>Git</RepositoryType>
1616
</PropertyGroup>

Oqtane.Application/Client/Oqtane.Application.Client.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</ItemGroup>
2424

2525
<ItemGroup>
26-
<PackageReference Include="Oqtane.Client" Version="10.0.1" />
26+
<PackageReference Include="Oqtane.Client" Version="10.0.2" />
2727
</ItemGroup>
2828

2929
</Project>

Oqtane.Application/Oqtane.Application.Template.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
33
<metadata>
44
<id>Oqtane.Application.Template</id>
5-
<version>10.0.1</version>
5+
<version>10.0.2</version>
66
<title>Oqtane Application Template For Blazor</title>
77
<authors>Shaun Walker</authors>
88
<requireLicenseAcceptance>false</requireLicenseAcceptance>

Oqtane.Application/Server/Oqtane.Application.Server.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</ItemGroup>
3434

3535
<ItemGroup>
36-
<PackageReference Include="Oqtane.Server" Version="10.0.1" />
36+
<PackageReference Include="Oqtane.Server" Version="10.0.2" />
3737
</ItemGroup>
3838

3939
</Project>

Oqtane.Application/Shared/Oqtane.Application.Shared.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Oqtane.Shared" Version="10.0.1" />
14+
<PackageReference Include="Oqtane.Shared" Version="10.0.2" />
1515
</ItemGroup>
1616

1717
</Project>

Oqtane.Client/Modules/Admin/Login/Index.razor

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ else
127127
private bool _allowsitelogin = true;
128128
private bool _allowloginlink = false;
129129
private bool _allowpasskeys = false;
130+
private string _returnurl = string.Empty;
130131

131132
private ElementReference login;
132133
private bool validated = false;
@@ -169,6 +170,9 @@ else
169170
_registerurl = NavigateUrl("register");
170171
}
171172

173+
// PageState.ReturnUrl is not specified if user navigated directly to login page
174+
_returnurl = (!string.IsNullOrEmpty(PageState.ReturnUrl)) ? PageState.ReturnUrl : PageState.Alias.Path;
175+
172176
_togglepassword = SharedLocalizer["ShowPassword"];
173177

174178
if (PageState.QueryString.ContainsKey("name"))
@@ -216,7 +220,7 @@ else
216220
{
217221
if (PageState.QueryString.ContainsKey("status"))
218222
{
219-
AddModuleMessage(Localizer["ExternalLoginStatus." + PageState.QueryString["status"]], MessageType.Info);
223+
AddModuleMessage(Localizer["ExternalLoginStatus." + PageState.QueryString["status"]], MessageType.Warning);
220224
}
221225
}
222226
}
@@ -252,7 +256,7 @@ else
252256

253257
private void ExternalLogin()
254258
{
255-
NavigationManager.NavigateTo(Utilities.TenantUrl(PageState.Alias, "/pages/external?returnurl=" + WebUtility.UrlEncode(PageState.ReturnUrl)), true);
259+
NavigationManager.NavigateTo(Utilities.TenantUrl(PageState.Alias, "/pages/external?returnurl=" + WebUtility.UrlEncode(_returnurl)), true);
256260
}
257261

258262
private void TogglePassword()
@@ -294,20 +298,17 @@ else
294298
{
295299
await logger.LogInformation(LogFunction.Security, "Login Successful For {Username} From IP Address {IPAddress}", _username, SiteState.RemoteIPAddress);
296300

297-
// return url is not specified if user navigated directly to login page
298-
var returnurl = (!string.IsNullOrEmpty(PageState.ReturnUrl)) ? PageState.ReturnUrl : PageState.Alias.Path;
299-
300301
if (hybrid)
301302
{
302303
// hybrid apps utilize an interactive login
303304
var authstateprovider = (IdentityAuthenticationStateProvider)ServiceProvider.GetService(typeof(IdentityAuthenticationStateProvider));
304305
authstateprovider.NotifyAuthenticationChanged();
305-
NavigationManager.NavigateTo(NavigateUrl(returnurl, true));
306+
NavigationManager.NavigateTo(NavigateUrl(_returnurl, true));
306307
}
307308
else
308309
{
309310
// post back to the Login page so that the cookies are set correctly
310-
var fields = new { __RequestVerificationToken = SiteState.AntiForgeryToken, username = _username, password = _password, remember = _remember, returnurl = WebUtility.UrlEncode(returnurl) };
311+
var fields = new { __RequestVerificationToken = SiteState.AntiForgeryToken, username = _username, password = _password, remember = _remember, returnurl = WebUtility.UrlEncode(_returnurl) };
311312
string url = Utilities.TenantUrl(PageState.Alias, "/pages/login/");
312313
await interop.SubmitForm(url, fields);
313314
}
@@ -349,14 +350,14 @@ else
349350

350351
private void CancelLogin()
351352
{
352-
NavigationManager.NavigateTo(PageState.ReturnUrl);
353+
NavigationManager.NavigateTo(_returnurl);
353354
}
354355

355356
private async Task PasskeyLogin()
356357
{
357358
// post back to the Passkey page so that the cookies are set correctly
358359
var interop = new Interop(JSRuntime);
359-
var fields = new { __RequestVerificationToken = SiteState.AntiForgeryToken, operation = "request", returnurl = NavigateUrl() };
360+
var fields = new { __RequestVerificationToken = SiteState.AntiForgeryToken, operation = "request", returnurl = _returnurl };
360361
string url = Utilities.TenantUrl(PageState.Alias, "/pages/passkey/");
361362
await interop.SubmitForm(url, fields);
362363
}
@@ -423,7 +424,7 @@ else
423424
{
424425
if (!string.IsNullOrEmpty(_email))
425426
{
426-
if (await UserService.SendLoginLinkAsync(_email))
427+
if (await UserService.SendLoginLinkAsync(_email, _returnurl))
427428
{
428429
AddModuleMessage(Localizer["Message.SendLoginLink"], MessageType.Info);
429430
await logger.LogInformation(LogFunction.Security, "Login Link Sent To Email {Email}", _email);
@@ -457,8 +458,7 @@ else
457458
if (!string.IsNullOrEmpty(credential))
458459
{
459460
// post back to the Passkey page so that the cookies are set correctly
460-
var returnurl = (!string.IsNullOrEmpty(PageState.ReturnUrl)) ? PageState.ReturnUrl : PageState.Alias.Path + "/";
461-
var fields = new { __RequestVerificationToken = SiteState.AntiForgeryToken, operation = "login", credential = credential, returnurl = returnurl };
461+
var fields = new { __RequestVerificationToken = SiteState.AntiForgeryToken, operation = "login", credential = credential, returnurl = _returnurl };
462462
string url = Utilities.TenantUrl(PageState.Alias, "/pages/passkey/");
463463
await interop.SubmitForm(url, fields);
464464
}
@@ -497,7 +497,7 @@ else
497497
// redirect logged in user to specified page
498498
if (PageState.User != null && !UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin))
499499
{
500-
NavigationManager.NavigateTo(PageState.ReturnUrl);
500+
NavigationManager.NavigateTo(_returnurl);
501501
}
502502
}
503503
}

Oqtane.Client/Modules/Admin/Pages/Add.razor

Lines changed: 47 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<div class="row mb-1 align-items-center">
1717
<Label Class="col-sm-3" For="name" HelpText="Enter the page name" ResourceKey="Name">Name: </Label>
1818
<div class="col-sm-9">
19-
<input id="name" class="form-control" @bind="@_name" maxlength="50" required />
19+
<input id="name" class="form-control" @bind="@_name" maxlength="100" required />
2020
</div>
2121
</div>
2222
@if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin))
@@ -81,21 +81,9 @@
8181
</div>
8282
}
8383
<div class="row mb-1 align-items-center">
84-
<Label Class="col-sm-3" For="navigation" HelpText="Select whether the page is part of the site navigation or hidden" ResourceKey="Navigation">Navigation? </Label>
84+
<Label Class="col-sm-3" For="title" HelpText="Optionally enter the page title. If you do not provide a page title, the page name will be used." ResourceKey="Title">Title: </Label>
8585
<div class="col-sm-9">
86-
<select id="navigation" class="form-select" @bind="@_isnavigation" required>
87-
<option value="True">@SharedLocalizer["Yes"]</option>
88-
<option value="False">@SharedLocalizer["No"]</option>
89-
</select>
90-
</div>
91-
</div>
92-
<div class="row mb-1 align-items-center">
93-
<Label Class="col-sm-3" For="clickable" HelpText="Select whether the link in the site navigation is enabled or disabled" ResourceKey="Clickable">Clickable? </Label>
94-
<div class="col-sm-9">
95-
<select id="clickable" class="form-select" @bind="@_isclickable" required>
96-
<option value="True">@SharedLocalizer["Yes"]</option>
97-
<option value="False">@SharedLocalizer["No"]</option>
98-
</select>
86+
<input id="title" class="form-control" @bind="@_title" maxlength="200" />
9987
</div>
10088
</div>
10189
<div class="row mb-1 align-items-center">
@@ -110,27 +98,6 @@
11098
<input id="url" class="form-control" @bind="@_url" maxlength="500" />
11199
</div>
112100
</div>
113-
<div class="row mb-1 align-items-center">
114-
<Label Class="col-sm-3" For="icon" HelpText="Optionally provide an icon class name for this page which will be displayed in the site navigation" ResourceKey="Icon">Icon: </Label>
115-
<div class="col-sm-8">
116-
<InputList Value="@_icon" ValueChanged="IconChanged" DataList="@_icons" ResourceKey="Icon" ResourceType="@_iconresources" />
117-
</div>
118-
<div class="col-sm-1">
119-
<i class="@_icon"></i>
120-
</div>
121-
</div>
122-
<div class="row mb-1 align-items-center">
123-
<Label Class="col-sm-3" For="effectiveDate" HelpText="The date that this page is active" ResourceKey="EffectiveDate">Effective Date: </Label>
124-
<div class="col-sm-9">
125-
<input type="date" id="effectiveDate" class="form-control" @bind="@_effectivedate" />
126-
</div>
127-
</div>
128-
<div class="row mb-1 align-items-center">
129-
<Label Class="col-sm-3" For="expiryDate" HelpText="The date that this page expires" ResourceKey="ExpiryDate">Expiry Date: </Label>
130-
<div class="col-sm-9">
131-
<input type="date" id="expiryDate" class="form-control" @bind="@_expirydate" />
132-
</div>
133-
</div>
134101
<div class="row mb-1 align-items-center">
135102
<Label Class="col-sm-3" For="personalizable" HelpText="Select whether you would like users to be able to personalize this page with their own content" ResourceKey="Personalizable">Personalizable? </Label>
136103
<div class="col-sm-9">
@@ -141,15 +108,8 @@
141108
</div>
142109
</div>
143110
</div>
144-
145-
<Section Name="Appearance" ResourceKey="Appearance" Heading=@Localizer["Appearance.Name"]>
111+
<Section Name="Theme" Heading="Theme" ResourceKey="Theme">
146112
<div class="container">
147-
<div class="row mb-1 align-items-center">
148-
<Label Class="col-sm-3" For="title" HelpText="Optionally enter the page title. If you do not provide a page title, the page name will be used." ResourceKey="Title">Title: </Label>
149-
<div class="col-sm-9">
150-
<input id="title" class="form-control" @bind="@_title" maxlength="200" />
151-
</div>
152-
</div>
153113
<div class="row mb-1 align-items-center">
154114
<Label Class="col-sm-3" For="theme" HelpText="Select the theme for this page" ResourceKey="Theme">Theme: </Label>
155115
<div class="col-sm-9">
@@ -181,6 +141,49 @@
181141
</div>
182142
</div>
183143
</Section>
144+
<Section Name="Appearance" Heading="Appearance" ResourceKey="Appearance">
145+
<div class="container">
146+
<div class="row mb-1 align-items-center">
147+
<Label Class="col-sm-3" For="icon" HelpText="Optionally provide an icon class name for this page which will be displayed in the site navigation" ResourceKey="Icon">Icon: </Label>
148+
<div class="col-sm-8">
149+
<InputList Value="@_icon" ValueChanged="IconChanged" DataList="@_icons" ResourceKey="Icon" ResourceType="@_iconresources" />
150+
</div>
151+
<div class="col-sm-1">
152+
<i class="@_icon"></i>
153+
</div>
154+
</div>
155+
<div class="row mb-1 align-items-center">
156+
<Label Class="col-sm-3" For="navigation" HelpText="Select whether the page is part of the site navigation or hidden" ResourceKey="Navigation">Navigation? </Label>
157+
<div class="col-sm-9">
158+
<select id="navigation" class="form-select" @bind="@_isnavigation" required>
159+
<option value="True">@SharedLocalizer["Yes"]</option>
160+
<option value="False">@SharedLocalizer["No"]</option>
161+
</select>
162+
</div>
163+
</div>
164+
<div class="row mb-1 align-items-center">
165+
<Label Class="col-sm-3" For="clickable" HelpText="Select whether the link in the site navigation is enabled or disabled" ResourceKey="Clickable">Clickable? </Label>
166+
<div class="col-sm-9">
167+
<select id="clickable" class="form-select" @bind="@_isclickable" required>
168+
<option value="True">@SharedLocalizer["Yes"]</option>
169+
<option value="False">@SharedLocalizer["No"]</option>
170+
</select>
171+
</div>
172+
</div>
173+
<div class="row mb-1 align-items-center">
174+
<Label Class="col-sm-3" For="effectiveDate" HelpText="The date that this page is active" ResourceKey="EffectiveDate">Effective Date: </Label>
175+
<div class="col-sm-9">
176+
<input type="date" id="effectiveDate" class="form-control" @bind="@_effectivedate" />
177+
</div>
178+
</div>
179+
<div class="row mb-1 align-items-center">
180+
<Label Class="col-sm-3" For="expiryDate" HelpText="The date that this page expires" ResourceKey="ExpiryDate">Expiry Date: </Label>
181+
<div class="col-sm-9">
182+
<input type="date" id="expiryDate" class="form-control" @bind="@_expirydate" />
183+
</div>
184+
</div>
185+
</div>
186+
</Section>
184187
<Section Name="PageContent" ResourceKey="PageContent" Heading=@Localizer["PageContent.Heading"]>
185188
<div class="container">
186189
<div class="row mb-1 align-items-center">

0 commit comments

Comments
 (0)