Initial migration
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Shared
|
||||
@namespace Oqtane.Shared
|
||||
@inject IUriHelper UriHelper
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IInstallationService InstallationService
|
||||
@inject IUserService UserService
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<label for="Title" class="control-label" style="font-weight: bold">Integrated Security: </label>
|
||||
</td>
|
||||
<td>
|
||||
<select class="custom-select" @onchange="@SetIntegratedSecurity">
|
||||
<select class="custom-select" @onchange="SetIntegratedSecurity">
|
||||
<option value="true" selected>True</option>
|
||||
<option value="false">False</option>
|
||||
</select>
|
||||
@ -104,7 +104,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="mx-auto text-center">
|
||||
<button type="button" class="btn btn-success" @onclick="@Install">Install Now</button><br /><br />
|
||||
<button type="button" class="btn btn-success" @onclick="Install">Install Now</button><br /><br />
|
||||
@((MarkupString)@Message)
|
||||
</div>
|
||||
<div class="loading" style="@LoadingDisplay"></div>
|
||||
@ -124,7 +124,7 @@
|
||||
private string IntegratedSecurityDisplay = "display:none;";
|
||||
private string LoadingDisplay = "display:none;";
|
||||
|
||||
private void SetIntegratedSecurity(UIChangeEventArgs e)
|
||||
private void SetIntegratedSecurity(ChangeEventArgs e)
|
||||
{
|
||||
if (Convert.ToBoolean(e.Value))
|
||||
{
|
||||
@ -173,7 +173,7 @@
|
||||
user.Password = HostPassword;
|
||||
user = await UserService.AddUserAsync(user);
|
||||
|
||||
UriHelper.NavigateTo("", true);
|
||||
NavigationManager.NavigateTo("", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ namespace Oqtane.Shared
|
||||
}
|
||||
}
|
||||
|
||||
public Task<string> GetCookie(string name)
|
||||
public ValueTask<string> GetCookie(string name)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -38,7 +38,7 @@ namespace Oqtane.Shared
|
||||
}
|
||||
catch
|
||||
{
|
||||
return Task.FromResult(string.Empty);
|
||||
return new ValueTask<string>(Task.FromResult(string.Empty));
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ namespace Oqtane.Shared
|
||||
}
|
||||
}
|
||||
|
||||
public Task<string> GetElementByName(string name)
|
||||
public ValueTask<string> GetElementByName(string name)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -67,7 +67,7 @@ namespace Oqtane.Shared
|
||||
}
|
||||
catch
|
||||
{
|
||||
return Task.FromResult(string.Empty);
|
||||
return new ValueTask<string>(Task.FromResult(string.Empty));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,13 +6,13 @@
|
||||
@using System.Collections.Generic
|
||||
@using Oqtane.Shared
|
||||
@using Oqtane.Security
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@namespace Oqtane.Shared
|
||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||
@inject SiteState SiteState
|
||||
@inject IUriHelper UriHelper
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject INavigationInterception NavigationInterception
|
||||
@inject IComponentContext ComponentContext
|
||||
@inject IAliasService AliasService
|
||||
@inject ITenantService TenantService
|
||||
@inject ISiteService SiteService
|
||||
@ -41,8 +41,8 @@
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
_absoluteUri = UriHelper.GetAbsoluteUri();
|
||||
UriHelper.OnLocationChanged += OnLocationChanged;
|
||||
_absoluteUri = NavigationManager.ToAbsoluteUri(NavigationManager.Uri).AbsoluteUri;
|
||||
NavigationManager.LocationChanged += LocationChanged;
|
||||
|
||||
DynamicComponent = builder =>
|
||||
{
|
||||
@ -56,7 +56,7 @@
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
UriHelper.OnLocationChanged -= OnLocationChanged;
|
||||
NavigationManager.LocationChanged -= LocationChanged;
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
@ -268,7 +268,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnLocationChanged(object sender, LocationChangedEventArgs args)
|
||||
private async void LocationChanged(object sender, LocationChangedEventArgs args)
|
||||
{
|
||||
_absoluteUri = args.Location;
|
||||
await Refresh();
|
||||
@ -276,7 +276,7 @@
|
||||
|
||||
Task IHandleAfterRender.OnAfterRenderAsync()
|
||||
{
|
||||
if (!_navigationInterceptionEnabled && ComponentContext.IsConnected)
|
||||
if (!_navigationInterceptionEnabled)
|
||||
{
|
||||
_navigationInterceptionEnabled = true;
|
||||
return NavigationInterception.EnableNavigationInterceptionAsync();
|
||||
|
Reference in New Issue
Block a user