Install Wizard

This commit is contained in:
Shaun Walker
2019-07-18 13:11:31 -04:00
parent af70f0a956
commit 1c0d2de9fe
36 changed files with 580 additions and 218 deletions

View File

@ -44,7 +44,7 @@
@code {
public override SecurityAccessLevelEnum SecurityAccessLevel { get { return SecurityAccessLevelEnum.Anonymous; } }
public string Message { get; set; } = "<div class=\"alert alert-info\" role=\"alert\">Use host/password For Demo Access</div>";
public string Message { get; set; } = "";
public string Username { get; set; } = "";
public string Password { get; set; } = "";
public bool Remember { get; set; } = false;

View File

@ -33,7 +33,7 @@
protected override async Task OnInitAsync()
{
HtmlTextService htmltextservice = new HtmlTextService(http, sitestate);
HtmlTextService htmltextservice = new HtmlTextService(http, sitestate, UriHelper);
List<HtmlTextInfo> htmltextlist = await htmltextservice.GetHtmlTextAsync(ModuleState.ModuleId);
if (htmltextlist != null)
{
@ -44,7 +44,7 @@
private async Task SaveContent()
{
HtmlTextService htmltextservice = new HtmlTextService(http, sitestate);
HtmlTextService htmltextservice = new HtmlTextService(http, sitestate, UriHelper);
if (htmltext != null)
{
htmltext.Content = content;

View File

@ -5,6 +5,7 @@
@using Oqtane.Client.Modules.Controls
@using Oqtane.Shared;
@inherits ModuleBase
@inject IUriHelper UriHelper
@inject HttpClient http
@inject SiteState sitestate
@ -17,7 +18,7 @@
protected override async Task OnInitAsync()
{
HtmlTextService htmltextservice = new HtmlTextService(http, sitestate);
HtmlTextService htmltextservice = new HtmlTextService(http, sitestate, UriHelper);
List<HtmlTextInfo> htmltext = await htmltextservice.GetHtmlTextAsync(ModuleState.ModuleId);
if (htmltext != null)
{

View File

@ -13,16 +13,18 @@ namespace Oqtane.Client.Modules.HtmlText.Services
{
private readonly HttpClient http;
private readonly SiteState sitestate;
private readonly IUriHelper urihelper;
public HtmlTextService(HttpClient http, SiteState sitestate)
public HtmlTextService(HttpClient http, SiteState sitestate, IUriHelper urihelper)
{
this.http = http;
this.sitestate = sitestate;
this.urihelper = urihelper;
}
private string apiurl
{
get { return CreateApiUrl(sitestate.Alias, "HtmlText"); }
get { return CreateApiUrl(sitestate.Alias, urihelper.GetAbsoluteUri(), "HtmlText"); }
}
public async Task<List<HtmlTextInfo>> GetHtmlTextAsync(int ModuleId)