commit
d93862043a
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2018-2023 .NET Foundation
|
Copyright (c) 2018-2024 .NET Foundation
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
<h2>@Localizer["ApplicationAdmin"]</h2><br />
|
<h2>@Localizer["ApplicationAdmin"]</h2><br />
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="username" HelpText="Provide a username for the primary user accountt" ResourceKey="Username">Username:</Label>
|
<Label Class="col-sm-3" For="username" HelpText="Provide a username for the primary user account" ResourceKey="Username">Username:</Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="username" type="text" class="form-control" @bind="@_hostUsername" />
|
<input id="username" type="text" class="form-control" @bind="@_hostUsername" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="runs-every" HelpText="Select how often you want the job to run" ResourceKey="RunsEvery">Runs Every: </Label>
|
<Label Class="col-sm-3" For="runs-every" HelpText="Select how often you want the job to run" ResourceKey="RunsEvery">Runs Every: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="runs-every" class="form-control" @bind="@_interval" maxlength="4" required />
|
<input id="runs-every" class="form-control mb-1" @bind="@_interval" maxlength="4" required />
|
||||||
<select id="runs-every" class="form-select" @bind="@_frequency" required>
|
<select id="runs-every" class="form-select" @bind="@_frequency" required>
|
||||||
<option value="m">@Localizer["Minute(s)"]</option>
|
<option value="m">@Localizer["Minute(s)"]</option>
|
||||||
<option value="H">@Localizer["Hour(s)"]</option>
|
<option value="H">@Localizer["Hour(s)"]</option>
|
||||||
|
@ -154,6 +154,11 @@
|
||||||
|
|
||||||
private async Task SaveJob()
|
private async Task SaveJob()
|
||||||
{
|
{
|
||||||
|
if (!Utilities.ValidateEffectiveExpiryDates(_startDate, _endDate))
|
||||||
|
{
|
||||||
|
AddModuleMessage(Localizer["Message.StartEndDateError"], MessageType.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
validated = true;
|
validated = true;
|
||||||
var interop = new Interop(JSRuntime);
|
var interop = new Interop(JSRuntime);
|
||||||
if (await interop.FormValid(form))
|
if (await interop.FormValid(form))
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
<form @ref="form" class="@(validated ? "was-validated" : "needs-validation")" novalidate>
|
<form @ref="form" class="@(validated ? "was-validated" : "needs-validation")" novalidate>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="owner" HelpText="Enter the name of the organization who is developing this module. It should not contain spaces or punctuation." ResourceKey="OwnerName">Owner Name: </Label>
|
<Label Class="col-sm-3" For="owner" HelpText="Enter the name of the organization who is developing this module. It should not contain spaces or punctuation or the word oqtane." ResourceKey="OwnerName">Owner Name: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="owner" class="form-control" @bind="@_owner" required />
|
<input id="owner" class="form-control" @bind="@_owner" required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="module" HelpText="Enter a name for this module. It should not contain spaces or punctuation." ResourceKey="ModuleName">Module Name: </Label>
|
<Label Class="col-sm-3" For="module" HelpText="Enter a name for this module. It should not contain spaces or punctuation or the word oqtane." ResourceKey="ModuleName">Module Name: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="module" class="form-control" @bind="@_module" required />
|
<input id="module" class="form-control" @bind="@_module" required />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -48,6 +48,18 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="effectiveDate" HelpText="The date that this module is active" ResourceKey="EffectiveDate">Effective Date: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="date" id="effectiveDate" class="form-control" @bind="@_effectivedate" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="expiryDate" HelpText="The date that this module expires" ResourceKey="ExpiryDate">Expiry Date: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="date" id="expiryDate" class="form-control" @bind="@_expirydate" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="allpages" HelpText="Indicate if this module should be displayed on all pages" ResourceKey="DisplayOnAllPages">Display On All Pages? </Label>
|
<Label Class="col-sm-3" For="allpages" HelpText="Indicate if this module should be displayed on all pages" ResourceKey="DisplayOnAllPages">Display On All Pages? </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
|
@ -114,7 +126,7 @@
|
||||||
<AuditInfo CreatedBy="@createdby" CreatedOn="@createdon" ModifiedBy="@modifiedby" ModifiedOn="@modifiedon"></AuditInfo>
|
<AuditInfo CreatedBy="@createdby" CreatedOn="@createdon" ModifiedBy="@modifiedby" ModifiedOn="@modifiedon"></AuditInfo>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
||||||
public override string Title => "Module Settings";
|
public override string Title => "Module Settings";
|
||||||
|
|
||||||
|
@ -141,7 +153,8 @@
|
||||||
private DateTime createdon;
|
private DateTime createdon;
|
||||||
private string modifiedby;
|
private string modifiedby;
|
||||||
private DateTime modifiedon;
|
private DateTime modifiedon;
|
||||||
|
private DateTime? _effectivedate = null;
|
||||||
|
private DateTime? _expirydate = null;
|
||||||
protected override void OnInitialized()
|
protected override void OnInitialized()
|
||||||
{
|
{
|
||||||
_module = ModuleState.ModuleDefinition.Name;
|
_module = ModuleState.ModuleDefinition.Name;
|
||||||
|
@ -156,6 +169,8 @@
|
||||||
createdon = ModuleState.CreatedOn;
|
createdon = ModuleState.CreatedOn;
|
||||||
modifiedby = ModuleState.ModifiedBy;
|
modifiedby = ModuleState.ModifiedBy;
|
||||||
modifiedon = ModuleState.ModifiedOn;
|
modifiedon = ModuleState.ModifiedOn;
|
||||||
|
_effectivedate = Utilities.UtcAsLocalDate(ModuleState.EffectiveDate);
|
||||||
|
_expirydate = Utilities.UtcAsLocalDate(ModuleState.ExpiryDate);
|
||||||
|
|
||||||
if (ModuleState.ModuleDefinition != null)
|
if (ModuleState.ModuleDefinition != null)
|
||||||
{
|
{
|
||||||
|
@ -214,12 +229,20 @@
|
||||||
var interop = new Interop(JSRuntime);
|
var interop = new Interop(JSRuntime);
|
||||||
if (await interop.FormValid(form))
|
if (await interop.FormValid(form))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(_title))
|
if (!string.IsNullOrEmpty(_title))
|
||||||
{
|
{
|
||||||
|
if (!Utilities.ValidateEffectiveExpiryDates(_effectivedate, _expirydate))
|
||||||
|
{
|
||||||
|
AddModuleMessage(SharedLocalizer["Message.EffectiveExpiryDateError"], MessageType.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
var pagemodule = await PageModuleService.GetPageModuleAsync(ModuleState.PageModuleId);
|
var pagemodule = await PageModuleService.GetPageModuleAsync(ModuleState.PageModuleId);
|
||||||
pagemodule.PageId = int.Parse(_pageId);
|
pagemodule.PageId = int.Parse(_pageId);
|
||||||
pagemodule.Title = _title;
|
pagemodule.Title = _title;
|
||||||
pagemodule.Pane = _pane;
|
pagemodule.Pane = _pane;
|
||||||
|
pagemodule.EffectiveDate = Utilities.LocalDateAndTimeAsUtc(_effectivedate);
|
||||||
|
pagemodule.ExpiryDate = Utilities.LocalDateAndTimeAsUtc(_expirydate);
|
||||||
pagemodule.ContainerType = (_containerType != "-") ? _containerType : string.Empty;
|
pagemodule.ContainerType = (_containerType != "-") ? _containerType : string.Empty;
|
||||||
if (!string.IsNullOrEmpty(pagemodule.ContainerType) && pagemodule.ContainerType == PageState.Page.DefaultContainerType)
|
if (!string.IsNullOrEmpty(pagemodule.ContainerType) && pagemodule.ContainerType == PageState.Page.DefaultContainerType)
|
||||||
{
|
{
|
||||||
|
@ -269,5 +292,4 @@
|
||||||
AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning);
|
AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,6 +119,18 @@
|
||||||
<i class="@_icon"></i>
|
<i class="@_icon"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="effectiveDate" HelpText="The date that this page is active" ResourceKey="EffectiveDate">Effective Date: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="date" id="effectiveDate" class="form-control" @bind="@_effectivedate" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="expiryDate" HelpText="The date that this page expires" ResourceKey="ExpiryDate">Expiry Date: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="date" id="expiryDate" class="form-control" @bind="@_expirydate" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="personalizable" HelpText="Select whether you would like users to be able to personalize this page with their own content" ResourceKey="Personalizable">Personalizable? </Label>
|
<Label Class="col-sm-3" For="personalizable" HelpText="Select whether you would like users to be able to personalize this page with their own content" ResourceKey="Personalizable">Personalizable? </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
|
@ -233,6 +245,8 @@
|
||||||
protected Page _parent = null;
|
protected Page _parent = null;
|
||||||
protected Dictionary<string, string> _icons;
|
protected Dictionary<string, string> _icons;
|
||||||
private string _iconresources = "";
|
private string _iconresources = "";
|
||||||
|
private DateTime? _effectivedate = null;
|
||||||
|
private DateTime? _expirydate = null;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
|
@ -265,6 +279,8 @@
|
||||||
_children.Add(p);
|
_children.Add(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_effectivedate = Utilities.UtcAsLocalDate(PageState.Page.EffectiveDate);
|
||||||
|
_expirydate = Utilities.UtcAsLocalDate(PageState.Page.ExpiryDate);
|
||||||
ThemeSettings();
|
ThemeSettings();
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
}
|
}
|
||||||
|
@ -347,6 +363,11 @@
|
||||||
Page page = null;
|
Page page = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (!Utilities.ValidateEffectiveExpiryDates(_effectivedate, _expirydate))
|
||||||
|
{
|
||||||
|
AddModuleMessage(SharedLocalizer["Message.EffectiveExpiryDateError"], MessageType.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!string.IsNullOrEmpty(_themetype) && !string.IsNullOrEmpty(_containertype))
|
if (!string.IsNullOrEmpty(_themetype) && !string.IsNullOrEmpty(_containertype))
|
||||||
{
|
{
|
||||||
page = new Page();
|
page = new Page();
|
||||||
|
@ -421,6 +442,8 @@
|
||||||
page.IsClickable = (_isclickable == null ? true : Boolean.Parse(_isclickable));
|
page.IsClickable = (_isclickable == null ? true : Boolean.Parse(_isclickable));
|
||||||
page.Url = _url;
|
page.Url = _url;
|
||||||
page.IsPersonalizable = (_ispersonalizable == null ? false : Boolean.Parse(_ispersonalizable));
|
page.IsPersonalizable = (_ispersonalizable == null ? false : Boolean.Parse(_ispersonalizable));
|
||||||
|
page.EffectiveDate = Utilities.LocalDateAndTimeAsUtc(_effectivedate);
|
||||||
|
page.ExpiryDate = Utilities.LocalDateAndTimeAsUtc(_expirydate);
|
||||||
page.UserId = null;
|
page.UserId = null;
|
||||||
|
|
||||||
// appearance
|
// appearance
|
||||||
|
|
|
@ -134,6 +134,18 @@
|
||||||
<i class="@_icon"></i>
|
<i class="@_icon"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="effectiveDate" HelpText="The date that this page is active" ResourceKey="EffectiveDate">Effective Date: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="date" id="effectiveDate" class="form-control" @bind="@_effectivedate" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="expiryDate" HelpText="The date that this page expires" ResourceKey="ExpiryDate">Expiry Date: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="date" id="expiryDate" class="form-control" @bind="@_expirydate" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="personalizable" HelpText="Select whether you would like users to be able to personalize this page with their own content" ResourceKey="Personalizable">Personalizable? </Label>
|
<Label Class="col-sm-3" For="personalizable" HelpText="Select whether you would like users to be able to personalize this page with their own content" ResourceKey="Personalizable">Personalizable? </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
|
@ -322,6 +334,8 @@
|
||||||
protected Page _parent = null;
|
protected Page _parent = null;
|
||||||
protected Dictionary<string, string> _icons;
|
protected Dictionary<string, string> _icons;
|
||||||
private string _iconresources = "";
|
private string _iconresources = "";
|
||||||
|
private DateTime? _effectivedate = null;
|
||||||
|
private DateTime? _expirydate = null;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
|
@ -370,6 +384,8 @@
|
||||||
}
|
}
|
||||||
_url = _page.Url;
|
_url = _page.Url;
|
||||||
_icon = _page.Icon;
|
_icon = _page.Icon;
|
||||||
|
_effectivedate = Utilities.UtcAsLocalDate(_page.EffectiveDate);
|
||||||
|
_expirydate = Utilities.UtcAsLocalDate(_page.ExpiryDate);
|
||||||
_ispersonalizable = _page.IsPersonalizable.ToString();
|
_ispersonalizable = _page.IsPersonalizable.ToString();
|
||||||
|
|
||||||
// appearance
|
// appearance
|
||||||
|
@ -487,6 +503,11 @@
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (!Utilities.ValidateEffectiveExpiryDates(_effectivedate, _expirydate))
|
||||||
|
{
|
||||||
|
AddModuleMessage(SharedLocalizer["Message.EffectiveExpiryDateError"], MessageType.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!string.IsNullOrEmpty(_themetype) && _containertype != "-")
|
if (!string.IsNullOrEmpty(_themetype) && _containertype != "-")
|
||||||
{
|
{
|
||||||
string currentPath = _page.Path;
|
string currentPath = _page.Path;
|
||||||
|
@ -563,6 +584,8 @@
|
||||||
_page.IsClickable = (_isclickable == null ? true : Boolean.Parse(_isclickable));
|
_page.IsClickable = (_isclickable == null ? true : Boolean.Parse(_isclickable));
|
||||||
_page.Url = _url;
|
_page.Url = _url;
|
||||||
_page.Icon = _icon ?? string.Empty;
|
_page.Icon = _icon ?? string.Empty;
|
||||||
|
_page.EffectiveDate = Utilities.LocalDateAndTimeAsUtc(_effectivedate);
|
||||||
|
_page.ExpiryDate = Utilities.LocalDateAndTimeAsUtc(_expirydate);
|
||||||
_page.IsPersonalizable = (_ispersonalizable != null && Boolean.Parse(_ispersonalizable));
|
_page.IsPersonalizable = (_ispersonalizable != null && Boolean.Parse(_ispersonalizable));
|
||||||
|
|
||||||
// appearance
|
// appearance
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="order" HelpText="The index order of where this profile item should be displayed" ResourceKey="Order">Order: </Label>
|
<Label Class="col-sm-3" For="order" HelpText="The index order of where this profile item should be displayed" ResourceKey="Order">Order: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="order" class="form-control" @bind="@_vieworder" min="0" max="99" type="number" required />
|
<input id="order" class="form-control" @bind="@_vieworder" min="0" max="9999" type="number" required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
|
@ -76,6 +76,12 @@
|
||||||
<input id="validation" class="form-control" @bind="@_validation" maxlength="200" />
|
<input id="validation" class="form-control" @bind="@_validation" maxlength="200" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="autocomplete" HelpText="The HTML autocomplete attribute allows you to specify browser behavior for automated user assistance in filling out form field values. Allowable values are blank (default), 'on', 'off', or any value from the standardized taxonomy defined for this attribute." ResourceKey="Autocomplete">Autocomplete: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input id="autocomplete" class="form-control" @bind="@_autocomplete" maxlength="30" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="private" HelpText="Should this profile item be visible to all users?" ResourceKey="Private">Private? </Label>
|
<Label Class="col-sm-3" For="private" HelpText="Should this profile item be visible to all users?" ResourceKey="Private">Private? </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
|
@ -111,6 +117,7 @@
|
||||||
private string _defaultvalue = string.Empty;
|
private string _defaultvalue = string.Empty;
|
||||||
private string _options = string.Empty;
|
private string _options = string.Empty;
|
||||||
private string _validation = string.Empty;
|
private string _validation = string.Empty;
|
||||||
|
private string _autocomplete = string.Empty;
|
||||||
private string _isrequired = "False";
|
private string _isrequired = "False";
|
||||||
private string _isprivate = "False";
|
private string _isprivate = "False";
|
||||||
private string createdby;
|
private string createdby;
|
||||||
|
@ -142,6 +149,7 @@
|
||||||
_defaultvalue = profile.DefaultValue;
|
_defaultvalue = profile.DefaultValue;
|
||||||
_options = profile.Options;
|
_options = profile.Options;
|
||||||
_validation = profile.Validation;
|
_validation = profile.Validation;
|
||||||
|
_autocomplete = profile.Autocomplete;
|
||||||
_isrequired = profile.IsRequired.ToString();
|
_isrequired = profile.IsRequired.ToString();
|
||||||
_isprivate = profile.IsPrivate.ToString();
|
_isprivate = profile.IsPrivate.ToString();
|
||||||
createdby = profile.CreatedBy;
|
createdby = profile.CreatedBy;
|
||||||
|
@ -187,8 +195,10 @@
|
||||||
profile.DefaultValue = _defaultvalue;
|
profile.DefaultValue = _defaultvalue;
|
||||||
profile.Options = _options;
|
profile.Options = _options;
|
||||||
profile.Validation = _validation;
|
profile.Validation = _validation;
|
||||||
|
profile.Autocomplete = _autocomplete;
|
||||||
profile.IsRequired = (_isrequired == null ? false : Boolean.Parse(_isrequired));
|
profile.IsRequired = (_isrequired == null ? false : Boolean.Parse(_isrequired));
|
||||||
profile.IsPrivate = (_isprivate == null ? false : Boolean.Parse(_isprivate));
|
profile.IsPrivate = (_isprivate == null ? false : Boolean.Parse(_isprivate));
|
||||||
|
|
||||||
if (_profileid != -1)
|
if (_profileid != -1)
|
||||||
{
|
{
|
||||||
profile = await ProfileService.UpdateProfileAsync(profile);
|
profile = await ProfileService.UpdateProfileAsync(profile);
|
||||||
|
|
|
@ -579,6 +579,11 @@
|
||||||
if (logofileid != -1)
|
if (logofileid != -1)
|
||||||
{
|
{
|
||||||
site.LogoFileId = logofileid;
|
site.LogoFileId = logofileid;
|
||||||
|
if (logofileid != _logofileid)
|
||||||
|
{
|
||||||
|
_logofileid = logofileid;
|
||||||
|
refresh = true; // needs to be refreshed on client
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int? faviconFieldId = _faviconfilemanager.GetFileId();
|
int? faviconFieldId = _faviconfilemanager.GetFileId();
|
||||||
if (faviconFieldId == -1) faviconFieldId = null;
|
if (faviconFieldId == -1) faviconFieldId = null;
|
||||||
|
@ -814,8 +819,17 @@
|
||||||
if (!string.IsNullOrEmpty(_aliasname))
|
if (!string.IsNullOrEmpty(_aliasname))
|
||||||
{
|
{
|
||||||
var aliases = await AliasService.GetAliasesAsync();
|
var aliases = await AliasService.GetAliasesAsync();
|
||||||
var alias = aliases.Where(item => item.Name == _aliasname).FirstOrDefault();
|
|
||||||
|
int protocolIndex = _aliasname.IndexOf("://", StringComparison.OrdinalIgnoreCase);
|
||||||
|
if (protocolIndex != -1)
|
||||||
|
{
|
||||||
|
_aliasname = _aliasname.Substring(protocolIndex + 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
var alias = aliases.FirstOrDefault(item => item.Name == _aliasname);
|
||||||
|
|
||||||
bool unique = (alias == null || alias.AliasId == _aliasid);
|
bool unique = (alias == null || alias.AliasId == _aliasid);
|
||||||
|
|
||||||
if (unique)
|
if (unique)
|
||||||
{
|
{
|
||||||
if (_aliasid == 0)
|
if (_aliasid == 0)
|
||||||
|
@ -825,22 +839,27 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alias = _aliases.Single(item => item.AliasId == _aliasid);
|
alias = _aliases.SingleOrDefault(item => item.AliasId == _aliasid);
|
||||||
|
if (alias != null)
|
||||||
|
{
|
||||||
alias.Name = _aliasname;
|
alias.Name = _aliasname;
|
||||||
alias.IsDefault = bool.Parse(_defaultalias);
|
alias.IsDefault = bool.Parse(_defaultalias);
|
||||||
await AliasService.UpdateAliasAsync(alias);
|
await AliasService.UpdateAliasAsync(alias);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // duplicate alias
|
|
||||||
{
|
|
||||||
AddModuleMessage(Localizer["Message.Aliases.Taken"], MessageType.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
await GetAliases();
|
await GetAliases();
|
||||||
_aliasid = -1;
|
_aliasid = -1;
|
||||||
_aliasname = "";
|
_aliasname = "";
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
else // Duplicate alias
|
||||||
|
{
|
||||||
|
AddModuleMessage(Localizer["Message.Aliases.Taken"], MessageType.Warning);
|
||||||
|
await ScrollToPageTop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task CancelAlias()
|
private async Task CancelAlias()
|
||||||
|
|
|
@ -47,12 +47,26 @@ else
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Edit(string name)
|
private void Edit(string name)
|
||||||
|
{
|
||||||
|
if (PageState.Alias.Name == name)
|
||||||
|
{
|
||||||
|
NavigationManager.NavigateTo("/admin/site");
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
NavigationManager.NavigateTo(PageState.Uri.Scheme + "://" + name + "/admin/site", true);
|
NavigationManager.NavigateTo(PageState.Uri.Scheme + "://" + name + "/admin/site", true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void Browse(string name)
|
private void Browse(string name)
|
||||||
|
{
|
||||||
|
if (PageState.Alias.Name == name)
|
||||||
|
{
|
||||||
|
NavigationManager.NavigateTo("/");
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
NavigationManager.NavigateTo(PageState.Uri.Scheme + "://" + name, true);
|
NavigationManager.NavigateTo(PageState.Uri.Scheme + "://" + name, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,9 @@
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
@if (!string.IsNullOrEmpty(p.Options))
|
@if (!string.IsNullOrEmpty(p.Options))
|
||||||
{
|
{
|
||||||
<select id="@p.Name" class="form-select" @onchange="@(e => ProfileChanged(e, p.Name))">
|
@if (!string.IsNullOrEmpty(p.Autocomplete))
|
||||||
|
{
|
||||||
|
<select id="@p.Name" class="form-select" @onchange="@(e => ProfileChanged(e, p.Name))" autocomplete="@p.Autocomplete">
|
||||||
@foreach (var option in p.Options.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
|
@foreach (var option in p.Options.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
|
||||||
{
|
{
|
||||||
@if (GetProfileValue(p.Name, "") == option || (GetProfileValue(p.Name, "") == "" && p.DefaultValue == option))
|
@if (GetProfileValue(p.Name, "") == option || (GetProfileValue(p.Name, "") == "" && p.DefaultValue == option))
|
||||||
|
@ -120,8 +122,38 @@
|
||||||
</select>
|
</select>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
<select id="@p.Name" class="form-select" @onchange="@(e => ProfileChanged(e, p.Name))">
|
||||||
|
@foreach (var option in p.Options.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
|
||||||
|
{
|
||||||
|
@if (GetProfileValue(p.Name, "") == option || (GetProfileValue(p.Name, "") == "" && p.DefaultValue == option))
|
||||||
|
{
|
||||||
|
<option value="@option" selected>@option</option>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<option value="@option">@option</option>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
@if (p.Rows == 1)
|
@if (p.Rows == 1)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(p.Autocomplete))
|
||||||
|
{
|
||||||
|
@if (p.IsRequired)
|
||||||
|
{
|
||||||
|
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))" autocomplete="@p.Autocomplete" />
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))" autocomplete="@p.Autocomplete" />
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
@if (p.IsRequired)
|
@if (p.IsRequired)
|
||||||
{
|
{
|
||||||
|
@ -132,6 +164,20 @@
|
||||||
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))" />
|
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))" />
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(p.Autocomplete))
|
||||||
|
{
|
||||||
|
@if (p.IsRequired)
|
||||||
|
{
|
||||||
|
<textarea id="@p.Name" class="form-control" maxlength="@p.MaxLength" rows="@p.Rows" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))" autocomplete="@p.Autocomplete"></textarea>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<textarea id="@p.Name" class="form-control" maxlength="@p.MaxLength" rows="@p.Rows" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))" autocomplete="@p.Autocomplete"></textarea>
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@if (p.IsRequired)
|
@if (p.IsRequired)
|
||||||
|
@ -144,6 +190,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
@ -360,10 +407,11 @@
|
||||||
photofileid = -1;
|
photofileid = -1;
|
||||||
photo = null;
|
photo = null;
|
||||||
}
|
}
|
||||||
var sitesettings = await SettingService.GetSiteSettingsAsync(SiteState.Alias.SiteId);
|
|
||||||
_ImageFiles = SettingService.GetSetting(settings, "ImageFiles", Constants.ImageFiles);
|
|
||||||
|
|
||||||
settings = await SettingService.GetUserSettingsAsync(PageState.User.UserId);
|
settings = await SettingService.GetUserSettingsAsync(PageState.User.UserId);
|
||||||
|
var sitesettings = await SettingService.GetSiteSettingsAsync(PageState.Site.SiteId);
|
||||||
|
_ImageFiles = SettingService.GetSetting(settings, "ImageFiles", Constants.ImageFiles);
|
||||||
|
_ImageFiles = (string.IsNullOrEmpty(_ImageFiles)) ? Constants.ImageFiles : _ImageFiles;
|
||||||
|
|
||||||
await LoadNotificationsAsync();
|
await LoadNotificationsAsync();
|
||||||
|
|
||||||
|
@ -574,7 +622,6 @@
|
||||||
AddModuleMessage(ex.Message, MessageType.Error);
|
AddModuleMessage(ex.Message, MessageType.Error);
|
||||||
ModuleInstance.HideProgressIndicator();
|
ModuleInstance.HideProgressIndicator();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TogglePassword()
|
private void TogglePassword()
|
||||||
|
@ -590,5 +637,4 @@
|
||||||
_togglepassword = SharedLocalizer["ShowPassword"];
|
_togglepassword = SharedLocalizer["ShowPassword"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,13 +34,13 @@ else
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="effectiveDate" HelpText="The date that this role assignment is active" ResourceKey="EffectiveDate">Effective Date: </Label>
|
<Label Class="col-sm-3" For="effectiveDate" HelpText="The date that this role assignment is active" ResourceKey="EffectiveDate">Effective Date: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="date" id="effectiveDate" class="form-control" @bind="@effectivedate" />
|
<input type="date" id="effectiveDate" class="form-control" @bind="@_effectivedate" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="expiryDate" HelpText="The date that this role assignment expires" ResourceKey="ExpiryDate">Expiry Date: </Label>
|
<Label Class="col-sm-3" For="expiryDate" HelpText="The date that this role assignment expires" ResourceKey="ExpiryDate">Expiry Date: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="date" id="expiryDate" class="form-control" @bind="@expirydate" />
|
<input type="date" id="expiryDate" class="form-control" @bind="@_expirydate" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -60,8 +60,8 @@ else
|
||||||
</Header>
|
</Header>
|
||||||
<Row>
|
<Row>
|
||||||
<td>@context.Role.Name</td>
|
<td>@context.Role.Name</td>
|
||||||
<td>@context.EffectiveDate</td>
|
<td>@Utilities.UtcAsLocalDate(context.EffectiveDate)</td>
|
||||||
<td>@context.ExpiryDate</td>
|
<td>@Utilities.UtcAsLocalDate(context.ExpiryDate)</td>
|
||||||
<td>
|
<td>
|
||||||
<ActionDialog Header="Remove Role" Message="@string.Format(Localizer["Confirm.User.RemoveRole"], context.Role.Name)" Action="Delete" Security="SecurityAccessLevel.Edit" Class="btn btn-danger" OnClick="@(async () => await DeleteUserRole(context.UserRoleId))" Disabled="@(context.Role.IsAutoAssigned || (context.Role.Name == RoleNames.Host && userid == PageState.User.UserId))" ResourceKey="DeleteUserRole" />
|
<ActionDialog Header="Remove Role" Message="@string.Format(Localizer["Confirm.User.RemoveRole"], context.Role.Name)" Action="Delete" Security="SecurityAccessLevel.Edit" Class="btn btn-danger" OnClick="@(async () => await DeleteUserRole(context.UserRoleId))" Disabled="@(context.Role.IsAutoAssigned || (context.Role.Name == RoleNames.Host && userid == PageState.User.UserId))" ResourceKey="DeleteUserRole" />
|
||||||
</td>
|
</td>
|
||||||
|
@ -75,8 +75,8 @@ else
|
||||||
private string name = string.Empty;
|
private string name = string.Empty;
|
||||||
private List<Role> roles;
|
private List<Role> roles;
|
||||||
private int roleid = -1;
|
private int roleid = -1;
|
||||||
private DateTime? effectivedate = null;
|
private DateTime? _effectivedate = null;
|
||||||
private DateTime? expirydate = null;
|
private DateTime? _expirydate = null;
|
||||||
private List<UserRole> userroles;
|
private List<UserRole> userroles;
|
||||||
|
|
||||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
||||||
|
@ -113,6 +113,7 @@ else
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
userroles = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, userid);
|
userroles = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, userid);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -127,11 +128,16 @@ else
|
||||||
{
|
{
|
||||||
if (roleid != -1)
|
if (roleid != -1)
|
||||||
{
|
{
|
||||||
|
if (!Utilities.ValidateEffectiveExpiryDates(_effectivedate, _expirydate))
|
||||||
|
{
|
||||||
|
AddModuleMessage(SharedLocalizer["Message.EffectiveExpiryDateError"], MessageType.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
var userrole = userroles.Where(item => item.UserId == userid && item.RoleId == roleid).FirstOrDefault();
|
var userrole = userroles.Where(item => item.UserId == userid && item.RoleId == roleid).FirstOrDefault();
|
||||||
if (userrole != null)
|
if (userrole != null)
|
||||||
{
|
{
|
||||||
userrole.EffectiveDate = effectivedate;
|
userrole.EffectiveDate = _effectivedate;
|
||||||
userrole.ExpiryDate = expirydate;
|
userrole.ExpiryDate = _expirydate;
|
||||||
await UserRoleService.UpdateUserRoleAsync(userrole);
|
await UserRoleService.UpdateUserRoleAsync(userrole);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -139,8 +145,8 @@ else
|
||||||
userrole = new UserRole();
|
userrole = new UserRole();
|
||||||
userrole.UserId = userid;
|
userrole.UserId = userid;
|
||||||
userrole.RoleId = roleid;
|
userrole.RoleId = roleid;
|
||||||
userrole.EffectiveDate = effectivedate;
|
userrole.EffectiveDate = Utilities.UtcAsLocalDate(_effectivedate);
|
||||||
userrole.ExpiryDate = expirydate;
|
userrole.ExpiryDate = Utilities.UtcAsLocalDate(_expirydate);
|
||||||
await UserRoleService.AddUserRoleAsync(userrole);
|
await UserRoleService.AddUserRoleAsync(userrole);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
@inject IFolderService FolderService
|
@inject IFolderService FolderService
|
||||||
@inject IFileService FileService
|
@inject IFileService FileService
|
||||||
@inject ISettingService SettingService
|
@inject ISettingService SettingService
|
||||||
|
@inject IUserService UserService
|
||||||
@inject IStringLocalizer<FileManager> Localizer
|
@inject IStringLocalizer<FileManager> Localizer
|
||||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
|
|
||||||
|
@ -370,7 +371,12 @@
|
||||||
// upload the files
|
// upload the files
|
||||||
var posturl = Utilities.TenantUrl(PageState.Alias, "/api/file/upload");
|
var posturl = Utilities.TenantUrl(PageState.Alias, "/api/file/upload");
|
||||||
var folder = (Folder == Constants.PackagesFolder) ? Folder : FolderId.ToString();
|
var folder = (Folder == Constants.PackagesFolder) ? Folder : FolderId.ToString();
|
||||||
await interop.UploadFiles(posturl, folder, _guid, SiteState.AntiForgeryToken);
|
var jwt = "";
|
||||||
|
if (PageState.Runtime == Shared.Runtime.Hybrid)
|
||||||
|
{
|
||||||
|
jwt = await UserService.GetTokenAsync();
|
||||||
|
}
|
||||||
|
await interop.UploadFiles(posturl, folder, _guid, SiteState.AntiForgeryToken, jwt);
|
||||||
|
|
||||||
// uploading is asynchronous so we need to poll to determine if uploads are completed
|
// uploading is asynchronous so we need to poll to determine if uploads are completed
|
||||||
var success = true;
|
var success = true;
|
||||||
|
|
|
@ -162,12 +162,15 @@
|
||||||
_richhtml = Content;
|
_richhtml = Content;
|
||||||
_rawhtml = Content;
|
_rawhtml = Content;
|
||||||
_originalrawhtml = _rawhtml; // preserve for comparison later
|
_originalrawhtml = _rawhtml; // preserve for comparison later
|
||||||
|
_originalrichhtml = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
{
|
{
|
||||||
await base.OnAfterRenderAsync(firstRender);
|
await base.OnAfterRenderAsync(firstRender);
|
||||||
|
|
||||||
|
if (AllowRichText)
|
||||||
|
{
|
||||||
var interop = new RichTextEditorInterop(JSRuntime);
|
var interop = new RichTextEditorInterop(JSRuntime);
|
||||||
|
|
||||||
if (firstRender)
|
if (firstRender)
|
||||||
|
@ -179,10 +182,11 @@
|
||||||
Placeholder,
|
Placeholder,
|
||||||
Theme,
|
Theme,
|
||||||
DebugLevel);
|
DebugLevel);
|
||||||
|
}
|
||||||
|
|
||||||
await interop.LoadEditorContent(_editorElement, _richhtml);
|
await interop.LoadEditorContent(_editorElement, _richhtml);
|
||||||
|
|
||||||
if (AllowRichText)
|
if (string.IsNullOrEmpty(_originalrichhtml))
|
||||||
{
|
{
|
||||||
// preserve a copy of the rich text content (Quill sanitizes content so we need to retrieve it from the editor)
|
// preserve a copy of the rich text content (Quill sanitizes content so we need to retrieve it from the editor)
|
||||||
_originalrichhtml = await interop.GetHtml(_editorElement);
|
_originalrichhtml = await interop.GetHtml(_editorElement);
|
||||||
|
@ -256,6 +260,7 @@
|
||||||
{
|
{
|
||||||
var interop = new RichTextEditorInterop(JSRuntime);
|
var interop = new RichTextEditorInterop(JSRuntime);
|
||||||
await interop.InsertImage(_editorElement, file.Url, ((!string.IsNullOrEmpty(file.Description)) ? file.Description : file.Name));
|
await interop.InsertImage(_editorElement, file.Url, ((!string.IsNullOrEmpty(file.Description)) ? file.Description : file.Name));
|
||||||
|
_richhtml = await interop.GetHtml(_editorElement);
|
||||||
_richfilemanager = false;
|
_richfilemanager = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
if (ShouldRender())
|
||||||
{
|
{
|
||||||
var htmltext = await HtmlTextService.GetHtmlTextAsync(ModuleState.ModuleId);
|
var htmltext = await HtmlTextService.GetHtmlTextAsync(ModuleState.ModuleId);
|
||||||
if (htmltext != null)
|
if (htmltext != null)
|
||||||
|
@ -28,6 +30,7 @@
|
||||||
content = Utilities.FormatContent(content, PageState.Alias, "render");
|
content = Utilities.FormatContent(content, PageState.Alias, "render");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
await logger.LogError(ex, "Error Loading Content {Error}", ex.Message);
|
await logger.LogError(ex, "Error Loading Content {Error}", ex.Message);
|
||||||
|
|
|
@ -113,6 +113,11 @@ namespace Oqtane.Modules
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool ShouldRender()
|
||||||
|
{
|
||||||
|
return PageState?.RenderId == ModuleState?.RenderId;
|
||||||
|
}
|
||||||
|
|
||||||
// path method
|
// path method
|
||||||
|
|
||||||
public string ModulePath()
|
public string ModulePath()
|
||||||
|
@ -266,6 +271,7 @@ namespace Oqtane.Modules
|
||||||
|
|
||||||
public void AddModuleMessage(string message, MessageType type, string position)
|
public void AddModuleMessage(string message, MessageType type, string position)
|
||||||
{
|
{
|
||||||
|
ClearModuleMessage();
|
||||||
ModuleInstance.AddModuleMessage(message, type, position);
|
ModuleInstance.AddModuleMessage(message, type, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<Version>5.0.1</Version>
|
<Version>5.0.2</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<Copyright>.NET Foundation</Copyright>
|
<Copyright>.NET Foundation</Copyright>
|
||||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
||||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</PackageReleaseNotes>
|
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</PackageReleaseNotes>
|
||||||
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
||||||
<RepositoryType>Git</RepositoryType>
|
<RepositoryType>Git</RepositoryType>
|
||||||
<RootNamespace>Oqtane</RootNamespace>
|
<RootNamespace>Oqtane</RootNamespace>
|
||||||
|
@ -21,10 +21,10 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.1" PrivateAssets="all" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
||||||
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
|
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Localization" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Localization" Version="2.2.0" />
|
||||||
|
|
|
@ -192,4 +192,7 @@
|
||||||
<data name="Once" xml:space="preserve">
|
<data name="Once" xml:space="preserve">
|
||||||
<value>Execute Once</value>
|
<value>Execute Once</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Message.StartEndDateError" xml:space="preserve">
|
||||||
|
<value>Start Date cannot be after End Date.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -130,16 +130,16 @@
|
||||||
<value>Please Note That The Module Creator Is Only Intended To Be Used In A Development Environment</value>
|
<value>Please Note That The Module Creator Is Only Intended To Be Used In A Development Environment</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Message.Require.ValidName" xml:space="preserve">
|
<data name="Message.Require.ValidName" xml:space="preserve">
|
||||||
<value>You Must Provide A Valid Owner Name And Module Name ( ie. No Punctuation Or Spaces And The Values Cannot Be The Same ) And Choose A Template</value>
|
<value>You Must Provide A Valid Owner Name And Module Name ( ie. No Punctuation Or Spaces And The Values Cannot Be The Same Or Contain The Word "Oqtane" ) And Choose A Template</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Message.Require.ValidDescription" xml:space="preserve">
|
<data name="Message.Require.ValidDescription" xml:space="preserve">
|
||||||
<value>You Must Provide A Valid Description (ie. No Punctuation)</value>
|
<value>You Must Provide A Valid Description (ie. No Punctuation)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="OwnerName.HelpText" xml:space="preserve">
|
<data name="OwnerName.HelpText" xml:space="preserve">
|
||||||
<value>Enter the name of the organization who is developing this module. It should not contain spaces or punctuation.</value>
|
<value>Enter the name of the organization who is developing this module. It should not contain spaces or punctuation or contain the word "oqtane".</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ModuleName.HelpText" xml:space="preserve">
|
<data name="ModuleName.HelpText" xml:space="preserve">
|
||||||
<value>Enter a name for this module. It should not contain spaces or punctuation.</value>
|
<value>Enter a name for this module. It should not contain spaces or punctuation or contain the word "oqtane".</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Description.HelpText" xml:space="preserve">
|
<data name="Description.HelpText" xml:space="preserve">
|
||||||
<value>Enter a short description for the module</value>
|
<value>Enter a short description for the module</value>
|
||||||
|
|
|
@ -165,4 +165,16 @@
|
||||||
<data name="Pane.Text" xml:space="preserve">
|
<data name="Pane.Text" xml:space="preserve">
|
||||||
<value>Pane:</value>
|
<value>Pane:</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="EffectiveDate.HelpText" xml:space="preserve">
|
||||||
|
<value>The date that this module is active</value>
|
||||||
|
</data>
|
||||||
|
<data name="EffectiveDate.Text" xml:space="preserve">
|
||||||
|
<value>Effective Date: </value>
|
||||||
|
</data>
|
||||||
|
<data name="ExpiryDate.HelpText" xml:space="preserve">
|
||||||
|
<value>The date that this module expires</value>
|
||||||
|
</data>
|
||||||
|
<data name="ExpiryDate.Text" xml:space="preserve">
|
||||||
|
<value>Expiry Date: </value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -255,4 +255,16 @@
|
||||||
<data name="Theme.Heading" xml:space="preserve">
|
<data name="Theme.Heading" xml:space="preserve">
|
||||||
<value>Theme Settings</value>
|
<value>Theme Settings</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="EffectiveDate.HelpText" xml:space="preserve">
|
||||||
|
<value>The date that this page is active</value>
|
||||||
|
</data>
|
||||||
|
<data name="EffectiveDate.Text" xml:space="preserve">
|
||||||
|
<value>Effective Date: </value>
|
||||||
|
</data>
|
||||||
|
<data name="ExpiryDate.HelpText" xml:space="preserve">
|
||||||
|
<value>The date that this page expires</value>
|
||||||
|
</data>
|
||||||
|
<data name="ExpiryDate.Text" xml:space="preserve">
|
||||||
|
<value>Expiry Date: </value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -285,4 +285,16 @@
|
||||||
<data name="ThemeChanged.Message" xml:space="preserve">
|
<data name="ThemeChanged.Message" xml:space="preserve">
|
||||||
<value>Please Note That Overriding The Default Site Theme With An Unrelated Page Theme May Result In Compatibility Issues For Your Site</value>
|
<value>Please Note That Overriding The Default Site Theme With An Unrelated Page Theme May Result In Compatibility Issues For Your Site</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="EffectiveDate.HelpText" xml:space="preserve">
|
||||||
|
<value>The date that this page is active</value>
|
||||||
|
</data>
|
||||||
|
<data name="EffectiveDate.Text" xml:space="preserve">
|
||||||
|
<value>Effective Date: </value>
|
||||||
|
</data>
|
||||||
|
<data name="ExpiryDate.HelpText" xml:space="preserve">
|
||||||
|
<value>The date that this page expires</value>
|
||||||
|
</data>
|
||||||
|
<data name="ExpiryDate.Text" xml:space="preserve">
|
||||||
|
<value>Expiry Date: </value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
@ -195,4 +195,10 @@
|
||||||
<data name="Rows.Text" xml:space="preserve">
|
<data name="Rows.Text" xml:space="preserve">
|
||||||
<value>Rows: </value>
|
<value>Rows: </value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Autocomplete.HelpText" xml:space="preserve">
|
||||||
|
<value>The HTML autocomplete attribute allows you to specify browser behavior for automated user assistance in filling out form field values. Allowable values are blank (default), 'on', 'off', or any value from the standardized taxonomy defined for this attribute.</value>
|
||||||
|
</data>
|
||||||
|
<data name="Autocomplete.Text" xml:space="preserve">
|
||||||
|
<value>Autocomplete: </value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -438,4 +438,7 @@
|
||||||
<data name="Test" xml:space="preserve">
|
<data name="Test" xml:space="preserve">
|
||||||
<value>Test</value>
|
<value>Test</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Message.EffectiveExpiryDateError" xml:space="preserve">
|
||||||
|
<value>Effective Date cannot be after Expiry Date.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -5,7 +5,7 @@ using System.Threading.Tasks;
|
||||||
namespace Oqtane.Services
|
namespace Oqtane.Services
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Service to retreive and store modules (<see cref="Module"/>)
|
/// Service to retrieve and store modules (<see cref="Module"/>)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IModuleService
|
public interface IModuleService
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ using System.Threading.Tasks;
|
||||||
namespace Oqtane.Services
|
namespace Oqtane.Services
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Service to store and retreive notifications (<see cref="Notification"/>)
|
/// Service to store and retrieve notifications (<see cref="Notification"/>)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface INotificationService
|
public interface INotificationService
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.Threading.Tasks;
|
||||||
namespace Oqtane.Services
|
namespace Oqtane.Services
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Service to store and retreive a <see cref="PageModule"/>
|
/// Service to store and retrieve a <see cref="PageModule"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IPageModuleService
|
public interface IPageModuleService
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ using System.Threading.Tasks;
|
||||||
namespace Oqtane.Services
|
namespace Oqtane.Services
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Service to store and retreive <see cref="Profile"/> entries
|
/// Service to store and retrieve <see cref="Profile"/> entries
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IProfileService
|
public interface IProfileService
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||||
namespace Oqtane.Services
|
namespace Oqtane.Services
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Service to store and retreive <see cref="Site"/> entries
|
/// Service to store and retrieve <see cref="Site"/> entries
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ISiteService
|
public interface ISiteService
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@ using System.Threading.Tasks;
|
||||||
namespace Oqtane.Services
|
namespace Oqtane.Services
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Service to retreive <see cref="SiteTemplate"/> entries
|
/// Service to retrieve <see cref="SiteTemplate"/> entries
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface ISiteTemplateService
|
public interface ISiteTemplateService
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace Oqtane.Services
|
||||||
Task<List<Theme>> GetThemesAsync();
|
Task<List<Theme>> GetThemesAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a specific thenme
|
/// Returns a specific theme
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="themeId"></param>
|
/// <param name="themeId"></param>
|
||||||
/// <param name="siteId"></param>
|
/// <param name="siteId"></param>
|
||||||
|
@ -56,7 +56,7 @@ namespace Oqtane.Services
|
||||||
List<ThemeControl> GetContainerControls(List<Theme> themes, string themeControlType);
|
List<ThemeControl> GetContainerControls(List<Theme> themes, string themeControlType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates a existing theem
|
/// Updates a existing theme
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="theme"></param>
|
/// <param name="theme"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|
|
@ -242,7 +242,7 @@ namespace Oqtane.Services
|
||||||
|
|
||||||
private async Task Log(string uri, string method, string status, string message, params object[] args)
|
private async Task Log(string uri, string method, string status, string message, params object[] args)
|
||||||
{
|
{
|
||||||
if (_siteState.Alias != null && !uri.StartsWith(CreateApiUrl("Log")))
|
if (_siteState?.Alias != null && !uri.StartsWith(CreateApiUrl("Log")))
|
||||||
{
|
{
|
||||||
var log = new Log();
|
var log = new Log();
|
||||||
log.SiteId = _siteState.Alias.SiteId;
|
log.SiteId = _siteState.Alias.SiteId;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
|
|
||||||
namespace Oqtane.Themes
|
namespace Oqtane.Themes
|
||||||
|
@ -8,5 +8,9 @@ namespace Oqtane.Themes
|
||||||
[CascadingParameter]
|
[CascadingParameter]
|
||||||
protected Module ModuleState { get; set; }
|
protected Module ModuleState { get; set; }
|
||||||
|
|
||||||
|
protected override bool ShouldRender()
|
||||||
|
{
|
||||||
|
return PageState?.RenderId == ModuleState?.RenderId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,11 +56,12 @@ namespace Oqtane.Themes.Controls
|
||||||
var url = route.PathAndQuery;
|
var url = route.PathAndQuery;
|
||||||
|
|
||||||
// verify if anonymous users can access page
|
// verify if anonymous users can access page
|
||||||
if (!UserSecurity.IsAuthorized(null, PermissionNames.View, PageState.Page.PermissionList))
|
if (!UserSecurity.IsAuthorized(null, PermissionNames.View, PageState.Page.PermissionList) || !Utilities.IsPageModuleVisible(PageState.Page.EffectiveDate, PageState.Page.ExpiryDate))
|
||||||
{
|
{
|
||||||
url = PageState.Alias.Path;
|
url = PageState.Alias.Path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (PageState.Runtime == Shared.Runtime.Hybrid)
|
if (PageState.Runtime == Shared.Runtime.Hybrid)
|
||||||
{
|
{
|
||||||
// hybrid apps utilize an interactive logout
|
// hybrid apps utilize an interactive logout
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
@namespace Oqtane.UI
|
@namespace Oqtane.UI
|
||||||
@inject SiteState SiteState
|
@inject SiteState SiteState
|
||||||
|
|
||||||
@if (_visible)
|
@if (ComponentType != null && _visible)
|
||||||
{
|
{
|
||||||
<a id="@ModuleState.PageModuleId.ToString()"></a>
|
<a id="@ModuleState.PageModuleId.ToString()"></a>
|
||||||
<CascadingValue Value="@ModuleState">
|
<CascadingValue Value="@ModuleState">
|
||||||
|
@ -17,7 +17,6 @@
|
||||||
<DynamicComponent Type="@ComponentType"></DynamicComponent>
|
<DynamicComponent Type="@ComponentType"></DynamicComponent>
|
||||||
}
|
}
|
||||||
</CascadingValue>
|
</CascadingValue>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
@ -31,6 +30,11 @@
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public Module ModuleState { get; set; }
|
public Module ModuleState { get; set; }
|
||||||
|
|
||||||
|
protected override bool ShouldRender()
|
||||||
|
{
|
||||||
|
return PageState?.RenderId == ModuleState?.RenderId;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnInitialized()
|
protected override void OnInitialized()
|
||||||
{
|
{
|
||||||
((INotifyPropertyChanged)SiteState.Properties).PropertyChanged += PropertyChanged;
|
((INotifyPropertyChanged)SiteState.Properties).PropertyChanged += PropertyChanged;
|
||||||
|
@ -53,8 +57,11 @@
|
||||||
_useadminborder = false;
|
_useadminborder = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ShouldRender())
|
||||||
|
{
|
||||||
ComponentType = Type.GetType(container) ?? Type.GetType(Constants.DefaultContainer);
|
ComponentType = Type.GetType(container) ?? Type.GetType(Constants.DefaultContainer);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void PropertyChanged(object sender, PropertyChangedEventArgs e)
|
private void PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -72,6 +79,4 @@
|
||||||
{
|
{
|
||||||
((INotifyPropertyChanged)SiteState.Properties).PropertyChanged -= PropertyChanged;
|
((INotifyPropertyChanged)SiteState.Properties).PropertyChanged -= PropertyChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,13 +198,13 @@ namespace Oqtane.UI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task UploadFiles(string posturl, string folder, string id, string antiforgerytoken)
|
public Task UploadFiles(string posturl, string folder, string id, string antiforgerytoken, string jwt)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_jsRuntime.InvokeVoidAsync(
|
_jsRuntime.InvokeVoidAsync(
|
||||||
"Oqtane.Interop.uploadFiles",
|
"Oqtane.Interop.uploadFiles",
|
||||||
posturl, folder, id, antiforgerytoken);
|
posturl, folder, id, antiforgerytoken, jwt);
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
@if (CurrentException is null)
|
@if (CurrentException is null)
|
||||||
{
|
{
|
||||||
if (_messagePosition == "top")
|
if (_message != "" && _messagePosition == "top")
|
||||||
{
|
{
|
||||||
<ModuleMessage Message="@_message" Type="@_messageType" />
|
<ModuleMessage Message="@_message" Type="@_messageType" />
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
<div class="app-progress-indicator"></div>
|
<div class="app-progress-indicator"></div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_messagePosition == "bottom")
|
if (_message != "" && _messagePosition == "bottom")
|
||||||
{
|
{
|
||||||
<ModuleMessage Message="@_message" Type="@_messageType" />
|
<ModuleMessage Message="@_message" Type="@_messageType" />
|
||||||
}
|
}
|
||||||
|
@ -48,9 +48,16 @@ else
|
||||||
|
|
||||||
private ModuleMessage ModuleMessage { get; set; }
|
private ModuleMessage ModuleMessage { get; set; }
|
||||||
|
|
||||||
|
protected override bool ShouldRender()
|
||||||
|
{
|
||||||
|
return PageState?.RenderId == ModuleState?.RenderId;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
protected override void OnParametersSet()
|
||||||
{
|
{
|
||||||
_message = "";
|
_message = "";
|
||||||
|
if (ShouldRender())
|
||||||
|
{
|
||||||
if (!string.IsNullOrEmpty(ModuleState.ModuleType))
|
if (!string.IsNullOrEmpty(ModuleState.ModuleType))
|
||||||
{
|
{
|
||||||
ModuleType = Type.GetType(ModuleState.ModuleType);
|
ModuleType = Type.GetType(ModuleState.ModuleType);
|
||||||
|
@ -71,6 +78,7 @@ else
|
||||||
_messagePosition = "top";
|
_messagePosition = "top";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void AddModuleMessage(string message, MessageType type)
|
public void AddModuleMessage(string message, MessageType type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Xml.Linq;
|
|
||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
|
|
||||||
namespace Oqtane.UI
|
namespace Oqtane.UI
|
||||||
|
@ -25,6 +23,7 @@ namespace Oqtane.UI
|
||||||
public string RemoteIPAddress { get; set; }
|
public string RemoteIPAddress { get; set; }
|
||||||
public string ReturnUrl { get; set; }
|
public string ReturnUrl { get; set; }
|
||||||
public bool IsInternalNavigation { get; set; }
|
public bool IsInternalNavigation { get; set; }
|
||||||
|
public Guid RenderId { get; set; }
|
||||||
|
|
||||||
public List<Page> Pages
|
public List<Page> Pages
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,6 +45,12 @@ else
|
||||||
{
|
{
|
||||||
foreach (Module module in PageState.Modules.Where(item => item.PageId == PageState.Page.PageId))
|
foreach (Module module in PageState.Modules.Where(item => item.PageId == PageState.Page.PageId))
|
||||||
{
|
{
|
||||||
|
// set renderid - this allows the framework to determine which components should be rendered when PageState changes
|
||||||
|
if (module.RenderId != PageState.RenderId)
|
||||||
|
{
|
||||||
|
module.RenderId = PageState.RenderId;
|
||||||
|
}
|
||||||
|
|
||||||
var pane = module.Pane;
|
var pane = module.Pane;
|
||||||
if (module.ModuleId == PageState.ModuleId && PageState.Action != Constants.DefaultAction)
|
if (module.ModuleId == PageState.ModuleId && PageState.Action != Constants.DefaultAction)
|
||||||
{
|
{
|
||||||
|
@ -95,7 +101,7 @@ else
|
||||||
|
|
||||||
if (authorized)
|
if (authorized)
|
||||||
{
|
{
|
||||||
CreateComponent(builder, module);
|
CreateComponent(builder, module, module.PageModuleId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,7 +112,7 @@ else
|
||||||
// check if user is authorized to view module
|
// check if user is authorized to view module
|
||||||
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, module.PermissionList))
|
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, module.PermissionList))
|
||||||
{
|
{
|
||||||
CreateComponent(builder, module);
|
CreateComponent(builder, module, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,11 +121,14 @@ else
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateComponent(RenderTreeBuilder builder, Module module)
|
private void CreateComponent(RenderTreeBuilder builder, Module module, int key)
|
||||||
{
|
{
|
||||||
builder.OpenComponent(0, Type.GetType(Constants.ContainerComponent));
|
builder.OpenComponent(0, Type.GetType(Constants.ContainerComponent));
|
||||||
builder.AddAttribute(1, "ModuleState", module);
|
builder.AddAttribute(1, "ModuleState", module);
|
||||||
|
if (key != -1)
|
||||||
|
{
|
||||||
builder.SetKey(module.PageModuleId);
|
builder.SetKey(module.PageModuleId);
|
||||||
|
}
|
||||||
builder.CloseComponent();
|
builder.CloseComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,7 +262,7 @@
|
||||||
if (page != null)
|
if (page != null)
|
||||||
{
|
{
|
||||||
// check if user is authorized to view page
|
// check if user is authorized to view page
|
||||||
if (UserSecurity.IsAuthorized(user, PermissionNames.View, page.PermissionList))
|
if (UserSecurity.IsAuthorized(user, PermissionNames.View, page.PermissionList) && (Utilities.IsPageModuleVisible(page.EffectiveDate, page.ExpiryDate) || UserSecurity.IsAuthorized(user, PermissionNames.Edit, page.PermissionList)))
|
||||||
{
|
{
|
||||||
// load additional metadata for current page
|
// load additional metadata for current page
|
||||||
page = ProcessPage(page, site, user, SiteState.Alias);
|
page = ProcessPage(page, site, user, SiteState.Alias);
|
||||||
|
@ -289,12 +289,22 @@
|
||||||
VisitorId = VisitorId,
|
VisitorId = VisitorId,
|
||||||
RemoteIPAddress = SiteState.RemoteIPAddress,
|
RemoteIPAddress = SiteState.RemoteIPAddress,
|
||||||
ReturnUrl = returnurl,
|
ReturnUrl = returnurl,
|
||||||
IsInternalNavigation = _isInternalNavigation
|
IsInternalNavigation = _isInternalNavigation,
|
||||||
|
RenderId = Guid.NewGuid()
|
||||||
};
|
};
|
||||||
|
|
||||||
OnStateChange?.Invoke(_pagestate);
|
OnStateChange?.Invoke(_pagestate);
|
||||||
await ScrollToFragment(_pagestate.Uri);
|
await ScrollToFragment(_pagestate.Uri);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Need to redirect 404 as page doesnot exist in a Permission or Timeframe
|
||||||
|
if (route.PagePath != "404")
|
||||||
|
{
|
||||||
|
// redirect to 404 page
|
||||||
|
NavigationManager.NavigateTo(Utilities.NavigateUrl(SiteState.Alias.Path, "404", ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else // page not found
|
else // page not found
|
||||||
{
|
{
|
||||||
|
@ -307,7 +317,7 @@
|
||||||
}
|
}
|
||||||
else // not mapped
|
else // not mapped
|
||||||
{
|
{
|
||||||
if (user == null)
|
if (user == null && Utilities.IsPageModuleVisible(page.EffectiveDate, page.ExpiryDate))
|
||||||
{
|
{
|
||||||
// redirect to login page if user not logged in as they may need to be authenticated
|
// redirect to login page if user not logged in as they may need to be authenticated
|
||||||
NavigationManager.NavigateTo(Utilities.NavigateUrl(SiteState.Alias.Path, "login", "?returnurl=" + WebUtility.UrlEncode(route.PathAndQuery)));
|
NavigationManager.NavigateTo(Utilities.NavigateUrl(SiteState.Alias.Path, "login", "?returnurl=" + WebUtility.UrlEncode(route.PathAndQuery)));
|
||||||
|
|
|
@ -75,6 +75,14 @@ namespace Oqtane.Database.MySQL
|
||||||
return dr;
|
return dr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string RewriteName(string name, bool isQuery)
|
||||||
|
{
|
||||||
|
if (name.ToLower() == "rows" && isQuery)
|
||||||
|
{
|
||||||
|
name = $"`{name}`"; // escape reserved word in SQL query
|
||||||
|
}
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
public override DbContextOptionsBuilder UseDatabase(DbContextOptionsBuilder optionsBuilder, string connectionString)
|
public override DbContextOptionsBuilder UseDatabase(DbContextOptionsBuilder optionsBuilder, string connectionString)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Version>5.0.1</Version>
|
<Version>5.0.2</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
<Copyright>.NET Foundation</Copyright>
|
<Copyright>.NET Foundation</Copyright>
|
||||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
||||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</PackageReleaseNotes>
|
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</PackageReleaseNotes>
|
||||||
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
||||||
<RepositoryType>Git</RepositoryType>
|
<RepositoryType>Git</RepositoryType>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
@ -33,8 +33,8 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MySql.EntityFrameworkCore" Version="8.0.0-preview" />
|
<PackageReference Include="MySql.EntityFrameworkCore" Version="8.0.0" />
|
||||||
<PackageReference Include="MySql.Data" Version="8.2.0" />
|
<PackageReference Include="MySql.Data" Version="8.3.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Version>5.0.1</Version>
|
<Version>5.0.2</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
<Copyright>.NET Foundation</Copyright>
|
<Copyright>.NET Foundation</Copyright>
|
||||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
||||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</PackageReleaseNotes>
|
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</PackageReleaseNotes>
|
||||||
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
||||||
<RepositoryType>Git</RepositoryType>
|
<RepositoryType>Git</RepositoryType>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
@ -33,8 +33,8 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="EFCore.NamingConventions" Version="8.0.0-rc.2" />
|
<PackageReference Include="EFCore.NamingConventions" Version="8.0.2" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.1" />
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,11 @@ namespace Oqtane.Database.PostgreSQL
|
||||||
return _rewriter.RewriteName(name);
|
return _rewriter.RewriteName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string RewriteName(string name, bool isQuery)
|
||||||
|
{
|
||||||
|
return _rewriter.RewriteName(name);
|
||||||
|
}
|
||||||
|
|
||||||
public override string RewriteValue(string value, string type)
|
public override string RewriteValue(string value, string type)
|
||||||
{
|
{
|
||||||
if (type == "bool")
|
if (type == "bool")
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Version>5.0.1</Version>
|
<Version>5.0.2</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
<Copyright>.NET Foundation</Copyright>
|
<Copyright>.NET Foundation</Copyright>
|
||||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
||||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</PackageReleaseNotes>
|
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</PackageReleaseNotes>
|
||||||
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
||||||
<RepositoryType>Git</RepositoryType>
|
<RepositoryType>Git</RepositoryType>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Version>5.0.1</Version>
|
<Version>5.0.2</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
<Copyright>.NET Foundation</Copyright>
|
<Copyright>.NET Foundation</Copyright>
|
||||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
||||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</PackageReleaseNotes>
|
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</PackageReleaseNotes>
|
||||||
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
||||||
<RepositoryType>Git</RepositoryType>
|
<RepositoryType>Git</RepositoryType>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<!-- <TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks> -->
|
<!-- <TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks> -->
|
||||||
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
|
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<Version>5.0.1</Version>
|
<Version>5.0.2</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
<Copyright>.NET Foundation</Copyright>
|
<Copyright>.NET Foundation</Copyright>
|
||||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
||||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</PackageReleaseNotes>
|
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</PackageReleaseNotes>
|
||||||
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
||||||
<RepositoryType>Git</RepositoryType>
|
<RepositoryType>Git</RepositoryType>
|
||||||
<RootNamespace>Oqtane.Maui</RootNamespace>
|
<RootNamespace>Oqtane.Maui</RootNamespace>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
<ApplicationIdGuid>0E29FC31-1B83-48ED-B6E0-9F3C67B775D4</ApplicationIdGuid>
|
<ApplicationIdGuid>0E29FC31-1B83-48ED-B6E0-9F3C67B775D4</ApplicationIdGuid>
|
||||||
|
|
||||||
<!-- Versions -->
|
<!-- Versions -->
|
||||||
<ApplicationDisplayVersion>5.0.1</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>5.0.2</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>1</ApplicationVersion>
|
<ApplicationVersion>1</ApplicationVersion>
|
||||||
|
|
||||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
|
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
|
||||||
|
@ -65,11 +65,11 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Localization" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Localization" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.1" />
|
||||||
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
|
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.3" />
|
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.3" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.3" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.3" />
|
||||||
|
|
|
@ -213,3 +213,18 @@ app {
|
||||||
right: 0.75rem;
|
right: 0.75rem;
|
||||||
top: 0.5rem;
|
top: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Oqtane Control Styles */
|
||||||
|
|
||||||
|
/* Pager */
|
||||||
|
.app-pager-pointer {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-sort-th {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-fas {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
|
@ -27,14 +27,8 @@ Oqtane.Interop = {
|
||||||
document.title = title;
|
document.title = title;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
includeMeta: function (id, attribute, name, content, key) {
|
includeMeta: function (id, attribute, name, content) {
|
||||||
var meta;
|
var meta = document.querySelector("meta[" + attribute + "=\"" + CSS.escape(name) + "\"]");
|
||||||
if (id !== "" && key === "id") {
|
|
||||||
meta = document.getElementById(id);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
meta = document.querySelector("meta[" + attribute + "=\"" + CSS.escape(name) + "\"]");
|
|
||||||
}
|
|
||||||
if (meta === null) {
|
if (meta === null) {
|
||||||
meta = document.createElement("meta");
|
meta = document.createElement("meta");
|
||||||
meta.setAttribute(attribute, name);
|
meta.setAttribute(attribute, name);
|
||||||
|
@ -119,13 +113,26 @@ Oqtane.Interop = {
|
||||||
this.includeLink(links[i].id, links[i].rel, links[i].href, links[i].type, links[i].integrity, links[i].crossorigin, links[i].insertbefore);
|
this.includeLink(links[i].id, links[i].rel, links[i].href, links[i].type, links[i].integrity, links[i].crossorigin, links[i].insertbefore);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
includeScript: function (id, src, integrity, crossorigin, content, location) {
|
includeScript: function (id, src, integrity, crossorigin, type, content, location) {
|
||||||
var script = document.querySelector("script[src=\"" + CSS.escape(src) + "\"]");
|
var script;
|
||||||
|
if (src !== "") {
|
||||||
|
script = document.querySelector("script[src=\"" + CSS.escape(src) + "\"]");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
script = document.getElementById(id);
|
||||||
|
}
|
||||||
|
if (script !== null) {
|
||||||
|
script.remove();
|
||||||
|
script = null;
|
||||||
|
}
|
||||||
if (script === null) {
|
if (script === null) {
|
||||||
script = document.createElement("script");
|
script = document.createElement("script");
|
||||||
if (id !== "") {
|
if (id !== "") {
|
||||||
script.id = id;
|
script.id = id;
|
||||||
}
|
}
|
||||||
|
if (type !== "") {
|
||||||
|
script.type = type;
|
||||||
|
}
|
||||||
if (src !== "") {
|
if (src !== "") {
|
||||||
script.src = src;
|
script.src = src;
|
||||||
if (integrity !== "") {
|
if (integrity !== "") {
|
||||||
|
@ -141,42 +148,21 @@ Oqtane.Interop = {
|
||||||
script.async = false;
|
script.async = false;
|
||||||
this.addScript(script, location)
|
this.addScript(script, location)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
if (src !== "") {
|
||||||
console.log(src + ' loaded');
|
console.log(src + ' loaded');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log(id + ' loaded');
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
console.error(src + ' failed');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (script.id !== id) {
|
|
||||||
script.setAttribute('id', id);
|
|
||||||
}
|
|
||||||
if (src !== "") {
|
if (src !== "") {
|
||||||
if (script.src !== this.getAbsoluteUrl(src)) {
|
console.error(src + ' failed');
|
||||||
script.removeAttribute('integrity');
|
|
||||||
script.removeAttribute('crossorigin');
|
|
||||||
script.src = src;
|
|
||||||
}
|
|
||||||
if (integrity !== "") {
|
|
||||||
if (script.integrity !== integrity) {
|
|
||||||
script.setAttribute('integrity', integrity);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
script.removeAttribute('integrity');
|
|
||||||
}
|
|
||||||
if (crossorigin !== "") {
|
|
||||||
if (script.crossOrigin !== crossorigin) {
|
|
||||||
script.setAttribute('crossorigin', crossorigin);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
script.removeAttribute('crossorigin');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (script.innerHTML !== content) {
|
console.error(id + ' failed');
|
||||||
script.innerHTML = content;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addScript: function (script, location) {
|
addScript: function (script, location) {
|
||||||
|
@ -229,6 +215,10 @@ Oqtane.Interop = {
|
||||||
if (path === scripts[s].href && scripts[s].es6module === true) {
|
if (path === scripts[s].href && scripts[s].es6module === true) {
|
||||||
element.type = "module";
|
element.type = "module";
|
||||||
}
|
}
|
||||||
|
if (path === scripts[s].href && scripts[s].location === 'body') {
|
||||||
|
document.body.appendChild(element);
|
||||||
|
return false; // return false to bypass default DOM insertion mechanism
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -289,19 +279,21 @@ Oqtane.Interop = {
|
||||||
var fileinput = document.getElementById(id);
|
var fileinput = document.getElementById(id);
|
||||||
if (fileinput !== null) {
|
if (fileinput !== null) {
|
||||||
for (var i = 0; i < fileinput.files.length; i++) {
|
for (var i = 0; i < fileinput.files.length; i++) {
|
||||||
files.push(fileinput.files[i].name);
|
files.push(fileinput.files[i].name + ":" + fileinput.files[i].size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return files;
|
return files;
|
||||||
},
|
},
|
||||||
uploadFiles: function (posturl, folder, id, antiforgerytoken) {
|
uploadFiles: function (posturl, folder, id, antiforgerytoken, jwt) {
|
||||||
var fileinput = document.getElementById(id + 'FileInput');
|
var fileinput = document.getElementById('FileInput_' + id);
|
||||||
var files = fileinput.files;
|
var files = fileinput.files;
|
||||||
var progressinfo = document.getElementById(id + 'ProgressInfo');
|
var progressinfo = document.getElementById('ProgressInfo_' + id);
|
||||||
var progressbar = document.getElementById(id + 'ProgressBar');
|
var progressbar = document.getElementById('ProgressBar_' + id);
|
||||||
|
|
||||||
|
if (progressinfo !== null && progressbar !== null) {
|
||||||
progressinfo.setAttribute("style", "display: inline;");
|
progressinfo.setAttribute("style", "display: inline;");
|
||||||
progressbar.setAttribute("style", "width: 200px; display: inline;");
|
progressbar.setAttribute("style", "width: 100%; display: inline;");
|
||||||
|
}
|
||||||
|
|
||||||
for (var i = 0; i < files.length; i++) {
|
for (var i = 0; i < files.length; i++) {
|
||||||
var FileChunk = [];
|
var FileChunk = [];
|
||||||
|
@ -331,22 +323,34 @@ Oqtane.Interop = {
|
||||||
data.append('formfile', Chunk, FileName);
|
data.append('formfile', Chunk, FileName);
|
||||||
var request = new XMLHttpRequest();
|
var request = new XMLHttpRequest();
|
||||||
request.open('POST', posturl, true);
|
request.open('POST', posturl, true);
|
||||||
|
if (jwt !== "") {
|
||||||
|
request.setRequestHeader('Authorization', 'Bearer ' + jwt);
|
||||||
|
request.withCredentials = true;
|
||||||
|
}
|
||||||
request.upload.onloadstart = function (e) {
|
request.upload.onloadstart = function (e) {
|
||||||
|
if (progressinfo !== null && progressbar !== null) {
|
||||||
progressinfo.innerHTML = file.name + ' 0%';
|
progressinfo.innerHTML = file.name + ' 0%';
|
||||||
progressbar.value = 0;
|
progressbar.value = 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
request.upload.onprogress = function (e) {
|
request.upload.onprogress = function (e) {
|
||||||
|
if (progressinfo !== null && progressbar !== null) {
|
||||||
var percent = Math.ceil((e.loaded / e.total) * 100);
|
var percent = Math.ceil((e.loaded / e.total) * 100);
|
||||||
progressinfo.innerHTML = file.name + '[' + PartCount + '] ' + percent + '%';
|
progressinfo.innerHTML = file.name + '[' + PartCount + '] ' + percent + '%';
|
||||||
progressbar.value = (percent / 100);
|
progressbar.value = (percent / 100);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
request.upload.onloadend = function (e) {
|
request.upload.onloadend = function (e) {
|
||||||
|
if (progressinfo !== null && progressbar !== null) {
|
||||||
progressinfo.innerHTML = file.name + ' 100%';
|
progressinfo.innerHTML = file.name + ' 100%';
|
||||||
progressbar.value = 1;
|
progressbar.value = 1;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
request.upload.onerror = function () {
|
request.upload.onerror = function() {
|
||||||
progressinfo.innerHTML = file.name + ' Error: ' + xhr.status;
|
if (progressinfo !== null && progressbar !== null) {
|
||||||
|
progressinfo.innerHTML = file.name + ' Error: ' + request.statusText;
|
||||||
progressbar.value = 0;
|
progressbar.value = 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
request.send(data);
|
request.send(data);
|
||||||
}
|
}
|
||||||
|
@ -356,10 +360,15 @@ Oqtane.Interop = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
refreshBrowser: function (reload, wait) {
|
refreshBrowser: function (verify, wait) {
|
||||||
setInterval(function () {
|
async function attemptReload (verify) {
|
||||||
window.location.reload(reload);
|
if (verify) {
|
||||||
}, wait * 1000);
|
await fetch('');
|
||||||
|
}
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
attemptReload(verify);
|
||||||
|
setInterval(attemptReload, wait * 1000);
|
||||||
},
|
},
|
||||||
redirectBrowser: function (url, wait) {
|
redirectBrowser: function (url, wait) {
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>Oqtane.Client</id>
|
<id>Oqtane.Client</id>
|
||||||
<version>5.0.1</version>
|
<version>5.0.2</version>
|
||||||
<authors>Shaun Walker</authors>
|
<authors>Shaun Walker</authors>
|
||||||
<owners>.NET Foundation</owners>
|
<owners>.NET Foundation</owners>
|
||||||
<title>Oqtane Framework</title>
|
<title>Oqtane Framework</title>
|
||||||
|
@ -12,14 +12,13 @@
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<license type="expression">MIT</license>
|
<license type="expression">MIT</license>
|
||||||
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
||||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</releaseNotes>
|
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</releaseNotes>
|
||||||
<icon>icon.png</icon>
|
<icon>icon.png</icon>
|
||||||
<tags>oqtane</tags>
|
<tags>oqtane</tags>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
<file src="..\Oqtane.Client\bin\Release\net8.0\Oqtane.Client.dll" target="lib\net8.0" />
|
<file src="..\Oqtane.Client\bin\Release\net8.0\Oqtane.Client.dll" target="lib\net8.0" />
|
||||||
<file src="..\Oqtane.Client\bin\Release\net8.0\Oqtane.Client.pdb" target="lib\net8.0" />
|
<file src="..\Oqtane.Client\bin\Release\net8.0\Oqtane.Client.pdb" target="lib\net8.0" />
|
||||||
<file src="..\Oqtane.Server\bin\Release\net8.0\Oqtane.Licensing.Client.Oqtane.dll" target="lib\net8.0" />
|
|
||||||
<file src="icon.png" target="" />
|
<file src="icon.png" target="" />
|
||||||
</files>
|
</files>
|
||||||
</package>
|
</package>
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>Oqtane.Framework</id>
|
<id>Oqtane.Framework</id>
|
||||||
<version>5.0.1</version>
|
<version>5.0.2</version>
|
||||||
<authors>Shaun Walker</authors>
|
<authors>Shaun Walker</authors>
|
||||||
<owners>.NET Foundation</owners>
|
<owners>.NET Foundation</owners>
|
||||||
<title>Oqtane Framework</title>
|
<title>Oqtane Framework</title>
|
||||||
|
@ -11,8 +11,8 @@
|
||||||
<copyright>.NET Foundation</copyright>
|
<copyright>.NET Foundation</copyright>
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<license type="expression">MIT</license>
|
<license type="expression">MIT</license>
|
||||||
<projectUrl>https://github.com/oqtane/oqtane.framework/releases/download/v5.0.1/Oqtane.Framework.5.0.1.Upgrade.zip</projectUrl>
|
<projectUrl>https://github.com/oqtane/oqtane.framework/releases/download/v5.0.2/Oqtane.Framework.5.0.2.Upgrade.zip</projectUrl>
|
||||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</releaseNotes>
|
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</releaseNotes>
|
||||||
<icon>icon.png</icon>
|
<icon>icon.png</icon>
|
||||||
<tags>oqtane framework</tags>
|
<tags>oqtane framework</tags>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>Oqtane.Server</id>
|
<id>Oqtane.Server</id>
|
||||||
<version>5.0.1</version>
|
<version>5.0.2</version>
|
||||||
<authors>Shaun Walker</authors>
|
<authors>Shaun Walker</authors>
|
||||||
<owners>.NET Foundation</owners>
|
<owners>.NET Foundation</owners>
|
||||||
<title>Oqtane Framework</title>
|
<title>Oqtane Framework</title>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<license type="expression">MIT</license>
|
<license type="expression">MIT</license>
|
||||||
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
||||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</releaseNotes>
|
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</releaseNotes>
|
||||||
<icon>icon.png</icon>
|
<icon>icon.png</icon>
|
||||||
<tags>oqtane</tags>
|
<tags>oqtane</tags>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>Oqtane.Shared</id>
|
<id>Oqtane.Shared</id>
|
||||||
<version>5.0.1</version>
|
<version>5.0.2</version>
|
||||||
<authors>Shaun Walker</authors>
|
<authors>Shaun Walker</authors>
|
||||||
<owners>.NET Foundation</owners>
|
<owners>.NET Foundation</owners>
|
||||||
<title>Oqtane Framework</title>
|
<title>Oqtane Framework</title>
|
||||||
|
@ -12,14 +12,13 @@
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<license type="expression">MIT</license>
|
<license type="expression">MIT</license>
|
||||||
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
||||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</releaseNotes>
|
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</releaseNotes>
|
||||||
<icon>icon.png</icon>
|
<icon>icon.png</icon>
|
||||||
<tags>oqtane</tags>
|
<tags>oqtane</tags>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
<file src="..\Oqtane.Shared\bin\Release\net8.0\Oqtane.Shared.dll" target="lib\net8.0" />
|
<file src="..\Oqtane.Shared\bin\Release\net8.0\Oqtane.Shared.dll" target="lib\net8.0" />
|
||||||
<file src="..\Oqtane.Shared\bin\Release\net8.0\Oqtane.Shared.pdb" target="lib\net8.0" />
|
<file src="..\Oqtane.Shared\bin\Release\net8.0\Oqtane.Shared.pdb" target="lib\net8.0" />
|
||||||
<file src="..\Oqtane.Server\bin\Release\net8.0\Oqtane.Licensing.Shared.Oqtane.dll" target="lib\net8.0" />
|
|
||||||
<file src="icon.png" target="" />
|
<file src="icon.png" target="" />
|
||||||
</files>
|
</files>
|
||||||
</package>
|
</package>
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>Oqtane.Updater</id>
|
<id>Oqtane.Updater</id>
|
||||||
<version>5.0.1</version>
|
<version>5.0.2</version>
|
||||||
<authors>Shaun Walker</authors>
|
<authors>Shaun Walker</authors>
|
||||||
<owners>.NET Foundation</owners>
|
<owners>.NET Foundation</owners>
|
||||||
<title>Oqtane Framework</title>
|
<title>Oqtane Framework</title>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<license type="expression">MIT</license>
|
<license type="expression">MIT</license>
|
||||||
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
<projectUrl>https://github.com/oqtane/oqtane.framework</projectUrl>
|
||||||
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</releaseNotes>
|
<releaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</releaseNotes>
|
||||||
<icon>icon.png</icon>
|
<icon>icon.png</icon>
|
||||||
<tags>oqtane</tags>
|
<tags>oqtane</tags>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Compress-Archive -Path "..\Oqtane.Server\bin\Release\net8.0\publish\*" -DestinationPath "Oqtane.Framework.5.0.1.Install.zip" -Force
|
Compress-Archive -Path "..\Oqtane.Server\bin\Release\net8.0\publish\*" -DestinationPath "Oqtane.Framework.5.0.2.Install.zip" -Force
|
|
@ -1 +1 @@
|
||||||
Compress-Archive -Path "..\Oqtane.Server\bin\Release\net8.0\publish\*" -DestinationPath "Oqtane.Framework.5.0.1.Upgrade.zip" -Force
|
Compress-Archive -Path "..\Oqtane.Server\bin\Release\net8.0\publish\*" -DestinationPath "Oqtane.Framework.5.0.2.Upgrade.zip" -Force
|
|
@ -20,6 +20,7 @@ using SixLabors.ImageSharp;
|
||||||
using SixLabors.ImageSharp.Processing;
|
using SixLabors.ImageSharp.Processing;
|
||||||
using SixLabors.ImageSharp.Formats.Png;
|
using SixLabors.ImageSharp.Formats.Png;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using Microsoft.AspNetCore.Cors;
|
||||||
|
|
||||||
// ReSharper disable StringIndexOfIsCultureSpecific.1
|
// ReSharper disable StringIndexOfIsCultureSpecific.1
|
||||||
|
|
||||||
|
@ -288,7 +289,8 @@ namespace Oqtane.Controllers
|
||||||
folder = _folders.GetFolder(FolderId);
|
folder = _folders.GetFolder(FolderId);
|
||||||
}
|
}
|
||||||
|
|
||||||
var _UploadableFiles = (_settingRepository.GetSetting(EntityNames.Site, _alias.SiteId, "UploadableFiles")?.SettingValue ?? Constants.UploadableFiles) ?? Constants.UploadableFiles;
|
var _UploadableFiles = _settingRepository.GetSetting(EntityNames.Site, _alias.SiteId, "UploadableFiles")?.SettingValue;
|
||||||
|
_UploadableFiles = (string.IsNullOrEmpty(_UploadableFiles)) ? Constants.UploadableFiles : _UploadableFiles;
|
||||||
|
|
||||||
if (folder != null && folder.SiteId == _alias.SiteId && _userPermissions.IsAuthorized(User, PermissionNames.Edit, folder.PermissionList))
|
if (folder != null && folder.SiteId == _alias.SiteId && _userPermissions.IsAuthorized(User, PermissionNames.Edit, folder.PermissionList))
|
||||||
{
|
{
|
||||||
|
@ -357,17 +359,18 @@ namespace Oqtane.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST api/<controller>/upload
|
// POST api/<controller>/upload
|
||||||
|
[EnableCors(Constants.MauiCorsPolicy)]
|
||||||
[HttpPost("upload")]
|
[HttpPost("upload")]
|
||||||
public async Task UploadFile(string folder, IFormFile formfile)
|
public async Task UploadFile(string folder, IFormFile formfile)
|
||||||
{
|
{
|
||||||
if (formfile.Length <= 0)
|
if (formfile == null || formfile.Length <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the UploadableFiles extensions
|
// Get the UploadableFiles extensions
|
||||||
string uploadfilesSetting = _settingRepository.GetSetting(EntityNames.Site, _alias.SiteId, "UploadableFiles")?.SettingValue;
|
string _UploadableFiles = _settingRepository.GetSetting(EntityNames.Site, _alias.SiteId, "UploadableFiles")?.SettingValue;
|
||||||
string _UploadableFiles = uploadfilesSetting ?? Constants.UploadableFiles;
|
_UploadableFiles = (string.IsNullOrEmpty(_UploadableFiles)) ? Constants.UploadableFiles : _UploadableFiles;
|
||||||
|
|
||||||
// ensure filename is valid
|
// ensure filename is valid
|
||||||
string token = ".part_";
|
string token = ".part_";
|
||||||
|
@ -612,7 +615,9 @@ namespace Oqtane.Controllers
|
||||||
{
|
{
|
||||||
var file = _files.GetFile(id);
|
var file = _files.GetFile(id);
|
||||||
|
|
||||||
var _ImageFiles = (_settingRepository.GetSetting(EntityNames.Site, _alias.SiteId, "ImageFiles")?.SettingValue ?? Constants.ImageFiles) ?? Constants.ImageFiles;
|
var _ImageFiles = _settingRepository.GetSetting(EntityNames.Site, _alias.SiteId, "ImageFiles")?.SettingValue;
|
||||||
|
_ImageFiles = (string.IsNullOrEmpty(_ImageFiles)) ? Constants.ImageFiles : _ImageFiles;
|
||||||
|
|
||||||
if (file != null && file.Folder.SiteId == _alias.SiteId && _userPermissions.IsAuthorized(User, PermissionNames.View, file.Folder.PermissionList))
|
if (file != null && file.Folder.SiteId == _alias.SiteId && _userPermissions.IsAuthorized(User, PermissionNames.View, file.Folder.PermissionList))
|
||||||
{
|
{
|
||||||
if (_ImageFiles.Split(',').Contains(file.Extension.ToLower()))
|
if (_ImageFiles.Split(',').Contains(file.Extension.ToLower()))
|
||||||
|
@ -779,7 +784,9 @@ namespace Oqtane.Controllers
|
||||||
private Models.File CreateFile(string filename, int folderid, string filepath)
|
private Models.File CreateFile(string filename, int folderid, string filepath)
|
||||||
{
|
{
|
||||||
var file = _files.GetFile(folderid, filename);
|
var file = _files.GetFile(folderid, filename);
|
||||||
var _ImageFiles = (_settingRepository.GetSetting(EntityNames.Site, _alias.SiteId, "ImageFiles")?.SettingValue ?? Constants.ImageFiles) ?? Constants.ImageFiles;
|
|
||||||
|
var _ImageFiles = _settingRepository.GetSetting(EntityNames.Site, _alias.SiteId, "ImageFiles")?.SettingValue;
|
||||||
|
_ImageFiles = (string.IsNullOrEmpty(_ImageFiles)) ? Constants.ImageFiles : _ImageFiles;
|
||||||
|
|
||||||
int size = 0;
|
int size = 0;
|
||||||
var folder = _folders.GetFolder(folderid, false);
|
var folder = _folders.GetFolder(folderid, false);
|
||||||
|
|
|
@ -75,6 +75,8 @@ namespace Oqtane.Controllers
|
||||||
module.Pane = pagemodule.Pane;
|
module.Pane = pagemodule.Pane;
|
||||||
module.Order = pagemodule.Order;
|
module.Order = pagemodule.Order;
|
||||||
module.ContainerType = pagemodule.ContainerType;
|
module.ContainerType = pagemodule.ContainerType;
|
||||||
|
module.EffectiveDate = pagemodule.EffectiveDate;
|
||||||
|
module.ExpiryDate = pagemodule.ExpiryDate;
|
||||||
|
|
||||||
module.ModuleDefinition = _moduleDefinitions.FilterModuleDefinition(moduledefinitions.Find(item => item.ModuleDefinitionName == module.ModuleDefinitionName));
|
module.ModuleDefinition = _moduleDefinitions.FilterModuleDefinition(moduledefinitions.Find(item => item.ModuleDefinitionName == module.ModuleDefinitionName));
|
||||||
|
|
||||||
|
@ -169,7 +171,7 @@ namespace Oqtane.Controllers
|
||||||
{
|
{
|
||||||
if (!pageModules.Exists(item => item.ModuleId == module.ModuleId && item.PageId == page.PageId) && !page.Path.StartsWith("admin/"))
|
if (!pageModules.Exists(item => item.ModuleId == module.ModuleId && item.PageId == page.PageId) && !page.Path.StartsWith("admin/"))
|
||||||
{
|
{
|
||||||
_pageModules.AddPageModule(new PageModule { PageId = page.PageId, ModuleId = pageModule.ModuleId, Title = pageModule.Title, Pane = pageModule.Pane, Order = pageModule.Order, ContainerType = pageModule.ContainerType });
|
_pageModules.AddPageModule(new PageModule { PageId = page.PageId, ModuleId = pageModule.ModuleId, Title = pageModule.Title, Pane = pageModule.Pane, Order = pageModule.Order, ContainerType = pageModule.ContainerType, EffectiveDate = pageModule.EffectiveDate, ExpiryDate = pageModule.ExpiryDate });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,8 @@ using System.Globalization;
|
||||||
using Microsoft.Extensions.Caching.Memory;
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
using Oqtane.Extensions;
|
using Oqtane.Extensions;
|
||||||
using System;
|
using System;
|
||||||
|
using Oqtane.UI;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||||
|
|
||||||
namespace Oqtane.Controllers
|
namespace Oqtane.Controllers
|
||||||
{
|
{
|
||||||
|
@ -97,7 +99,7 @@ namespace Oqtane.Controllers
|
||||||
site.Pages = new List<Page>();
|
site.Pages = new List<Page>();
|
||||||
foreach (Page page in _pages.GetPages(site.SiteId))
|
foreach (Page page in _pages.GetPages(site.SiteId))
|
||||||
{
|
{
|
||||||
if (!page.IsDeleted && _userPermissions.IsAuthorized(User, PermissionNames.View, page.PermissionList))
|
if (!page.IsDeleted && _userPermissions.IsAuthorized(User, PermissionNames.View, page.PermissionList) && (Utilities.IsPageModuleVisible(page.EffectiveDate, page.ExpiryDate) || _userPermissions.IsAuthorized(User, PermissionNames.Edit, page.PermissionList)))
|
||||||
{
|
{
|
||||||
page.Settings = settings.Where(item => item.EntityId == page.PageId)
|
page.Settings = settings.Where(item => item.EntityId == page.PageId)
|
||||||
.Where(item => !item.IsPrivate || _userPermissions.IsAuthorized(User, PermissionNames.Edit, page.PermissionList))
|
.Where(item => !item.IsPrivate || _userPermissions.IsAuthorized(User, PermissionNames.Edit, page.PermissionList))
|
||||||
|
@ -105,46 +107,53 @@ namespace Oqtane.Controllers
|
||||||
site.Pages.Add(page);
|
site.Pages.Add(page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
site.Pages = GetPagesHierarchy(site.Pages);
|
site.Pages = GetPagesHierarchy(site.Pages);
|
||||||
|
|
||||||
// modules
|
// modules
|
||||||
List<ModuleDefinition> moduledefinitions = _moduleDefinitions.GetModuleDefinitions(site.SiteId).ToList();
|
List<ModuleDefinition> moduledefinitions = _moduleDefinitions.GetModuleDefinitions(site.SiteId).ToList();
|
||||||
settings = _settings.GetSettings(EntityNames.Module).ToList();
|
settings = _settings.GetSettings(EntityNames.Module).ToList();
|
||||||
site.Modules = new List<Module>();
|
site.Modules = new List<Module>();
|
||||||
foreach (PageModule pagemodule in _pageModules.GetPageModules(site.SiteId))
|
foreach (PageModule pagemodule in _pageModules.GetPageModules(site.SiteId).Where(pm => !pm.IsDeleted && _userPermissions.IsAuthorized(User, PermissionNames.View, pm.Module.PermissionList)))
|
||||||
{
|
{
|
||||||
if (!pagemodule.IsDeleted && _userPermissions.IsAuthorized(User, PermissionNames.View, pagemodule.Module.PermissionList))
|
if(Utilities.IsPageModuleVisible(pagemodule.EffectiveDate, pagemodule.ExpiryDate) || _userPermissions.IsAuthorized(User, PermissionNames.Edit, pagemodule.Module.PermissionList))
|
||||||
{
|
{
|
||||||
Module module = new Module();
|
Module module = new Module
|
||||||
module.SiteId = pagemodule.Module.SiteId;
|
{
|
||||||
module.ModuleDefinitionName = pagemodule.Module.ModuleDefinitionName;
|
SiteId = pagemodule.Module.SiteId,
|
||||||
module.AllPages = pagemodule.Module.AllPages;
|
ModuleDefinitionName = pagemodule.Module.ModuleDefinitionName,
|
||||||
module.PermissionList = pagemodule.Module.PermissionList;
|
AllPages = pagemodule.Module.AllPages,
|
||||||
module.CreatedBy = pagemodule.Module.CreatedBy;
|
PermissionList = pagemodule.Module.PermissionList,
|
||||||
module.CreatedOn = pagemodule.Module.CreatedOn;
|
CreatedBy = pagemodule.Module.CreatedBy,
|
||||||
module.ModifiedBy = pagemodule.Module.ModifiedBy;
|
CreatedOn = pagemodule.Module.CreatedOn,
|
||||||
module.ModifiedOn = pagemodule.Module.ModifiedOn;
|
ModifiedBy = pagemodule.Module.ModifiedBy,
|
||||||
module.DeletedBy = pagemodule.DeletedBy;
|
ModifiedOn = pagemodule.Module.ModifiedOn,
|
||||||
module.DeletedOn = pagemodule.DeletedOn;
|
DeletedBy = pagemodule.DeletedBy,
|
||||||
module.IsDeleted = pagemodule.IsDeleted;
|
DeletedOn = pagemodule.DeletedOn,
|
||||||
|
IsDeleted = pagemodule.IsDeleted,
|
||||||
|
|
||||||
module.PageModuleId = pagemodule.PageModuleId;
|
PageModuleId = pagemodule.PageModuleId,
|
||||||
module.ModuleId = pagemodule.ModuleId;
|
ModuleId = pagemodule.ModuleId,
|
||||||
module.PageId = pagemodule.PageId;
|
PageId = pagemodule.PageId,
|
||||||
module.Title = pagemodule.Title;
|
Title = pagemodule.Title,
|
||||||
module.Pane = pagemodule.Pane;
|
Pane = pagemodule.Pane,
|
||||||
module.Order = pagemodule.Order;
|
Order = pagemodule.Order,
|
||||||
module.ContainerType = pagemodule.ContainerType;
|
ContainerType = pagemodule.ContainerType,
|
||||||
|
EffectiveDate = pagemodule.EffectiveDate,
|
||||||
|
ExpiryDate = pagemodule.ExpiryDate,
|
||||||
|
|
||||||
module.ModuleDefinition = _moduleDefinitions.FilterModuleDefinition(moduledefinitions.Find(item => item.ModuleDefinitionName == module.ModuleDefinitionName));
|
ModuleDefinition = _moduleDefinitions.FilterModuleDefinition(moduledefinitions.Find(item => item.ModuleDefinitionName == pagemodule.Module.ModuleDefinitionName)),
|
||||||
|
|
||||||
module.Settings = settings.Where(item => item.EntityId == pagemodule.ModuleId)
|
Settings = settings
|
||||||
|
.Where(item => item.EntityId == pagemodule.ModuleId)
|
||||||
.Where(item => !item.IsPrivate || _userPermissions.IsAuthorized(User, PermissionNames.Edit, pagemodule.Module.PermissionList))
|
.Where(item => !item.IsPrivate || _userPermissions.IsAuthorized(User, PermissionNames.Edit, pagemodule.Module.PermissionList))
|
||||||
.ToDictionary(setting => setting.SettingName, setting => setting.SettingValue);
|
.ToDictionary(setting => setting.SettingName, setting => setting.SettingValue)
|
||||||
|
};
|
||||||
|
|
||||||
site.Modules.Add(module);
|
site.Modules.Add(module);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
site.Modules = site.Modules.OrderBy(item => item.PageId).ThenBy(item => item.Pane).ThenBy(item => item.Order).ToList();
|
site.Modules = site.Modules.OrderBy(item => item.PageId).ThenBy(item => item.Pane).ThenBy(item => item.Order).ToList();
|
||||||
|
|
||||||
// languages
|
// languages
|
||||||
|
|
|
@ -66,6 +66,11 @@ namespace Oqtane.Databases
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual string RewriteName(string name, bool isQuery)
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
public virtual string RewriteValue(string value, string type)
|
public virtual string RewriteValue(string value, string type)
|
||||||
{
|
{
|
||||||
return value;
|
return value;
|
||||||
|
|
|
@ -28,6 +28,8 @@ namespace Oqtane.Databases.Interfaces
|
||||||
|
|
||||||
public string RewriteName(string name);
|
public string RewriteName(string name);
|
||||||
|
|
||||||
|
public string RewriteName(string name, bool isQuery);
|
||||||
|
|
||||||
public string RewriteValue(string value, string type);
|
public string RewriteValue(string value, string type);
|
||||||
|
|
||||||
public void UpdateIdentityStoreTableNames(ModelBuilder builder);
|
public void UpdateIdentityStoreTableNames(ModelBuilder builder);
|
||||||
|
|
|
@ -205,6 +205,10 @@ namespace Oqtane.Extensions
|
||||||
{
|
{
|
||||||
email = item[emailClaimType].ToString().ToLower();
|
email = item[emailClaimType].ToString().ToLower();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
id = ""; // if email is not valid we will assume id is not valid
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(id))
|
if (!string.IsNullOrEmpty(id))
|
||||||
|
@ -290,6 +294,10 @@ namespace Oqtane.Extensions
|
||||||
{
|
{
|
||||||
email = context.Principal.FindFirstValue(emailClaimType);
|
email = context.Principal.FindFirstValue(emailClaimType);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
id = ""; // if email is not valid we will assume id is not valid
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate user
|
// validate user
|
||||||
|
@ -610,7 +618,9 @@ namespace Oqtane.Extensions
|
||||||
|
|
||||||
private static bool EmailValid(string email, string domainfilter)
|
private static bool EmailValid(string email, string domainfilter)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(email) && email.Contains("@") && email.Contains("."))
|
if (!string.IsNullOrEmpty(email))
|
||||||
|
{
|
||||||
|
if (email.Contains("@") && email.Contains("."))
|
||||||
{
|
{
|
||||||
var domains = domainfilter.ToLower().Split(',', StringSplitOptions.RemoveEmptyEntries);
|
var domains = domainfilter.ToLower().Split(',', StringSplitOptions.RemoveEmptyEntries);
|
||||||
foreach (var domain in domains)
|
foreach (var domain in domains)
|
||||||
|
@ -628,5 +638,7 @@ namespace Oqtane.Extensions
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return (string.IsNullOrEmpty(domainfilter)); // email is optional unless domain filter is specified
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.Loader;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Caching.Memory;
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
|
@ -29,16 +26,14 @@ namespace Oqtane.Infrastructure
|
||||||
{
|
{
|
||||||
private readonly IConfigManager _config;
|
private readonly IConfigManager _config;
|
||||||
private readonly IServiceScopeFactory _serviceScopeFactory;
|
private readonly IServiceScopeFactory _serviceScopeFactory;
|
||||||
private readonly IWebHostEnvironment _environment;
|
|
||||||
private readonly IMemoryCache _cache;
|
private readonly IMemoryCache _cache;
|
||||||
private readonly IConfigManager _configManager;
|
private readonly IConfigManager _configManager;
|
||||||
private readonly ILogger<DatabaseManager> _filelogger;
|
private readonly ILogger<DatabaseManager> _filelogger;
|
||||||
|
|
||||||
public DatabaseManager(IConfigManager config, IServiceScopeFactory serviceScopeFactory, IWebHostEnvironment environment, IMemoryCache cache, IConfigManager configManager, ILogger<DatabaseManager> filelogger)
|
public DatabaseManager(IConfigManager config, IServiceScopeFactory serviceScopeFactory, IMemoryCache cache, IConfigManager configManager, ILogger<DatabaseManager> filelogger)
|
||||||
{
|
{
|
||||||
_config = config;
|
_config = config;
|
||||||
_serviceScopeFactory = serviceScopeFactory;
|
_serviceScopeFactory = serviceScopeFactory;
|
||||||
_environment = environment;
|
|
||||||
_cache = cache;
|
_cache = cache;
|
||||||
_configManager = configManager;
|
_configManager = configManager;
|
||||||
_filelogger = filelogger;
|
_filelogger = filelogger;
|
||||||
|
@ -216,6 +211,8 @@ namespace Oqtane.Infrastructure
|
||||||
// get database type
|
// get database type
|
||||||
var type = Type.GetType(databaseType);
|
var type = Type.GetType(databaseType);
|
||||||
|
|
||||||
|
if (type != null)
|
||||||
|
{
|
||||||
// create database object from type
|
// create database object from type
|
||||||
var database = Activator.CreateInstance(type) as IDatabase;
|
var database = Activator.CreateInstance(type) as IDatabase;
|
||||||
|
|
||||||
|
@ -231,6 +228,12 @@ namespace Oqtane.Infrastructure
|
||||||
result.Success = true;
|
result.Success = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.Message = $"The Database Provider {databaseType} Does Not Exist. If This Is A Development Environment Please Ensure You Have Performed A Full Compilation Of All Projects In The Oqtane Solution Prior To Running The Application.";
|
||||||
|
_filelogger.LogError(Utilities.LogMessage(this, result.Message));
|
||||||
|
}
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
result.Message = "An Error Occurred Creating The Database. This Is Usually Related To Your User Not Having Sufficient Rights To Perform This Operation. Please Note That You Can Also Create The Database Manually Prior To Initiating The Install Wizard. " + ex.ToString();
|
result.Message = "An Error Occurred Creating The Database. This Is Usually Related To Your User Not Having Sufficient Rights To Perform This Operation. Please Note That You Can Also Create The Database Manually Prior To Initiating The Install Wizard. " + ex.ToString();
|
||||||
|
|
|
@ -136,6 +136,9 @@ namespace Oqtane.Infrastructure
|
||||||
|
|
||||||
// register assembly
|
// register assembly
|
||||||
if (Path.GetExtension(filename) == ".dll")
|
if (Path.GetExtension(filename) == ".dll")
|
||||||
|
{
|
||||||
|
// do not register licensing assemblies
|
||||||
|
if (!Path.GetFileName(filename).StartsWith("Oqtane.Licensing."))
|
||||||
{
|
{
|
||||||
// if package version was not installed previously
|
// if package version was not installed previously
|
||||||
if (!File.Exists(Path.Combine(sourceFolder, name + ".log")))
|
if (!File.Exists(Path.Combine(sourceFolder, name + ".log")))
|
||||||
|
@ -152,6 +155,7 @@ namespace Oqtane.Infrastructure
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// save dynamic list of assets
|
// save dynamic list of assets
|
||||||
if (!manifest && assets.Count != 0)
|
if (!manifest && assets.Count != 0)
|
||||||
|
@ -254,6 +258,9 @@ namespace Oqtane.Infrastructure
|
||||||
|
|
||||||
// delete assets
|
// delete assets
|
||||||
if (Path.GetExtension(filepath) == ".dll")
|
if (Path.GetExtension(filepath) == ".dll")
|
||||||
|
{
|
||||||
|
// do not remove licensing assemblies
|
||||||
|
if (!Path.GetFileName(filepath).StartsWith("Oqtane.Licensing."))
|
||||||
{
|
{
|
||||||
// use assembly log to determine if assembly is used in other packages
|
// use assembly log to determine if assembly is used in other packages
|
||||||
if (assemblies.ContainsKey(Path.GetFileName(filepath)))
|
if (assemblies.ContainsKey(Path.GetFileName(filepath)))
|
||||||
|
@ -273,6 +280,7 @@ namespace Oqtane.Infrastructure
|
||||||
DeleteFile(filepath);
|
DeleteFile(filepath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else // not an assembly
|
else // not an assembly
|
||||||
{
|
{
|
||||||
DeleteFile(filepath);
|
DeleteFile(filepath);
|
||||||
|
|
|
@ -68,7 +68,7 @@ namespace Oqtane.SiteTemplates
|
||||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||||
new Permission(PermissionNames.Edit, RoleNames.Admin, true)
|
new Permission(PermissionNames.Edit, RoleNames.Admin, true)
|
||||||
},
|
},
|
||||||
Content = "<p>Copyright (c) 2018-2023 .NET Foundation</p>" +
|
Content = "<p>Copyright (c) 2018-2024 .NET Foundation</p>" +
|
||||||
"<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>" +
|
"<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>" +
|
||||||
"<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>" +
|
"<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>" +
|
||||||
"<p>THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>"
|
"<p>THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>"
|
||||||
|
|
|
@ -50,6 +50,11 @@ namespace Oqtane.Migrations.EntityBuilders
|
||||||
return ActiveDatabase.RewriteName(name);
|
return ActiveDatabase.RewriteName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string RewriteName(string name, bool isQuery)
|
||||||
|
{
|
||||||
|
return ActiveDatabase.RewriteName(name, isQuery);
|
||||||
|
}
|
||||||
|
|
||||||
private string RewriteValue(string value, string type)
|
private string RewriteValue(string value, string type)
|
||||||
{
|
{
|
||||||
return ActiveDatabase.RewriteValue(value, type);
|
return ActiveDatabase.RewriteValue(value, type);
|
||||||
|
@ -394,7 +399,7 @@ namespace Oqtane.Migrations.EntityBuilders
|
||||||
|
|
||||||
public void UpdateColumn(string columnName, string value, string type, string condition)
|
public void UpdateColumn(string columnName, string value, string type, string condition)
|
||||||
{
|
{
|
||||||
var updateSql = $"UPDATE {RewriteSqlEntityTableName(EntityTableName)} SET {RewriteName(columnName)} = {RewriteValue(value, type)} ";
|
var updateSql = $"UPDATE {RewriteSqlEntityTableName(EntityTableName)} SET {RewriteName(columnName, true)} = {RewriteValue(value, type)} ";
|
||||||
if (!string.IsNullOrEmpty(condition))
|
if (!string.IsNullOrEmpty(condition))
|
||||||
{
|
{
|
||||||
updateSql += $"WHERE {condition}";
|
updateSql += $"WHERE {condition}";
|
||||||
|
|
|
@ -14,7 +14,12 @@ namespace Oqtane.Migrations
|
||||||
|
|
||||||
protected string RewriteName(string name)
|
protected string RewriteName(string name)
|
||||||
{
|
{
|
||||||
return ActiveDatabase.RewriteName(name);
|
return ActiveDatabase.RewriteName(name, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected string RewriteName(string name, bool isQuery)
|
||||||
|
{
|
||||||
|
return ActiveDatabase.RewriteName(name, isQuery);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Oqtane.Databases.Interfaces;
|
||||||
|
using Oqtane.Migrations.EntityBuilders;
|
||||||
|
using Oqtane.Repository;
|
||||||
|
|
||||||
|
namespace Oqtane.Migrations.Tenant
|
||||||
|
{
|
||||||
|
[DbContext(typeof(TenantDBContext))]
|
||||||
|
[Migration("Tenant.05.01.00.01")]
|
||||||
|
public class AddPageEffectiveExpiryDate : MultiDatabaseMigration
|
||||||
|
{
|
||||||
|
public AddPageEffectiveExpiryDate(IDatabase database) : base(database)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
var pageEntityBuilder = new PageEntityBuilder(migrationBuilder, ActiveDatabase);;
|
||||||
|
pageEntityBuilder.AddDateTimeColumn("EffectiveDate", true);
|
||||||
|
pageEntityBuilder.AddDateTimeColumn("ExpiryDate", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
var pageEntityBuilder = new PageEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||||
|
pageEntityBuilder.DropColumn("EffectiveDate");
|
||||||
|
pageEntityBuilder.DropColumn("ExpiryDate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Oqtane.Databases.Interfaces;
|
||||||
|
using Oqtane.Migrations.EntityBuilders;
|
||||||
|
using Oqtane.Repository;
|
||||||
|
|
||||||
|
namespace Oqtane.Migrations.Tenant
|
||||||
|
{
|
||||||
|
[DbContext(typeof(TenantDBContext))]
|
||||||
|
[Migration("Tenant.05.01.00.02")]
|
||||||
|
public class AddPageModuleEffectiveExpiryDate : MultiDatabaseMigration
|
||||||
|
{
|
||||||
|
public AddPageModuleEffectiveExpiryDate(IDatabase database) : base(database)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
var pageModuleEntityBuilder = new PageModuleEntityBuilder(migrationBuilder, ActiveDatabase);;
|
||||||
|
pageModuleEntityBuilder.AddDateTimeColumn("EffectiveDate", true);
|
||||||
|
pageModuleEntityBuilder.AddDateTimeColumn("ExpiryDate", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
var pageModuleEntityBuilder = new PageModuleEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||||
|
pageModuleEntityBuilder.DropColumn("EffectiveDate");
|
||||||
|
pageModuleEntityBuilder.DropColumn("ExpiryDate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Oqtane.Databases.Interfaces;
|
||||||
|
using Oqtane.Migrations.EntityBuilders;
|
||||||
|
using Oqtane.Repository;
|
||||||
|
|
||||||
|
namespace Oqtane.Migrations.Tenant
|
||||||
|
{
|
||||||
|
[DbContext(typeof(TenantDBContext))]
|
||||||
|
[Migration("Tenant.05.01.00.03")]
|
||||||
|
public class AddProfileAutocomplete : MultiDatabaseMigration
|
||||||
|
{
|
||||||
|
public AddProfileAutocomplete(IDatabase database) : base(database)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
var profileEntityBuilder = new ProfileEntityBuilder(migrationBuilder, ActiveDatabase);
|
||||||
|
profileEntityBuilder.AddStringColumn("Autocomplete", 50, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
// not implemented
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<Version>5.0.1</Version>
|
<Version>5.0.2</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
<Copyright>.NET Foundation</Copyright>
|
<Copyright>.NET Foundation</Copyright>
|
||||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
||||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</PackageReleaseNotes>
|
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</PackageReleaseNotes>
|
||||||
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
||||||
<RepositoryType>Git</RepositoryType>
|
<RepositoryType>Git</RepositoryType>
|
||||||
<RootNamespace>Oqtane</RootNamespace>
|
<RootNamespace>Oqtane</RootNamespace>
|
||||||
|
@ -33,21 +33,20 @@
|
||||||
<EmbeddedResource Include="Scripts\MigrateTenant.sql" />
|
<EmbeddedResource Include="Scripts\MigrateTenant.sql" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0-preview3.23201.1" />
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0-preview4.23342.2" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.1">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.1" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.0" />
|
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.0" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="8.0.1" />
|
||||||
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.7" />
|
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.7" />
|
||||||
<PackageReference Include="Oqtane.Licensing" Version="5.0.0" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Oqtane.Client\Oqtane.Client.csproj" />
|
<ProjectReference Include="..\Oqtane.Client\Oqtane.Client.csproj" />
|
||||||
|
|
|
@ -228,7 +228,7 @@ namespace Oqtane.Repository
|
||||||
// build list of scripts for site
|
// build list of scripts for site
|
||||||
if (moduledefinition.Resources != null)
|
if (moduledefinition.Resources != null)
|
||||||
{
|
{
|
||||||
foreach (var resource in moduledefinition.Resources.Where(item => item.Level == ResourceLevel.Site))
|
foreach (var resource in moduledefinition.Resources.Where(item => item.ResourceType == ResourceType.Script && item.Level == ResourceLevel.Site))
|
||||||
{
|
{
|
||||||
if (!serverState.Scripts.Contains(resource))
|
if (!serverState.Scripts.Contains(resource))
|
||||||
{
|
{
|
||||||
|
|
|
@ -200,7 +200,7 @@ namespace Oqtane.Repository
|
||||||
// build list of scripts for site
|
// build list of scripts for site
|
||||||
if (theme.Resources != null)
|
if (theme.Resources != null)
|
||||||
{
|
{
|
||||||
foreach (var resource in theme.Resources.Where(item => item.Level == ResourceLevel.Site))
|
foreach (var resource in theme.Resources.Where(item => item.ResourceType == ResourceType.Script && item.Level == ResourceLevel.Site))
|
||||||
{
|
{
|
||||||
if (!serverState.Scripts.Contains(resource))
|
if (!serverState.Scripts.Contains(resource))
|
||||||
{
|
{
|
||||||
|
|
|
@ -131,6 +131,16 @@ namespace Oqtane
|
||||||
.WithSiteIdentity()
|
.WithSiteIdentity()
|
||||||
.WithSiteAuthentication();
|
.WithSiteAuthentication();
|
||||||
|
|
||||||
|
services.AddCors(options =>
|
||||||
|
{
|
||||||
|
options.AddPolicy(Constants.MauiCorsPolicy,
|
||||||
|
policy =>
|
||||||
|
{
|
||||||
|
policy.WithOrigins("https://0.0.0.0", "http://0.0.0.0", "app://0.0.0.0")
|
||||||
|
.AllowAnyHeader().AllowCredentials();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
services.AddMvc(options =>
|
services.AddMvc(options =>
|
||||||
{
|
{
|
||||||
options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());
|
options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());
|
||||||
|
@ -180,6 +190,7 @@ namespace Oqtane
|
||||||
app.UseJwtAuthorization();
|
app.UseJwtAuthorization();
|
||||||
app.UseBlazorFrameworkFiles();
|
app.UseBlazorFrameworkFiles();
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
|
app.UseCors();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.1" PrivateAssets="all" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.1" />
|
||||||
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
|
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Localization" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Localization" Version="2.2.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -15,5 +15,12 @@ namespace [Owner].Module.[Module].Repository
|
||||||
{
|
{
|
||||||
// ContextBase handles multi-tenant database connections
|
// ContextBase handles multi-tenant database connections
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnModelCreating(ModelBuilder builder)
|
||||||
|
{
|
||||||
|
base.OnModelCreating(builder);
|
||||||
|
|
||||||
|
builder.Entity<Models.[Module]>().ToTable(ActiveDatabase.RewriteName("[Owner][Module]"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.1" PrivateAssets="all" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.1" />
|
||||||
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
|
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -284,7 +284,7 @@ Oqtane.Interop = {
|
||||||
}
|
}
|
||||||
return files;
|
return files;
|
||||||
},
|
},
|
||||||
uploadFiles: function (posturl, folder, id, antiforgerytoken) {
|
uploadFiles: function (posturl, folder, id, antiforgerytoken, jwt) {
|
||||||
var fileinput = document.getElementById('FileInput_' + id);
|
var fileinput = document.getElementById('FileInput_' + id);
|
||||||
var files = fileinput.files;
|
var files = fileinput.files;
|
||||||
var progressinfo = document.getElementById('ProgressInfo_' + id);
|
var progressinfo = document.getElementById('ProgressInfo_' + id);
|
||||||
|
@ -323,6 +323,10 @@ Oqtane.Interop = {
|
||||||
data.append('formfile', Chunk, FileName);
|
data.append('formfile', Chunk, FileName);
|
||||||
var request = new XMLHttpRequest();
|
var request = new XMLHttpRequest();
|
||||||
request.open('POST', posturl, true);
|
request.open('POST', posturl, true);
|
||||||
|
if (jwt !== "") {
|
||||||
|
request.setRequestHeader('Authorization', 'Bearer ' + jwt);
|
||||||
|
request.withCredentials = true;
|
||||||
|
}
|
||||||
request.upload.onloadstart = function (e) {
|
request.upload.onloadstart = function (e) {
|
||||||
if (progressinfo !== null && progressbar !== null) {
|
if (progressinfo !== null && progressbar !== null) {
|
||||||
progressinfo.innerHTML = file.name + ' 0%';
|
progressinfo.innerHTML = file.name + ' 0%';
|
||||||
|
@ -344,7 +348,7 @@ Oqtane.Interop = {
|
||||||
};
|
};
|
||||||
request.upload.onerror = function() {
|
request.upload.onerror = function() {
|
||||||
if (progressinfo !== null && progressbar !== null) {
|
if (progressinfo !== null && progressbar !== null) {
|
||||||
progressinfo.innerHTML = file.name + ' Error: ' + xhr.status;
|
progressinfo.innerHTML = file.name + ' Error: ' + request.statusText;
|
||||||
progressbar.value = 0;
|
progressbar.value = 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
This folder contains special attributes for the API Code Generator.
|
This folder contains special attributes for the API Code Generator.
|
||||||
|
|
||||||
The idea is that only items marked with special attributes are valide public APIs, and only these will be documented in the public docs
|
The idea is that only items marked with special attributes are valid public APIs, and only these will be documented in the public docs
|
||||||
|
|
||||||
As of 2020, all APIs are documented, and only these marked as `[PrivateApi]` will be excluded. In future, we may reverse this to only document things marked as `[PublicApi]`.
|
As of 2020, all APIs are documented, and only these marked as `[PrivateApi]` will be excluded. In future, we may reverse this to only document things marked as `[PublicApi]`.
|
|
@ -75,6 +75,12 @@ namespace Oqtane.Models
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string ContainerType { get; set; }
|
public string ContainerType { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public DateTime? EffectiveDate { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public DateTime? ExpiryDate { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region SiteRouter properties
|
#region SiteRouter properties
|
||||||
|
@ -85,6 +91,8 @@ namespace Oqtane.Models
|
||||||
public int PaneModuleIndex { get; set; }
|
public int PaneModuleIndex { get; set; }
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public int PaneModuleCount { get; set; }
|
public int PaneModuleCount { get; set; }
|
||||||
|
[NotMapped]
|
||||||
|
public Guid RenderId { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,14 @@ namespace Oqtane.Models
|
||||||
public bool IsNavigation { get; set; }
|
public bool IsNavigation { get; set; }
|
||||||
public bool IsClickable { get; set; }
|
public bool IsClickable { get; set; }
|
||||||
public int? UserId { get; set; }
|
public int? UserId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Start of when this assignment is valid. See also <see cref="ExpiryDate"/>
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? EffectiveDate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// End of when this assignment is valid. See also <see cref="EffectiveDate"/>
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? ExpiryDate { get; set; }
|
||||||
public bool IsPersonalizable { get; set; }
|
public bool IsPersonalizable { get; set; }
|
||||||
|
|
||||||
#region IDeletable Properties
|
#region IDeletable Properties
|
||||||
|
|
|
@ -41,7 +41,14 @@ namespace Oqtane.Models
|
||||||
/// Reference to a Razor Container which wraps this module instance.
|
/// Reference to a Razor Container which wraps this module instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ContainerType { get; set; }
|
public string ContainerType { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Start of when this assignment is valid. See also <see cref="ExpiryDate"/>
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? EffectiveDate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// End of when this assignment is valid. See also <see cref="EffectiveDate"/>
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? ExpiryDate { get; set; }
|
||||||
#region IDeletable Properties
|
#region IDeletable Properties
|
||||||
|
|
||||||
public string DeletedBy { get; set; }
|
public string DeletedBy { get; set; }
|
||||||
|
|
|
@ -78,5 +78,11 @@ namespace Oqtane.Models
|
||||||
/// Optional number of rows (textarea)
|
/// Optional number of rows (textarea)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Rows { get; set; }
|
public int Rows { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Autocomplete setting for the property.
|
||||||
|
/// If set, enable autocomplete for the corresponding input field.
|
||||||
|
/// </summary>
|
||||||
|
public string Autocomplete { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<Version>5.0.1</Version>
|
<Version>5.0.2</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
<Copyright>.NET Foundation</Copyright>
|
<Copyright>.NET Foundation</Copyright>
|
||||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
||||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</PackageReleaseNotes>
|
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</PackageReleaseNotes>
|
||||||
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
||||||
<RepositoryType>Git</RepositoryType>
|
<RepositoryType>Git</RepositoryType>
|
||||||
<RootNamespace>Oqtane</RootNamespace>
|
<RootNamespace>Oqtane</RootNamespace>
|
||||||
|
@ -19,11 +19,11 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
|
||||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||||
<PackageReference Include="System.Text.Json" Version="8.0.0" />
|
<PackageReference Include="System.Text.Json" Version="8.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
using System;
|
using System;
|
||||||
using Oqtane.Models;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Oqtane.Shared
|
namespace Oqtane.Shared
|
||||||
{
|
{
|
||||||
public class Constants
|
public class Constants
|
||||||
{
|
{
|
||||||
public static readonly string Version = "5.0.1";
|
public static readonly string Version = "5.0.2";
|
||||||
public const string ReleaseVersions = "1.0.0,1.0.1,1.0.2,1.0.3,1.0.4,2.0.0,2.0.1,2.0.2,2.1.0,2.2.0,2.3.0,2.3.1,3.0.0,3.0.1,3.0.2,3.0.3,3.1.0,3.1.1,3.1.2,3.1.3,3.1.4,3.2.0,3.2.1,3.3.0,3.3.1,3.4.0,3.4.1,3.4.2,3.4.3,4.0.0,4.0.1,4.0.2,4.0.3,4.0.4,4.0.5,4.0.6,5.0.0,5.0.1";
|
public const string ReleaseVersions = "1.0.0,1.0.1,1.0.2,1.0.3,1.0.4,2.0.0,2.0.1,2.0.2,2.1.0,2.2.0,2.3.0,2.3.1,3.0.0,3.0.1,3.0.2,3.0.3,3.1.0,3.1.1,3.1.2,3.1.3,3.1.4,3.2.0,3.2.1,3.3.0,3.3.1,3.4.0,3.4.1,3.4.2,3.4.3,4.0.0,4.0.1,4.0.2,4.0.3,4.0.4,4.0.5,4.0.6,5.0.0,5.0.1,5.0.2";
|
||||||
public const string PackageId = "Oqtane.Framework";
|
public const string PackageId = "Oqtane.Framework";
|
||||||
public const string ClientId = "Oqtane.Client";
|
public const string ClientId = "Oqtane.Client";
|
||||||
public const string UpdaterPackageId = "Oqtane.Updater";
|
public const string UpdaterPackageId = "Oqtane.Updater";
|
||||||
|
@ -80,6 +77,8 @@ namespace Oqtane.Shared
|
||||||
|
|
||||||
public static readonly string MauiUserAgent = "MAUI";
|
public static readonly string MauiUserAgent = "MAUI";
|
||||||
public static readonly string MauiAliasPath = "Alias-Path";
|
public static readonly string MauiAliasPath = "Alias-Path";
|
||||||
|
public const string MauiCorsPolicy = "MauiCorsPolicy"; // must be a constant to be used with an attribute
|
||||||
|
|
||||||
public static readonly string VisitorCookiePrefix = "APP_VISITOR_";
|
public static readonly string VisitorCookiePrefix = "APP_VISITOR_";
|
||||||
|
|
||||||
// Obsolete constants
|
// Obsolete constants
|
||||||
|
|
|
@ -572,7 +572,55 @@ namespace Oqtane.Shared
|
||||||
|
|
||||||
return (localDateTime?.Date, localTime);
|
return (localDateTime?.Date, localTime);
|
||||||
}
|
}
|
||||||
|
public static bool IsPageModuleVisible(DateTime? effectiveDate, DateTime? expiryDate)
|
||||||
|
{
|
||||||
|
DateTime currentUtcTime = DateTime.UtcNow;
|
||||||
|
|
||||||
|
if (effectiveDate.HasValue && expiryDate.HasValue)
|
||||||
|
{
|
||||||
|
return currentUtcTime >= effectiveDate.Value && currentUtcTime <= expiryDate.Value;
|
||||||
|
}
|
||||||
|
else if (effectiveDate.HasValue)
|
||||||
|
{
|
||||||
|
return currentUtcTime >= effectiveDate.Value;
|
||||||
|
}
|
||||||
|
else if (expiryDate.HasValue)
|
||||||
|
{
|
||||||
|
// Include equality check here
|
||||||
|
return currentUtcTime <= expiryDate.Value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static bool ValidateEffectiveExpiryDates(DateTime? effectiveDate, DateTime? expiryDate)
|
||||||
|
{
|
||||||
|
// Treat DateTime.MinValue as null
|
||||||
|
effectiveDate ??= DateTime.MinValue;
|
||||||
|
expiryDate ??= DateTime.MinValue;
|
||||||
|
|
||||||
|
// Check if both effectiveDate and expiryDate have values
|
||||||
|
if (effectiveDate != DateTime.MinValue && expiryDate != DateTime.MinValue)
|
||||||
|
{
|
||||||
|
return effectiveDate <= expiryDate;
|
||||||
|
}
|
||||||
|
// Check if only effectiveDate has a value
|
||||||
|
else if (effectiveDate != DateTime.MinValue)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// Check if only expiryDate has a value
|
||||||
|
else if (expiryDate != DateTime.MinValue)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// If neither effectiveDate nor expiryDate has a value, consider the page/module visible
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
[Obsolete("ContentUrl(Alias alias, int fileId) is deprecated. Use FileUrl(Alias alias, int fileId) instead.", false)]
|
[Obsolete("ContentUrl(Alias alias, int fileId) is deprecated. Use FileUrl(Alias alias, int fileId) instead.", false)]
|
||||||
public static string ContentUrl(Alias alias, int fileId)
|
public static string ContentUrl(Alias alias, int fileId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<Version>5.0.1</Version>
|
<Version>5.0.2</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
<Copyright>.NET Foundation</Copyright>
|
<Copyright>.NET Foundation</Copyright>
|
||||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
||||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1</PackageReleaseNotes>
|
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.2</PackageReleaseNotes>
|
||||||
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
||||||
<RepositoryType>Git</RepositoryType>
|
<RepositoryType>Git</RepositoryType>
|
||||||
<RootNamespace>Oqtane</RootNamespace>
|
<RootNamespace>Oqtane</RootNamespace>
|
||||||
|
|
20
README.md
20
README.md
|
@ -1,6 +1,6 @@
|
||||||
# Latest Release
|
# Latest Release
|
||||||
|
|
||||||
[5.0.0](https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0) was released on Nov 16, 2023 and is a major release targeted at .NET 8. This release includes 45 pull requests by 4 different contributors, pushing the total number of project commits all-time to over 4300. The Oqtane framework continues to evolve at a rapid pace to meet the needs of .NET developers.
|
[5.0.1](https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1) was released on Dec 21, 2023 and is a major release targeted at .NET 8. This release includes 67 pull requests by 6 different contributors, pushing the total number of project commits all-time to over 4400. The Oqtane framework continues to evolve at a rapid pace to meet the needs of .NET developers.
|
||||||
|
|
||||||
[](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Foqtane%2Foqtane.framework%2Fmaster%2Fazuredeploy.json)
|
[](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Foqtane%2Foqtane.framework%2Fmaster%2Fazuredeploy.json)
|
||||||
|
|
||||||
|
@ -22,7 +22,15 @@ Please note that this project is owned by the .NET Foundation and is governed by
|
||||||
|
|
||||||
- Install the latest edition (v17.8 or higher) of [Visual Studio 2022](https://visualstudio.microsoft.com/downloads) with the **ASP.NET and web development** workload enabled. Oqtane works with ALL editions of Visual Studio from Community to Enterprise. If you wish to use LocalDB for development ( not a requirement as Oqtane supports SQLite, mySQL, and PostgreSQL ) you must also install the **Data storage and processing**.
|
- Install the latest edition (v17.8 or higher) of [Visual Studio 2022](https://visualstudio.microsoft.com/downloads) with the **ASP.NET and web development** workload enabled. Oqtane works with ALL editions of Visual Studio from Community to Enterprise. If you wish to use LocalDB for development ( not a requirement as Oqtane supports SQLite, mySQL, and PostgreSQL ) you must also install the **Data storage and processing**.
|
||||||
|
|
||||||
- clone the Oqtane dev branch source code to your local system. Open the **Oqtane.sln** solution file and Build the solution. Make sure you specify Oqtane.Server as the Startup Project and then Run the application.
|
- Clone the Oqtane dev branch source code to your local system.
|
||||||
|
|
||||||
|
- Open the **Oqtane.sln** solution file.
|
||||||
|
|
||||||
|
- **Important:** Build the solution.
|
||||||
|
|
||||||
|
- Make sure you specify Oqtane.Server as the Startup Project
|
||||||
|
|
||||||
|
- Run the application.
|
||||||
|
|
||||||
**Installing an official release:**
|
**Installing an official release:**
|
||||||
|
|
||||||
|
@ -39,6 +47,11 @@ Please note that this project is owned by the .NET Foundation and is governed by
|
||||||
|
|
||||||
- If you are getting started with Oqtane, a [series of videos](https://www.youtube.com/watch?v=JPfUZPlRRCE&list=PLYhXmd7yV0elLNLfQwZBUlM7ZSMYPTZ_f) are available which explain how to install the product, interact with the user interface, and develop custom modules.
|
- If you are getting started with Oqtane, a [series of videos](https://www.youtube.com/watch?v=JPfUZPlRRCE&list=PLYhXmd7yV0elLNLfQwZBUlM7ZSMYPTZ_f) are available which explain how to install the product, interact with the user interface, and develop custom modules.
|
||||||
|
|
||||||
|
# Oqtane Marketplace
|
||||||
|
|
||||||
|
Explore and enhance your Oqtane experience by visiting the Oqtane Marketplace. Discover a variety of modules, themes, and extensions contributed by the community. [Visit Oqtane Marketplace](https://www.oqtane.net)
|
||||||
|
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
There is a separate [Documentation repository](https://github.com/oqtane/oqtane.docs) which contains a variety of types of documentation for Oqtane, including API documentation that is auto generated using Docfx. The contents of the repository is published to Githib Pages and is available at [https://docs.oqtane.org](https://docs.oqtane.org/)
|
There is a separate [Documentation repository](https://github.com/oqtane/oqtane.docs) which contains a variety of types of documentation for Oqtane, including API documentation that is auto generated using Docfx. The contents of the repository is published to Githib Pages and is available at [https://docs.oqtane.org](https://docs.oqtane.org/)
|
||||||
|
|
||||||
|
@ -53,6 +66,9 @@ Backlog (TBD)
|
||||||
5.1.0 (Q1 2024)
|
5.1.0 (Q1 2024)
|
||||||
- [ ] Full Stack Blazor (Static Server-Side Rendering)
|
- [ ] Full Stack Blazor (Static Server-Side Rendering)
|
||||||
|
|
||||||
|
[5.0.1](https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.1) (Dec 21, 2023)
|
||||||
|
- [x] Stabilization improvements
|
||||||
|
|
||||||
[5.0.0](https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0) (Nov 16, 2023)
|
[5.0.0](https://github.com/oqtane/oqtane.framework/releases/tag/v5.0.0) (Nov 16, 2023)
|
||||||
- [x] Migration to .NET 8
|
- [x] Migration to .NET 8
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user