fixed compilation warnings in AuditInfo, fixed issue in ModuleMessage triggered in InstallWizard, fixed PWA JavaScript in ThemeBuilder for all browsers

This commit is contained in:
Shaun Walker 2020-10-18 09:09:18 -04:00
parent f3e2177423
commit d082c5427b
4 changed files with 16 additions and 11 deletions

View File

@ -1,4 +1,4 @@
@namespace Oqtane.Modules.Controls @namespace Oqtane.Modules.Controls
@inherits ModuleControlBase @inherits ModuleControlBase
@if (_text != string.Empty) @if (_text != string.Empty)
@ -14,13 +14,13 @@
public string CreatedBy { get; set; } public string CreatedBy { get; set; }
[Parameter] [Parameter]
public DateTime CreatedOn { get; set; } public DateTime? CreatedOn { get; set; }
[Parameter] [Parameter]
public string ModifiedBy { get; set; } public string ModifiedBy { get; set; }
[Parameter] [Parameter]
public DateTime ModifiedOn { get; set; } public DateTime? ModifiedOn { get; set; }
[Parameter] [Parameter]
public string DeletedBy { get; set; } public string DeletedBy { get; set; }
@ -37,7 +37,7 @@
protected override void OnParametersSet() protected override void OnParametersSet()
{ {
_text = string.Empty; _text = string.Empty;
if (!String.IsNullOrEmpty(CreatedBy) || CreatedOn != null) if (!String.IsNullOrEmpty(CreatedBy) || CreatedOn.HasValue)
{ {
_text += "<p style=\"" + Style + "\">Created "; _text += "<p style=\"" + Style + "\">Created ";
@ -48,13 +48,13 @@
if (CreatedOn != null) if (CreatedOn != null)
{ {
_text += " on <b>" + CreatedOn.ToString("MMM dd yyyy HH:mm:ss") + "</b>"; _text += " on <b>" + CreatedOn.Value.ToString("MMM dd yyyy HH:mm:ss") + "</b>";
} }
_text += "</p>"; _text += "</p>";
} }
if (!String.IsNullOrEmpty(ModifiedBy) || ModifiedOn != null) if (!String.IsNullOrEmpty(ModifiedBy) || ModifiedOn.HasValue)
{ {
_text += "<p style=\"" + Style + "\">Last modified "; _text += "<p style=\"" + Style + "\">Last modified ";
@ -65,7 +65,7 @@
if (ModifiedOn != null) if (ModifiedOn != null)
{ {
_text += " on <b>" + ModifiedOn.ToString("MMM dd yyyy HH:mm:ss") + "</b>"; _text += " on <b>" + ModifiedOn.Value.ToString("MMM dd yyyy HH:mm:ss") + "</b>";
} }
_text += "</p>"; _text += "</p>";

View File

@ -1,4 +1,4 @@
@namespace Oqtane.Modules.Controls @namespace Oqtane.Modules.Controls
@inherits ModuleControlBase @inherits ModuleControlBase
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@ -6,7 +6,7 @@
{ {
<div class="@_classname" role="alert"> <div class="@_classname" role="alert">
@_message @_message
@if (Type == MessageType.Error && UserSecurity.IsAuthorized(PageState.User, RoleNames.Host)) @if (Type == MessageType.Error && PageState != null && UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
{ {
@((MarkupString)"&nbsp;&nbsp;")<NavLink href="@NavigateUrl("admin/log")">View Details</NavLink> @((MarkupString)"&nbsp;&nbsp;")<NavLink href="@NavigateUrl("admin/log")">View Details</NavLink>
} }

View File

@ -1,4 +1,4 @@
@namespace Oqtane.UI @namespace Oqtane.UI
@inject IJSRuntime JsRuntime @inject IJSRuntime JsRuntime
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@ -79,7 +79,7 @@
"\"sizes\": \"512x512\", " + "\"sizes\": \"512x512\", " +
"\"type\": \"image/png\" " + "\"type\": \"image/png\" " +
"}] " + "}] " +
"} " + "}; " +
"const serialized = JSON.stringify(manifest); " + "const serialized = JSON.stringify(manifest); " +
"const blob = new Blob([serialized], {type: 'application/javascript'}); " + "const blob = new Blob([serialized], {type: 'application/javascript'}); " +
"const url = URL.createObjectURL(blob); " + "const url = URL.createObjectURL(blob); " +

View File

@ -13,6 +13,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oqtane.Upgrade", "Oqtane.Up
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oqtane.Test", "Oqtane.Test\Oqtane.Test.csproj", "{823B556D-8D4E-4BB8-A65A-C4EB5E7E7424}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oqtane.Test", "Oqtane.Test\Oqtane.Test.csproj", "{823B556D-8D4E-4BB8-A65A-C4EB5E7E7424}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{77EECA8C-B58E-469E-B8C5-D543AFC9A654}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU