Merge tag 'v10.0.3' into dev
This commit is contained in:
@@ -15,13 +15,13 @@
|
||||
<input type="hidden" name="@Constants.RequestVerificationToken" value="@SiteState.AntiForgeryToken" />
|
||||
@if (PageState.EditMode)
|
||||
{
|
||||
<button type="submit" class="btn @ButtonClass active" aria-pressed="true" autocomplete="off">
|
||||
<button type="submit" class="app-editmode btn @ButtonClass active" aria-pressed="true" autocomplete="off">
|
||||
<span class="oi oi-pencil"></span>
|
||||
</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button type="submit" class="btn @ButtonClass" aria-pressed="false" autocomplete="off">
|
||||
<button type="submit" class="app-editmode btn @ButtonClass" aria-pressed="false" autocomplete="off">
|
||||
<span class="oi oi-pencil"></span>
|
||||
</button>
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
@inject IStringLocalizer<ControlPanelInteractive> Localizer
|
||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||
|
||||
<button type="button" class="btn @ButtonClass ms-1" data-bs-toggle="offcanvas" data-bs-target="#offcanvasControlPanel" aria-controls="offcanvasControlPanel" @onclick="ClearMessage">
|
||||
<button type="button" class="app-controlpanel btn @ButtonClass ms-1" data-bs-toggle="offcanvas" data-bs-target="#offcanvasControlPanel" aria-controls="offcanvasControlPanel" @onclick="ClearMessage">
|
||||
<span class="oi oi-cog"></span>
|
||||
</button>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
@if (_supportedCultures?.Count() > 1)
|
||||
{
|
||||
<div class="btn-group pe-1" role="group">
|
||||
<div class="app-languages btn-group pe-1" role="group">
|
||||
<button id="btnCultures" type="button" class="btn @ButtonClass dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="oi oi-globe"></span>
|
||||
</button>
|
||||
|
||||
@@ -3,31 +3,29 @@
|
||||
@inject IStringLocalizer<Login> Localizer
|
||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||
|
||||
<span class="app-login">
|
||||
@if (PageState.User != null)
|
||||
@if (PageState.User != null)
|
||||
{
|
||||
@if (PageState.Runtime == Runtime.Hybrid)
|
||||
{
|
||||
@if (PageState.Runtime == Runtime.Hybrid)
|
||||
{
|
||||
<button type="button" class="@CssClass" @onclick="LogoutUser">@Localizer["Logout"]</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<form method="post" class="app-form-inline" action="@logouturl" @formname="LogoutForm">
|
||||
<input type="hidden" name="@Constants.RequestVerificationToken" value="@SiteState.AntiForgeryToken" />
|
||||
<input type="hidden" name="returnurl" value="@returnurl" />
|
||||
<input type="hidden" name="everywhere" value="@everywhere" />
|
||||
<button type="submit" class="@CssClass">@Localizer["Logout"]</button>
|
||||
</form>
|
||||
}
|
||||
<button type="button" class="@CssClass app-login" @onclick="LogoutUser">@Localizer["Logout"]</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (ShowLogin)
|
||||
{
|
||||
<a href="@loginurl" class="@CssClass">@SharedLocalizer["Login"]</a>
|
||||
}
|
||||
<form method="post" class="app-form-inline app-login" action="@logouturl" @formname="LogoutForm">
|
||||
<input type="hidden" name="@Constants.RequestVerificationToken" value="@SiteState.AntiForgeryToken" />
|
||||
<input type="hidden" name="returnurl" value="@returnurl" />
|
||||
<input type="hidden" name="everywhere" value="@everywhere" />
|
||||
<button type="submit" class="@CssClass">@Localizer["Logout"]</button>
|
||||
</form>
|
||||
}
|
||||
</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (ShowLogin)
|
||||
{
|
||||
<a href="@loginurl" class="@CssClass app-login">@SharedLocalizer["Login"]</a>
|
||||
}
|
||||
}
|
||||
|
||||
@code
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
@@ -62,7 +63,14 @@ namespace Oqtane.Themes.Controls
|
||||
// verify anonymous users can access current page
|
||||
if (UserSecurity.IsAuthorized(null, PermissionNames.View, PageState.Page.PermissionList) && Utilities.IsEffectiveAndNotExpired(PageState.Page.EffectiveDate, PageState.Page.ExpiryDate))
|
||||
{
|
||||
returnurl = PageState.Route.PathAndQuery;
|
||||
if (PageState.Route.Action != Constants.DefaultAction && PageState.Modules.Any() && PageState.Modules.First().SecurityAccessLevel > SecurityAccessLevel.View)
|
||||
{
|
||||
returnurl = PageState.Route.PagePath;
|
||||
}
|
||||
else
|
||||
{
|
||||
returnurl = PageState.Route.PathAndQuery;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,20 +1,36 @@
|
||||
@namespace Oqtane.Themes.Controls
|
||||
@namespace Oqtane.Themes.Controls
|
||||
|
||||
@switch (Orientation)
|
||||
@if (_menuType != null)
|
||||
{
|
||||
case "Horizontal":
|
||||
<MenuHorizontal/>
|
||||
break;
|
||||
default: // Vertical
|
||||
{
|
||||
<MenuVertical/>
|
||||
break;
|
||||
}
|
||||
<DynamicComponent Type="@_menuType" Parameters="@Attributes"></DynamicComponent>
|
||||
}
|
||||
|
||||
@code{
|
||||
|
||||
[Parameter]
|
||||
public string Orientation { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string MenuType { get; set; }
|
||||
|
||||
[Parameter(CaptureUnmatchedValues = true)]
|
||||
public Dictionary<string, object> Attributes { get; set; } = new Dictionary<string, object>();
|
||||
|
||||
private Type _menuType;
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
if (string.IsNullOrEmpty(MenuType) && !string.IsNullOrEmpty(Orientation))
|
||||
{
|
||||
if (Orientation == "Horizontal")
|
||||
{
|
||||
MenuType = "Oqtane.Themes.Controls.MenuHorizontal, Oqtane.Client";
|
||||
}
|
||||
else
|
||||
{
|
||||
MenuType = "Oqtane.Themes.Controls.MenuVertical, Oqtane.Client";
|
||||
}
|
||||
}
|
||||
|
||||
_menuType = Type.GetType(MenuType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,19 +5,17 @@
|
||||
@inject IStringLocalizer<UserProfile> Localizer
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
<span class="app-profile">
|
||||
@if (PageState.User != null)
|
||||
@if (PageState.User != null)
|
||||
{
|
||||
<a href="@_profileurl" class="@CssClass app-profile">@PageState.User.Username</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (ShowRegister && PageState.Site.AllowRegistration)
|
||||
{
|
||||
<a href="@_profileurl" class="@CssClass">@PageState.User.Username</a>
|
||||
<a href="@_registerurl" class="@CssClass app-profile">@Localizer["Register"]</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (ShowRegister && PageState.Site.AllowRegistration)
|
||||
{
|
||||
<a href="@_registerurl" class="@CssClass">@Localizer["Register"]</a>
|
||||
}
|
||||
}
|
||||
</span>
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user