Initial migration
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
@using Oqtane.Security
|
||||
@namespace Oqtane.Themes.Controls
|
||||
@inherits ThemeObjectBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IUserService UserService
|
||||
@inject IModuleDefinitionService ModuleDefinitionService
|
||||
@inject IThemeService ThemeService
|
||||
@ -68,7 +68,7 @@
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary" @onclick="@AddModule">Add Module To Page</button>
|
||||
<button type="button" class="btn btn-primary" @onclick="AddModule">Add Module To Page</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -140,7 +140,7 @@
|
||||
await PageModuleService.UpdatePageModuleOrderAsync(pagemodule.PageId, pagemodule.Pane);
|
||||
|
||||
PageState.Reload = Constants.ReloadPage;
|
||||
UriHelper.NavigateTo(NavigateUrl());
|
||||
NavigationManager.NavigateTo(NavigateUrl());
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@
|
||||
PageState.DesignMode = true;
|
||||
}
|
||||
PageState.Reload = Constants.ReloadPage;
|
||||
UriHelper.NavigateTo(NavigateUrl(PageState.Page.Path, "edit=" + PageState.EditMode.ToString().ToLower()));
|
||||
NavigationManager.NavigateTo(NavigateUrl(PageState.Page.Path, "edit=" + PageState.EditMode.ToString().ToLower()));
|
||||
}
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
@using Microsoft.JSInterop
|
||||
@namespace Oqtane.Themes.Controls
|
||||
@inherits ThemeObjectBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IUserService UserService
|
||||
@inject IJSRuntime jsRuntime
|
||||
@inject IServiceProvider ServiceProvider
|
||||
@ -15,10 +15,10 @@
|
||||
<text>...</text>
|
||||
</Authorizing>
|
||||
<Authorized>
|
||||
<button type="button" class="btn btn-primary" @onclick="@LogoutUser">Logout</button>
|
||||
<button type="button" class="btn btn-primary" @onclick="LogoutUser">Logout</button>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
<button type="button" class="btn btn-primary" @onclick="@LoginUser">Login</button>
|
||||
<button type="button" class="btn btn-primary" @onclick="LoginUser">Login</button>
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
{
|
||||
returnurl += "/" + PageState.Page.Path;
|
||||
}
|
||||
UriHelper.NavigateTo("login?returnurl=" + returnurl);
|
||||
NavigationManager.NavigateTo("login?returnurl=" + returnurl);
|
||||
}
|
||||
|
||||
private async Task LogoutUser()
|
||||
@ -52,7 +52,7 @@
|
||||
// client-side Blazor
|
||||
authstateprovider.NotifyAuthenticationChanged();
|
||||
PageState.Reload = Constants.ReloadSite;
|
||||
UriHelper.NavigateTo(NavigateUrl(PageState.Page.Path, "logout"));
|
||||
NavigationManager.NavigateTo(NavigateUrl(PageState.Page.Path, "logout"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
@using Oqtane.Security
|
||||
@namespace Oqtane.Themes.Controls
|
||||
@inherits ContainerBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IUserService UserService
|
||||
@inject IPageModuleService PageModuleService
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
@foreach (var action in actions)
|
||||
{
|
||||
<a class="dropdown-item" @onclick="@(async () => await ModuleAction(action.Action))">@action.Name</a>
|
||||
<a class="dropdown-item" @onclick="(async () => await ModuleAction(action.Action))">@action.Name</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@ -104,7 +104,7 @@
|
||||
break;
|
||||
}
|
||||
PageState.Reload = Constants.ReloadPage;
|
||||
UriHelper.NavigateTo(url);
|
||||
NavigationManager.NavigateTo(url);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,17 +1,18 @@
|
||||
@using Oqtane.Themes
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@namespace Oqtane.Themes.Controls
|
||||
@inherits ThemeObjectBase
|
||||
@inject IUriHelper UriHelper
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
<AuthorizeView>
|
||||
<Authorizing>
|
||||
<text>...</text>
|
||||
</Authorizing>
|
||||
<Authorized>
|
||||
<button type="button" class="btn btn-primary" @onclick="@UpdateProfile">@context.User.Identity.Name</button>
|
||||
<button type="button" class="btn btn-primary" @onclick="UpdateProfile">@context.User.Identity.Name</button>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
<button type="button" class="btn btn-primary" @onclick="@RegisterUser">Register</button>
|
||||
<button type="button" class="btn btn-primary" @onclick="RegisterUser">Register</button>
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
|
||||
@ -20,12 +21,12 @@
|
||||
|
||||
private void RegisterUser()
|
||||
{
|
||||
UriHelper.NavigateTo(NavigateUrl("register"));
|
||||
NavigationManager.NavigateTo(NavigateUrl("register"));
|
||||
}
|
||||
|
||||
private void UpdateProfile()
|
||||
{
|
||||
UriHelper.NavigateTo(NavigateUrl("profile"));
|
||||
NavigationManager.NavigateTo(NavigateUrl("profile"));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user