Merge branch 'dev' into dev

This commit is contained in:
gjwalk
2021-06-25 17:56:21 -04:00
committed by GitHub
20 changed files with 340 additions and 312 deletions

View File

@ -75,7 +75,7 @@ else
<td> <td>
<h3 style="display: inline;"><a href="@context.ProductUrl" target="_new">@context.Name</a></h3>&nbsp;&nbsp;by:&nbsp;&nbsp;<strong><a href="@context.OwnerUrl" target="new">@context.Owner</a></strong><br /> <h3 style="display: inline;"><a href="@context.ProductUrl" target="_new">@context.Name</a></h3>&nbsp;&nbsp;by:&nbsp;&nbsp;<strong><a href="@context.OwnerUrl" target="new">@context.Owner</a></strong><br />
@(context.Description.Length > 400 ? (context.Description.Substring(0, 400) + "...") : context.Description)<br /> @(context.Description.Length > 400 ? (context.Description.Substring(0, 400) + "...") : context.Description)<br />
<strong>@(String.Format("{0:n0}", context.Downloads))</strong> @SharedLocalizer["Search.Downloads"]&nbsp;&nbsp;|&nbsp;&nbsp; @SharedLocalizer["Search.Released"]: <strong>@context.ReleaseDate.ToString("MMM dd, yyyy")</strong>&nbsp;&nbsp;|&nbsp;&nbsp;@SharedLocalizer["Search.Version"]: <strong>@context.Version</strong> <strong>@(String.Format("{0:n0}", context.Downloads))</strong> @SharedLocalizer["Search.Downloads"]&nbsp;&nbsp;|&nbsp;&nbsp; @SharedLocalizer["Search.Released"]: <strong>@context.ReleaseDate.ToString("MMM dd, yyyy")</strong>&nbsp;&nbsp;|&nbsp;&nbsp;@SharedLocalizer["Search.Version"]: <strong>@context.Version</strong>&nbsp;&nbsp;|&nbsp;&nbsp;@SharedLocalizer["Search.Source"]: <strong>@context.PackageUrl</strong>
</td> </td>
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
<button type="button" class="btn btn-primary" @onclick=@(async () => await DownloadLanguage(context.PackageId, context.Version))>@SharedLocalizer["Download"]</button> <button type="button" class="btn btn-primary" @onclick=@(async () => await DownloadLanguage(context.PackageId, context.Version))>@SharedLocalizer["Download"]</button>
@ -85,10 +85,6 @@ else
<button type="button" class="btn btn-success" @onclick="InstallLanguages">@SharedLocalizer["Install"]</button> <button type="button" class="btn btn-success" @onclick="InstallLanguages">@SharedLocalizer["Install"]</button>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@SharedLocalizer["Cancel"]</NavLink> <NavLink class="btn btn-secondary" href="@NavigateUrl()">@SharedLocalizer["Cancel"]</NavLink>
} }
else
{
<ModuleMessage Type="MessageType.Info" Message="No Translations Are Available To Download"></ModuleMessage>
}
</TabPanel> </TabPanel>
<TabPanel Name="Upload" ResourceKey="Upload" Security="SecurityAccessLevel.Host"> <TabPanel Name="Upload" ResourceKey="Upload" Security="SecurityAccessLevel.Host">
<table class="table table-borderless"> <table class="table table-borderless">

View File

@ -7,12 +7,10 @@
@inject IStringLocalizer<Add> Localizer @inject IStringLocalizer<Add> Localizer
@inject IStringLocalizer<SharedResources> SharedLocalizer @inject IStringLocalizer<SharedResources> SharedLocalizer
@if (_packages != null) <TabStrip>
{
<TabStrip>
@if (_packages.Count > 0)
{
<TabPanel Name="Download" ResourceKey="Download"> <TabPanel Name="Download" ResourceKey="Download">
@if (_packages != null && _packages.Count > 0)
{
<ModuleMessage Type="MessageType.Info" Message="Download one or more modules from the list below. Once you are ready click Install to complete the installation."></ModuleMessage> <ModuleMessage Type="MessageType.Info" Message="Download one or more modules from the list below. Once you are ready click Install to complete the installation."></ModuleMessage>
<table class="table table-borderless" style=" margin: auto; width: 50% !important;"> <table class="table table-borderless" style=" margin: auto; width: 50% !important;">
@ -32,15 +30,15 @@
<td> <td>
<h3 style="display: inline;"><a href="@context.ProductUrl" target="_new">@context.Name</a></h3>&nbsp;&nbsp;by:&nbsp;&nbsp;<strong><a href="@context.OwnerUrl" target="new">@context.Owner</a></strong><br /> <h3 style="display: inline;"><a href="@context.ProductUrl" target="_new">@context.Name</a></h3>&nbsp;&nbsp;by:&nbsp;&nbsp;<strong><a href="@context.OwnerUrl" target="new">@context.Owner</a></strong><br />
@(context.Description.Length > 400 ? (context.Description.Substring(0, 400) + "...") : context.Description)<br /> @(context.Description.Length > 400 ? (context.Description.Substring(0, 400) + "...") : context.Description)<br />
<strong>@(String.Format("{0:n0}", context.Downloads))</strong> @SharedLocalizer["Search.Downloads"]&nbsp;&nbsp;|&nbsp;&nbsp; @SharedLocalizer["Search.Released"]: <strong>@context.ReleaseDate.ToString("MMM dd, yyyy")</strong>&nbsp;&nbsp;|&nbsp;&nbsp;@SharedLocalizer["Search.Version"]: <strong>@context.Version</strong> <strong>@(String.Format("{0:n0}", context.Downloads))</strong> @SharedLocalizer["Search.Downloads"]&nbsp;&nbsp;|&nbsp;&nbsp; @SharedLocalizer["Search.Released"]: <strong>@context.ReleaseDate.ToString("MMM dd, yyyy")</strong>&nbsp;&nbsp;|&nbsp;&nbsp;@SharedLocalizer["Search.Version"]: <strong>@context.Version</strong>&nbsp;&nbsp;|&nbsp;&nbsp;@SharedLocalizer["Search.Source"]: <strong>@context.PackageUrl</strong>
</td> </td>
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
<button type="button" class="btn btn-primary" @onclick=@(async () => await DownloadModule(context.PackageId, context.Version))>@SharedLocalizer["Download"]</button> <button type="button" class="btn btn-primary" @onclick=@(async () => await DownloadModule(context.PackageId, context.Version))>@SharedLocalizer["Download"]</button>
</td> </td>
</Row> </Row>
</Pager> </Pager>
</TabPanel>
} }
</TabPanel>
<TabPanel Name="Upload" ResourceKey="Upload"> <TabPanel Name="Upload" ResourceKey="Upload">
<table class="table table-borderless"> <table class="table table-borderless">
<tr> <tr>
@ -53,11 +51,10 @@
</tr> </tr>
</table> </table>
</TabPanel> </TabPanel>
</TabStrip> </TabStrip>
<button type="button" class="btn btn-success" @onclick="InstallModules">@SharedLocalizer["Install"]</button> <button type="button" class="btn btn-success" @onclick="InstallModules">@SharedLocalizer["Install"]</button>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@SharedLocalizer["Cancel"]</NavLink> <NavLink class="btn btn-secondary" href="@NavigateUrl()">@SharedLocalizer["Cancel"]</NavLink>
}
@code { @code {
private List<Package> _packages; private List<Package> _packages;
@ -83,6 +80,8 @@
var moduledefinitions = await ModuleDefinitionService.GetModuleDefinitionsAsync(PageState.Site.SiteId); var moduledefinitions = await ModuleDefinitionService.GetModuleDefinitionsAsync(PageState.Site.SiteId);
_packages = await PackageService.GetPackagesAsync("module", _search); _packages = await PackageService.GetPackagesAsync("module", _search);
if (_packages != null)
{
foreach (Package package in _packages.ToArray()) foreach (Package package in _packages.ToArray())
{ {
if (moduledefinitions.Exists(item => item.PackageName == package.PackageId)) if (moduledefinitions.Exists(item => item.PackageName == package.PackageId))
@ -91,6 +90,7 @@
} }
} }
} }
}
private async Task Search() private async Task Search()
{ {

View File

@ -5,7 +5,9 @@
@inject IStringLocalizer<Index> Localizer @inject IStringLocalizer<Index> Localizer
@inject IStringLocalizer<SharedResources> SharedLocalizer @inject IStringLocalizer<SharedResources> SharedLocalizer
<table class="table table-borderless"> <TabStrip>
<TabPanel Name="Info" Heading="Info" ResourceKey="Info">
<table class="table table-borderless">
<tr> <tr>
<td> <td>
<Label For="version" HelpText="Framework Version" ResourceKey="FrameworkVersion">Framework Version: </Label> <Label For="version" HelpText="Framework Version" ResourceKey="FrameworkVersion">Framework Version: </Label>
@ -14,6 +16,52 @@
<input id="version" class="form-control" @bind="@_version" readonly /> <input id="version" class="form-control" @bind="@_version" readonly />
</td> </td>
</tr> </tr>
<tr>
<td>
<Label For="clrversion" HelpText="Common Language Runtime Version" ResourceKey="CLRVersion">CLR Version: </Label>
</td>
<td>
<input id="clrversion" class="form-control" @bind="@_clrversion" readonly />
</td>
</tr>
<tr>
<td>
<Label For="osversion" HelpText="Operating System Version" ResourceKey="OSVersion">OS Version: </Label>
</td>
<td>
<input id="osversion" class="form-control" @bind="@_osversion" readonly />
</td>
</tr>
<tr>
<td>
<Label For="serverpath" HelpText="Server Path" ResourceKey="ServerPath">Server Path: </Label>
</td>
<td>
<input id="serverpath" class="form-control" @bind="@_serverpath" readonly />
</td>
</tr>
<tr>
<td>
<Label For="servertime" HelpText="Server Time" ResourceKey="ServerTime">Server Time: </Label>
</td>
<td>
<input id="servertime" class="form-control" @bind="@_servertime" readonly />
</td>
</tr>
<tr>
<td>
<Label For="installationid" HelpText="The Unique Identifier For Your Installation" ResourceKey="InstallationId">Installation ID: </Label>
</td>
<td>
<input id="installationid" class="form-control" @bind="@_installationid" readonly />
</td>
</tr>
</table>
<a class="btn btn-primary" href="swagger/index.html" target="_new">@Localizer["Access.ApiFramework"]</a>&nbsp;
<ActionDialog Header="Restart Application" Message="Are You Sure You Wish To Restart The Application?" Action="Restart Application" Security="SecurityAccessLevel.Host" Class="btn btn-danger" OnClick="@(async () => await RestartApplication())" ResourceKey="RestartApplication" />
</TabPanel>
<TabPanel Name="Options" Heading="Options" ResourceKey="Options">
<table class="table table-borderless">
<tr> <tr>
<td> <td>
<Label For="runtime" HelpText="Blazor Runtime (Server or WebAssembly)" ResourceKey="BlazorRuntime">Blazor Runtime: </Label> <Label For="runtime" HelpText="Blazor Runtime (Server or WebAssembly)" ResourceKey="BlazorRuntime">Blazor Runtime: </Label>
@ -38,65 +86,68 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="clrversion" HelpText="Common Language Runtime Version" ResourceKey="ClrVerion">CLR Version: </Label> <Label For="detailederrors" HelpText="Specify If Detailed Errors Are Enabled For Blazor. This Option Should Not Not Be Enabled In Production." ResourceKey="DetailedErrors">Detailed Errors? </Label>
</td> </td>
<td> <td>
<input id="clrversion" class="form-control" @bind="@_clrversion" readonly /> <select id="detailederrors" class="form-control" @bind="@_detailederrors">
<option value="true">@SharedLocalizer["True"]</option>
<option value="false">@SharedLocalizer["False"]</option>
</select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<Label For="osversion" HelpText="Operating System Version" ResourceKey="OsVersion">OS Version: </Label> <Label For="logginglevel" HelpText="The Minimum Logging Level For The Event Log. This Option Can Be Used To Control The Volume Of Items Stored In Your Event Log." ResourceKey="LoggingLevel">Logging Level: </Label>
</td> </td>
<td> <td>
<input id="osversion" class="form-control" @bind="@_osversion" readonly /> <select id="logginglevel" class="form-control" @bind="@_logginglevel">
<option value="Trace">@Localizer["Trace"]</option>
<option value="Debug">@Localizer["Debug"]</option>
<option value="Information">@Localizer["Information"]</option>
<option value="Warning">@Localizer["Warning"]</option>
<option value="Error">@Localizer["Error"]</option>
<option value="Critical">@Localizer["Critical"]</option>
</select>
</td> </td>
</tr> </tr>
<tr> </table>
<td> <button type="button" class="btn btn-success" @onclick="SaveConfig">@SharedLocalizer["Save"]</button>&nbsp;
<Label For="serverpath" HelpText="Server Path" ResourceKey="ServerPath">Server Path: </Label> <ActionDialog Header="Restart Application" Message="Are You Sure You Wish To Restart The Application?" Action="Restart Application" Security="SecurityAccessLevel.Host" Class="btn btn-danger" OnClick="@(async () => await RestartApplication())" ResourceKey="RestartApplication" />
</td> </TabPanel>
<td> </TabStrip>
<input id="serverpath" class="form-control" @bind="@_serverpath" readonly />
</td>
</tr>
<tr>
<td>
<Label For="servertime" HelpText="Server Time" ResourceKey="ServerTime">Server Time: </Label>
</td>
<td>
<input id="servertime" class="form-control" @bind="@_servertime" readonly />
</td>
</tr>
</table>
<button type="button" class="btn btn-success" @onclick="SaveConfig">@SharedLocalizer["Save"]</button>&nbsp;
<a class="btn btn-primary" href="swagger/index.html" target="_new">@Localizer["Access.ApiFramework"]</a>&nbsp;
<ActionDialog Header="Restart Application" Message="Are You Sure You Wish To Restart The Application?" Action="Restart Application" Security="SecurityAccessLevel.Host" Class="btn btn-danger" OnClick="@(async () => await RestartApplication())" ResourceKey="RestartApplication" />
@code { @code {
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Host; public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Host;
private string _version = string.Empty; private string _version = string.Empty;
private string _runtime = string.Empty;
private string _rendermode = string.Empty;
private string _clrversion = string.Empty; private string _clrversion = string.Empty;
private string _osversion = string.Empty; private string _osversion = string.Empty;
private string _serverpath = string.Empty; private string _serverpath = string.Empty;
private string _servertime = string.Empty; private string _servertime = string.Empty;
private string _installationid = string.Empty;
private string _runtime = string.Empty;
private string _rendermode = string.Empty;
private string _detailederrors = string.Empty;
private string _logginglevel = string.Empty;
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
_version = Constants.Version; _version = Constants.Version;
_runtime = PageState.Runtime.ToString();
Dictionary<string, string> systeminfo = await SystemService.GetSystemInfoAsync(); Dictionary<string, string> systeminfo = await SystemService.GetSystemInfoAsync();
if (systeminfo != null) if (systeminfo != null)
{ {
_rendermode = systeminfo["rendermode"];
_clrversion = systeminfo["clrversion"]; _clrversion = systeminfo["clrversion"];
_osversion = systeminfo["osversion"]; _osversion = systeminfo["osversion"];
_serverpath = systeminfo["serverpath"]; _serverpath = systeminfo["serverpath"];
_servertime = systeminfo["servertime"]; _servertime = systeminfo["servertime"];
_installationid = systeminfo["installationid"];
_runtime = systeminfo["runtime"];
_rendermode = systeminfo["rendermode"];
_detailederrors = systeminfo["detailederrors"];
_logginglevel = systeminfo["logginglevel"];
} }
} }
@ -107,6 +158,8 @@
var settings = new Dictionary<string, string>(); var settings = new Dictionary<string, string>();
settings.Add("runtime", _runtime); settings.Add("runtime", _runtime);
settings.Add("rendermode", _rendermode); settings.Add("rendermode", _rendermode);
settings.Add("detailederrors", _detailederrors);
settings.Add("logginglevel", _logginglevel);
await SystemService.UpdateSystemInfoAsync(settings); await SystemService.UpdateSystemInfoAsync(settings);
AddModuleMessage(Localizer["Success.UpdateConfig.Restart"], MessageType.Success); AddModuleMessage(Localizer["Success.UpdateConfig.Restart"], MessageType.Success);
} }
@ -123,7 +176,7 @@
{ {
ShowProgressIndicator(); ShowProgressIndicator();
var interop = new Interop(JSRuntime); var interop = new Interop(JSRuntime);
await interop.RedirectBrowser(NavigateUrl(""), 10); await interop.RedirectBrowser(NavigateUrl(""), 20);
await InstallationService.RestartAsync(); await InstallationService.RestartAsync();
} }
catch (Exception ex) catch (Exception ex)

View File

@ -7,12 +7,10 @@
@inject IStringLocalizer<Add> Localizer @inject IStringLocalizer<Add> Localizer
@inject IStringLocalizer<SharedResources> SharedLocalizer @inject IStringLocalizer<SharedResources> SharedLocalizer
@if (_packages != null) <TabStrip>
{
<TabStrip>
@if (_packages.Count > 0)
{
<TabPanel Name="Download" ResourceKey="Download"> <TabPanel Name="Download" ResourceKey="Download">
@if (_packages != null && _packages.Count > 0)
{
<ModuleMessage Type="MessageType.Info" Message="Download one or more themes from the list below. Once you are ready click Install to complete the installation."></ModuleMessage> <ModuleMessage Type="MessageType.Info" Message="Download one or more themes from the list below. Once you are ready click Install to complete the installation."></ModuleMessage>
<table class="table table-borderless" style=" margin: auto; width: 50% !important;"> <table class="table table-borderless" style=" margin: auto; width: 50% !important;">
@ -32,15 +30,15 @@
<td> <td>
<h3 style="display: inline;"><a href="@context.ProductUrl" target="_new">@context.Name</a></h3>&nbsp;&nbsp;@SharedLocalizer["Search.By"]:&nbsp;&nbsp;<strong><a href="@context.OwnerUrl" target="new">@context.Owner</a></strong><br /> <h3 style="display: inline;"><a href="@context.ProductUrl" target="_new">@context.Name</a></h3>&nbsp;&nbsp;@SharedLocalizer["Search.By"]:&nbsp;&nbsp;<strong><a href="@context.OwnerUrl" target="new">@context.Owner</a></strong><br />
@(context.Description.Length > 400 ? (context.Description.Substring(0, 400) + "...") : context.Description)<br /> @(context.Description.Length > 400 ? (context.Description.Substring(0, 400) + "...") : context.Description)<br />
<strong>@(String.Format("{0:n0}", context.Downloads))</strong> @SharedLocalizer["Search.Downloads"]&nbsp;&nbsp;|&nbsp;&nbsp; @SharedLocalizer["Search.Released"]: <strong>@context.ReleaseDate.ToString("MMM dd, yyyy")</strong>&nbsp;&nbsp;|&nbsp;&nbsp;@SharedLocalizer["Search.Version"]: <strong>@context.Version</strong> <strong>@(String.Format("{0:n0}", context.Downloads))</strong> @SharedLocalizer["Search.Downloads"]&nbsp;&nbsp;|&nbsp;&nbsp; @SharedLocalizer["Search.Released"]: <strong>@context.ReleaseDate.ToString("MMM dd, yyyy")</strong>&nbsp;&nbsp;|&nbsp;&nbsp;@SharedLocalizer["Search.Version"]: <strong>@context.Version</strong>&nbsp;&nbsp;|&nbsp;&nbsp;@SharedLocalizer["Search.Source"]: <strong>@context.PackageUrl</strong>
</td> </td>
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
<button type="button" class="btn btn-primary" @onclick=@(async () => await DownloadTheme(context.PackageId, context.Version))>@SharedLocalizer["Download"]</button> <button type="button" class="btn btn-primary" @onclick=@(async () => await DownloadTheme(context.PackageId, context.Version))>@SharedLocalizer["Download"]</button>
</td> </td>
</Row> </Row>
</Pager> </Pager>
</TabPanel>
} }
</TabPanel>
<TabPanel Name="Upload" ResourceKey="Upload"> <TabPanel Name="Upload" ResourceKey="Upload">
<table class="table table-borderless"> <table class="table table-borderless">
<tr> <tr>
@ -53,11 +51,10 @@
</tr> </tr>
</table> </table>
</TabPanel> </TabPanel>
</TabStrip> </TabStrip>
<button type="button" class="btn btn-success" @onclick="InstallThemes">@SharedLocalizer["Install"]</button> <button type="button" class="btn btn-success" @onclick="InstallThemes">@SharedLocalizer["Install"]</button>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@SharedLocalizer["Cancel"]</NavLink> <NavLink class="btn btn-secondary" href="@NavigateUrl()">@SharedLocalizer["Cancel"]</NavLink>
}
@code { @code {
private List<Package> _packages; private List<Package> _packages;
@ -83,6 +80,8 @@
var themes = await ThemeService.GetThemesAsync(); var themes = await ThemeService.GetThemesAsync();
_packages = await PackageService.GetPackagesAsync("theme", _search); _packages = await PackageService.GetPackagesAsync("theme", _search);
if (_packages != null)
{
foreach (Package package in _packages.ToArray()) foreach (Package package in _packages.ToArray())
{ {
if (themes.Exists(item => item.PackageName == package.PackageId)) if (themes.Exists(item => item.PackageName == package.PackageId))
@ -91,6 +90,7 @@
} }
} }
} }
}
private async Task Search() private async Task Search()
{ {

View File

@ -7,11 +7,9 @@
@inject IStringLocalizer<Index> Localizer @inject IStringLocalizer<Index> Localizer
@inject IStringLocalizer<SharedResources> SharedLocalizer @inject IStringLocalizer<SharedResources> SharedLocalizer
@if (_package != null) <TabStrip>
{
<TabStrip>
<TabPanel Name="Download" ResourceKey="Download"> <TabPanel Name="Download" ResourceKey="Download">
@if (_upgradeavailable) @if (_package != null && _upgradeavailable)
{ {
<ModuleMessage Type="MessageType.Info" Message="Select The Download Button To Download The Framework Upgrade Package And Then Select Upgrade"></ModuleMessage> <ModuleMessage Type="MessageType.Info" Message="Select The Download Button To Download The Framework Upgrade Package And Then Select Upgrade"></ModuleMessage>
<button type="button" class="btn btn-primary" @onclick=@(async () => await Download(Constants.PackageId, @_package.Version))>@SharedLocalizer["Download"] @_package.Version</button> <button type="button" class="btn btn-primary" @onclick=@(async () => await Download(Constants.PackageId, @_package.Version))>@SharedLocalizer["Download"] @_package.Version</button>
@ -36,8 +34,7 @@
</table> </table>
<button type="button" class="btn btn-success" @onclick="Upgrade">@SharedLocalizer["Upgrade"]</button> <button type="button" class="btn btn-success" @onclick="Upgrade">@SharedLocalizer["Upgrade"]</button>
</TabPanel> </TabPanel>
</TabStrip> </TabStrip>
}
@code { @code {
private Package _package; private Package _package;
@ -76,7 +73,7 @@
AddModuleMessage(Localizer["Info.Upgrade.Wait"], MessageType.Info); AddModuleMessage(Localizer["Info.Upgrade.Wait"], MessageType.Info);
ShowProgressIndicator(); ShowProgressIndicator();
var interop = new Interop(JSRuntime); var interop = new Interop(JSRuntime);
await interop.RedirectBrowser(NavigateUrl(), 30); await interop.RedirectBrowser(NavigateUrl(), 20);
await InstallationService.Upgrade(); await InstallationService.Upgrade();
} }
catch (Exception ex) catch (Exception ex)

View File

@ -148,6 +148,6 @@
<value>Translation Downloaded Successfully. Click Install To Complete Installation.</value> <value>Translation Downloaded Successfully. Click Install To Complete Installation.</value>
</data> </data>
<data name="Success.Language.Install" xml:space="preserve"> <data name="Success.Language.Install" xml:space="preserve">
<value>Translations Installed Successfully. You Must &lt;a href=\"{0}\"&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value> <value>Translations Installed Successfully. You Must &lt;a href={0}&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value>
</data> </data>
</root> </root>

View File

@ -136,7 +136,7 @@
<value>Error Downloading Translation</value> <value>Error Downloading Translation</value>
</data> </data>
<data name="Success.Language.Install" xml:space="preserve"> <data name="Success.Language.Install" xml:space="preserve">
<value>Translation Installed Successfully. You Must &lt;a href=\"{0}\"&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value> <value>Translation Installed Successfully. You Must &lt;a href={0}&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value>
</data> </data>
<data name="Default" xml:space="preserve"> <data name="Default" xml:space="preserve">
<value>Default</value> <value>Default</value>

View File

@ -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
@ -136,7 +136,7 @@
<value>Once You Have Compiled The Module And Restarted The Application You Can Activate The Module Below</value> <value>Once You Have Compiled The Module And Restarted The Application You Can Activate The Module Below</value>
</data> </data>
<data name="Success.Module.Create" xml:space="preserve"> <data name="Success.Module.Create" xml:space="preserve">
<value>The Source Code For Your Module Has Been Created At The Location Specified Below And Must Be Compiled In Order To Make It Functional. Once It Has Been Compiled You Must &lt;a href=\"{0}\"&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value> <value>The Source Code For Your Module Has Been Created At The Location Specified Below And Must Be Compiled In Order To Make It Functional. Once It Has Been Compiled You Must &lt;a href={0}&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</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 ) And Choose A Template</value>

View File

@ -124,7 +124,7 @@
<value>Error Loading Packages</value> <value>Error Loading Packages</value>
</data> </data>
<data name="Success.Module.Install" xml:space="preserve"> <data name="Success.Module.Install" xml:space="preserve">
<value>Module Installed Successfully. You Must &lt;a href=\"{0}\"&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value> <value>Module Installed Successfully. You Must &lt;a href={0}&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value>
</data> </data>
<data name="Success.Module.Download" xml:space="preserve"> <data name="Success.Module.Download" xml:space="preserve">
<value>Module Downloaded Successfully. Click Install To Complete Installation.</value> <value>Module Downloaded Successfully. Click Install To Complete Installation.</value>

View File

@ -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
@ -166,6 +166,6 @@
<value>Location: </value> <value>Location: </value>
</data> </data>
<data name="Success.Module.Create" xml:space="preserve"> <data name="Success.Module.Create" xml:space="preserve">
<value>The Source Code For Your Module Has Been Created At The Location Specified Below And Must Be Compiled In Order To Make It Functional. Once It Has Been Compiled You Must &lt;a href=\"{0}\"&gt;Restart&lt;/a&gt; Your Application To Activate The Module.</value> <value>The Source Code For Your Module Has Been Created At The Location Specified Below And Must Be Compiled In Order To Make It Functional. Once It Has Been Compiled You Must &lt;a href={0}&gt;Restart&lt;/a&gt; Your Application To Activate The Module.</value>
</data> </data>
</root> </root>

View File

@ -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
@ -121,7 +121,7 @@
<value>Create Module</value> <value>Create Module</value>
</data> </data>
<data name="Success.Module.Install" xml:space="preserve"> <data name="Success.Module.Install" xml:space="preserve">
<value>Module Installed Successfully. You Must &lt;a href=\"{0}\"&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value> <value>Module Installed Successfully. You Must &lt;a href={0}&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value>
</data> </data>
<data name="Error.Module.Download" xml:space="preserve"> <data name="Error.Module.Download" xml:space="preserve">
<value>Error Downloading Module</value> <value>Error Downloading Module</value>

View File

@ -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
@ -123,13 +123,13 @@
<data name="FrameworkVersion.HelpText" xml:space="preserve"> <data name="FrameworkVersion.HelpText" xml:space="preserve">
<value>Framework Version</value> <value>Framework Version</value>
</data> </data>
<data name="BlazorRunime.HelpText" xml:space="preserve"> <data name="BlazorRuntime.HelpText" xml:space="preserve">
<value>Blazor Runtime (Server or WebAssembly)</value> <value>Blazor Runtime (Server or WebAssembly)</value>
</data> </data>
<data name="ClrVerion.HelpText" xml:space="preserve"> <data name="CLRVersion.HelpText" xml:space="preserve">
<value>Common Language Runtime Version</value> <value>Common Language Runtime Version</value>
</data> </data>
<data name="OsVersion.HelpText" xml:space="preserve"> <data name="OSVersion.HelpText" xml:space="preserve">
<value>Operating System Version</value> <value>Operating System Version</value>
</data> </data>
<data name="ServerPath.HelpText" xml:space="preserve"> <data name="ServerPath.HelpText" xml:space="preserve">
@ -141,13 +141,13 @@
<data name="FrameworkVersion.Text" xml:space="preserve"> <data name="FrameworkVersion.Text" xml:space="preserve">
<value>Framework Version: </value> <value>Framework Version: </value>
</data> </data>
<data name="BlazorRunime.Text" xml:space="preserve"> <data name="BlazorRuntime.Text" xml:space="preserve">
<value>Blazor Runtime: </value> <value>Blazor Runtime: </value>
</data> </data>
<data name="ClrVerion.Text" xml:space="preserve"> <data name="CLRVersion.Text" xml:space="preserve">
<value>CLR Version: </value> <value>CLR Version: </value>
</data> </data>
<data name="OsVersion.Text" xml:space="preserve"> <data name="OSVersion.Text" xml:space="preserve">
<value>OS Version: </value> <value>OS Version: </value>
</data> </data>
<data name="ServerPath.Text" xml:space="preserve"> <data name="ServerPath.Text" xml:space="preserve">
@ -177,4 +177,52 @@
<data name="WebAssembly" xml:space="preserve"> <data name="WebAssembly" xml:space="preserve">
<value>WebAssembly</value> <value>WebAssembly</value>
</data> </data>
<data name="InstallationId.Text" xml:space="preserve">
<value>Installation ID: </value>
</data>
<data name="InstallationId.HelpText" xml:space="preserve">
<value>The Unique Identifier For Your Installation</value>
</data>
<data name="DetailedErrors.Text" xml:space="preserve">
<value>Detailed Errors? </value>
</data>
<data name="DetailedErrors.HelpText" xml:space="preserve">
<value>Specify If Detailed Errors Are Enabled For Blazor. This Option Should Not Not Be Enabled In Production.</value>
</data>
<data name="True" xml:space="preserve">
<value>True</value>
</data>
<data name="False" xml:space="preserve">
<value>False</value>
</data>
<data name="LoggingLevel.Text" xml:space="preserve">
<value>Logging Level: </value>
</data>
<data name="LoggingLevel.HelpText" xml:space="preserve">
<value>The Minimum Logging Level For The Event Log. This Option Can Be Used To Control The Volume Of Items Stored In Your Event Log.</value>
</data>
<data name="Trace" xml:space="preserve">
<value>Trace</value>
</data>
<data name="Debug" xml:space="preserve">
<value>Debug</value>
</data>
<data name="Information" xml:space="preserve">
<value>Information</value>
</data>
<data name="Warning" xml:space="preserve">
<value>Warning</value>
</data>
<data name="Error" xml:space="preserve">
<value>Error</value>
</data>
<data name="Critical" xml:space="preserve">
<value>Critical</value>
</data>
<data name="Info" xml:space="preserve">
<value>Info</value>
</data>
<data name="Options" xml:space="preserve">
<value>Options</value>
</data>
</root> </root>

View File

@ -124,7 +124,7 @@
<value>Theme: </value> <value>Theme: </value>
</data> </data>
<data name="Success.Theme.Install" xml:space="preserve"> <data name="Success.Theme.Install" xml:space="preserve">
<value>Theme Installed Successfully. You Must &lt;a href=\"{0}\"&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value> <value>Theme Installed Successfully. You Must &lt;a href={0}&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value>
</data> </data>
<data name="Success.Theme.Download" xml:space="preserve"> <data name="Success.Theme.Download" xml:space="preserve">
<value>Theme Downloaded Successfully. Click Install To Complete Installation.</value> <value>Theme Downloaded Successfully. Click Install To Complete Installation.</value>

View File

@ -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
@ -142,7 +142,7 @@
<value>Please Note That The Theme Creator Is Only Intended To Be Used In A Development Environment</value> <value>Please Note That The Theme Creator Is Only Intended To Be Used In A Development Environment</value>
</data> </data>
<data name="Success.Theme.Create" xml:space="preserve"> <data name="Success.Theme.Create" xml:space="preserve">
<value>The Source Code For Your Theme Has Been Created At The Location Specified Below And Must Be Compiled In Order To Make It Functional. Once It Has Been Compiled You Must &lt;a href=\"{0}\"&gt;Restart&lt;/a&gt; Your Application To Activate The Module.</value> <value>The Source Code For Your Theme Has Been Created At The Location Specified Below And Must Be Compiled In Order To Make It Functional. Once It Has Been Compiled You Must &lt;a href={0}&gt;Restart&lt;/a&gt; Your Application To Activate The Module.</value>
</data> </data>
<data name="Message.Required.ValidName" xml:space="preserve"> <data name="Message.Required.ValidName" xml:space="preserve">
<value>You Must Provide A Valid Owner Name And Theme 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 Theme Name ( ie. No Punctuation Or Spaces And The Values Cannot Be The Same ) And Choose A Template</value>

View File

@ -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
@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Success.Theme.Install" xml:space="preserve"> <data name="Success.Theme.Install" xml:space="preserve">
<value>Theme Installed Successfully. You Must &lt;a href=\"{0}\"&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value> <value>Theme Installed Successfully. You Must &lt;a href={0}&gt;Restart&lt;/a&gt; Your Application To Apply These Changes.</value>
</data> </data>
<data name="Error.Theme.Download" xml:space="preserve"> <data name="Error.Theme.Download" xml:space="preserve">
<value>Error Downloading Theme</value> <value>Error Downloading Theme</value>

View File

@ -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
@ -226,7 +226,7 @@
<value>downloads</value> <value>downloads</value>
</data> </data>
<data name="Search.Released" xml:space="preserve"> <data name="Search.Released" xml:space="preserve">
<value>release date</value> <value>released</value>
</data> </data>
<data name="Search.Version" xml:space="preserve"> <data name="Search.Version" xml:space="preserve">
<value>version</value> <value>version</value>
@ -275,5 +275,7 @@
</data> </data>
<data name="LocalVersion" xml:space="preserve"> <data name="LocalVersion" xml:space="preserve">
<value>Local Version</value> <value>Local Version</value>
<data name="Search.Source" xml:space="preserve">
<value>source</value>
</data> </data>
</root> </root>

View File

@ -172,13 +172,8 @@
} }
// format path and remove alias // format path and remove alias
path = path.Replace("//", "/"); path = path.Replace("//", "/"); // in case of doubleslash at end
path += (!path.EndsWith("/")) ? "/" : "";
if (!path.EndsWith("/"))
{
path += "/";
}
if (SiteState.Alias.Path != "" && path.StartsWith(SiteState.Alias.Path)) if (SiteState.Alias.Path != "" && path.StartsWith(SiteState.Alias.Path))
{ {
path = path.Substring(SiteState.Alias.Path.Length + 1); path = path.Substring(SiteState.Alias.Path.Length + 1);

View File

@ -1,4 +1,5 @@
del "*.nupkg" del "*.nupkg"
del "*.zip"
dotnet clean -c Release ..\Oqtane.sln dotnet clean -c Release ..\Oqtane.sln
dotnet build -c Release ..\Oqtane.sln dotnet build -c Release ..\Oqtane.sln
copy /Y/B/V "..\Oqtane.Server\bin\Release\net5.0\System.Drawing.Common.dll" "..\Oqtane.Server\bin\Release\net5.0\publish\System.Drawing.Common.dll" copy /Y/B/V "..\Oqtane.Server\bin\Release\net5.0\System.Drawing.Common.dll" "..\Oqtane.Server\bin\Release\net5.0\publish\System.Drawing.Common.dll"

View File

@ -34,7 +34,6 @@ namespace Oqtane.Controllers
// GET: api/<controller>?type=x&search=y // GET: api/<controller>?type=x&search=y
[HttpGet] [HttpGet]
[Authorize(Roles = RoleNames.Host)]
public async Task<IEnumerable<Package>> Get(string type, string search) public async Task<IEnumerable<Package>> Get(string type, string search)
{ {
// get packages // get packages
@ -125,88 +124,4 @@ namespace Oqtane.Controllers
_installationManager.InstallPackages(); _installationManager.InstallPackages();
} }
} }
public partial class SearchResult
{
[JsonProperty("@context")]
public Context Context { get; set; }
[JsonProperty("totalHits")]
public long TotalHits { get; set; }
[JsonProperty("data")]
public Data[] Data { get; set; }
}
public partial class Context
{
[JsonProperty("@vocab")]
public Uri Vocab { get; set; }
[JsonProperty("@base")]
public Uri Base { get; set; }
}
public partial class Data
{
[JsonProperty("@id")]
public Uri Url { get; set; }
[JsonProperty("@type")]
public string Type { get; set; }
[JsonProperty("registration")]
public Uri Registration { get; set; }
[JsonProperty("id")]
public string Id { get; set; }
[JsonProperty("version")]
public string Version { get; set; }
[JsonProperty("description")]
public string Description { get; set; }
[JsonProperty("summary")]
public string Summary { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("iconUrl")]
public Uri IconUrl { get; set; }
[JsonProperty("licenseUrl")]
public Uri LicenseUrl { get; set; }
[JsonProperty("projectUrl")]
public Uri ProjectUrl { get; set; }
[JsonProperty("tags")]
public string[] Tags { get; set; }
[JsonProperty("authors")]
public string[] Authors { get; set; }
[JsonProperty("totalDownloads")]
public long TotalDownloads { get; set; }
[JsonProperty("verified")]
public bool Verified { get; set; }
[JsonProperty("versions")]
public Version[] Versions { get; set; }
}
public partial class Version
{
[JsonProperty("version")]
public string Number { get; set; }
[JsonProperty("downloads")]
public long Downloads { get; set; }
[JsonProperty("@id")]
public Uri Url { get; set; }
}
} }

View File

@ -27,12 +27,17 @@ namespace Oqtane.Controllers
{ {
Dictionary<string, string> systeminfo = new Dictionary<string, string>(); Dictionary<string, string> systeminfo = new Dictionary<string, string>();
systeminfo.Add("rendermode", _configManager.GetSetting("RenderMode", "Server"));
systeminfo.Add("clrversion", Environment.Version.ToString()); systeminfo.Add("clrversion", Environment.Version.ToString());
systeminfo.Add("osversion", Environment.OSVersion.ToString()); systeminfo.Add("osversion", Environment.OSVersion.ToString());
systeminfo.Add("machinename", Environment.MachineName); systeminfo.Add("machinename", Environment.MachineName);
systeminfo.Add("serverpath", _environment.ContentRootPath); systeminfo.Add("serverpath", _environment.ContentRootPath);
systeminfo.Add("servertime", DateTime.Now.ToString()); systeminfo.Add("servertime", DateTime.Now.ToString());
systeminfo.Add("installationid", GetInstallationId());
systeminfo.Add("runtime", _configManager.GetSetting("Runtime", "Server"));
systeminfo.Add("rendermode", _configManager.GetSetting("RenderMode", "ServerPrerendered"));
systeminfo.Add("detailederrors", _configManager.GetSetting("DetailedErrors", "false"));
systeminfo.Add("logginglevel", _configManager.GetSetting("Logging:LogLevel:Default", "Information"));
return systeminfo; return systeminfo;
} }
@ -51,9 +56,25 @@ namespace Oqtane.Controllers
case "rendermode": case "rendermode":
_configManager.AddOrUpdateSetting("RenderMode", kvp.Value, false); _configManager.AddOrUpdateSetting("RenderMode", kvp.Value, false);
break; break;
case "detailederrors":
_configManager.AddOrUpdateSetting("DetailedErrors", kvp.Value, false);
break;
case "logginglevel":
_configManager.AddOrUpdateSetting("Logging:LogLevel:Default", kvp.Value, false);
break;
} }
} }
} }
private string GetInstallationId()
{
var installationid = _configManager.GetSetting("InstallationId", "");
if (installationid == "")
{
installationid = Guid.NewGuid().ToString();
_configManager.AddOrUpdateSetting("InstallationId", installationid, true);
}
return installationid;
}
} }
} }