include PackageRegistryUrl in System Info

This commit is contained in:
sbwalker
2023-08-24 16:39:38 -04:00
parent 6a2cfcab34
commit d2b3061ed9
8 changed files with 37 additions and 44 deletions

View File

@ -63,9 +63,9 @@
<div class="container-fluid px-0">
<div class="row g-0 mb-2">
<div class="col-4">
@if (context.LogoFileId != null)
@if (context.LogoUrl != null)
{
<img src="@GetLogo(context.LogoFileId.Value)" class="img-fluid" alt="@context.Name" />
<img src="@context.LogoUrl" class="img-fluid" alt="@context.Name" />
}
else
{
@ -210,13 +210,6 @@
HideProgressIndicator();
}
private string GetLogo(int fileid)
{
var url = ImageUrl(fileid, 100, 100);
url = (!string.IsNullOrEmpty(PageState.Alias.Path)) ? url.Substring(PageState.Alias.Path.Length + 1) : url;
return Constants.PackageRegistryUrl + url;
}
private async void PriceChanged(string price)
{
_price = price;

View File

@ -133,12 +133,9 @@
</div>
</div>
<div class="row mb-1 align-items-center">
<Label Class="col-sm-3" For="packageservice" HelpText="Specify If The Package Service Is Enabled For Installing Modules, Themes, And Translations" ResourceKey="PackageService">Enable Package Service? </Label>
<Label Class="col-sm-3" For="packageregistryurl" HelpText="Specify The Package Manager Service For Installing Modules, Themes, And Translations. If This Field Is Blank It Means The Package Manager Service Is Disabled For This Installation." ResourceKey="PackageManager">Package Manager: </Label>
<div class="col-sm-9">
<select id="packageservice" class="form-select" @bind="@_packageservice">
<option value="true">@SharedLocalizer["True"]</option>
<option value="false">@SharedLocalizer["False"]</option>
</select>
<input id="packageregistryurl" class="form-control" @bind="@_packageregistryurl" />
</div>
</div>
</div>
@ -182,7 +179,7 @@
private string _logginglevel = string.Empty;
private string _notificationlevel = string.Empty;
private string _swagger = string.Empty;
private string _packageservice = string.Empty;
private string _packageregistryurl = string.Empty;
private string _log = string.Empty;
@ -213,7 +210,7 @@
_logginglevel = systeminfo["Logging:LogLevel:Default"].ToString();
_notificationlevel = systeminfo["Logging:LogLevel:Notify"].ToString();
_swagger = systeminfo["UseSwagger"].ToString();
_packageservice = systeminfo["PackageService"].ToString();
_packageregistryurl = systeminfo["PackageRegistryUrl"].ToString();
}
systeminfo = await SystemService.GetSystemInfoAsync("log");
@ -232,7 +229,7 @@
settings.Add("Logging:LogLevel:Default", _logginglevel);
settings.Add("Logging:LogLevel:Notify", _notificationlevel);
settings.Add("UseSwagger", _swagger);
settings.Add("PackageService", _packageservice);
settings.Add("PackageRegistryUrl", _packageregistryurl);
await SystemService.UpdateSystemInfoAsync(settings);
AddModuleMessage(Localizer["Success.UpdateConfig.Restart"], MessageType.Success);
}

View File

@ -63,9 +63,9 @@
<div class="container-fluid px-0">
<div class="row g-0 mb-2">
<div class="col-4">
@if (context.LogoFileId != null)
@if (context.LogoUrl != null)
{
<img src="@GetLogo(context.LogoFileId.Value)" class="img-fluid" alt="@context.Name" />
<img src="@context.LogoUrl" class="img-fluid" alt="@context.Name" />
}
else
{
@ -212,13 +212,6 @@
HideProgressIndicator();
}
private string GetLogo(int fileid)
{
var url = ImageUrl(fileid, 100, 100);
url = (!string.IsNullOrEmpty(PageState.Alias.Path)) ? url.Substring(PageState.Alias.Path.Length + 1) : url;
return Constants.PackageRegistryUrl + url;
}
private async void PriceChanged(string price)
{
_price = price;

View File

@ -213,17 +213,17 @@
<data name="Log.Heading" xml:space="preserve">
<value>Log</value>
</data>
<data name="Register" xml:space="preserve">
<data name="Register" xml:space="preserve">
<value>Please Register Me For Major Product Updates And Security Bulletins</value>
</data>
<data name="Success.Register" xml:space="preserve">
<value>You Have Been Successfully Registered For Updates</value>
</data>
<data name="PackageService.HelpText" xml:space="preserve">
<value>Specify If The Package Service Is Enabled For Installing Modules, Themes, And Translations</value>
<data name="PackageManager.HelpText" xml:space="preserve">
<value>Specify The Package Manager Service For Installing Modules, Themes, And Translations. If This Field Is Blank It Means The Package Manager Service Is Disabled For This Installation.</value>
</data>
<data name="PackageService.Text" xml:space="preserve">
<value>Package Service Enabled?</value>
<data name="PackageManager.Text" xml:space="preserve">
<value>Package Manager:</value>
</data>
<data name="Swagger.HelpText" xml:space="preserve">
<value>Specify If Swagger Is Enabled For Your Server API</value>