mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Redesign plugin list items (#4528)
* Redesign plugin list items * Update icon and format code Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
This commit is contained in:
@@ -5,14 +5,17 @@ using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Abstractions.Contracts;
|
||||
using BTCPayServer.Configuration;
|
||||
using BTCPayServer.Lightning.CLightning;
|
||||
using BTCPayServer.Services;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.FileSystemGlobbing;
|
||||
using Microsoft.Extensions.Options;
|
||||
using NBitcoin.DataEncoders;
|
||||
using Newtonsoft.Json;
|
||||
@@ -52,6 +55,13 @@ namespace BTCPayServer.Plugins
|
||||
{
|
||||
var p = v.ManifestInfo.ToObject<AvailablePlugin>();
|
||||
p.Documentation = v.Documentation;
|
||||
var github = v.BuildInfo.GetGithubRepository();
|
||||
if (github != null)
|
||||
{
|
||||
p.Source = github.GetSourceUrl(v.BuildInfo.gitCommit, v.BuildInfo.pluginDir);
|
||||
p.Author = github.Owner;
|
||||
p.AuthorLink = $"https://github.com/{github.Owner}";
|
||||
}
|
||||
p.SystemPlugin = false;
|
||||
return p;
|
||||
}).ToArray();
|
||||
@@ -108,6 +118,9 @@ namespace BTCPayServer.Plugins
|
||||
|
||||
public IBTCPayServerPlugin.PluginDependency[] Dependencies { get; set; } = Array.Empty<IBTCPayServerPlugin.PluginDependency>();
|
||||
public string Documentation { get; set; }
|
||||
public string Source { get; set; }
|
||||
public string Author { get; set; }
|
||||
public string AuthorLink { get; set; }
|
||||
|
||||
public void Execute(IApplicationBuilder applicationBuilder,
|
||||
IServiceProvider applicationBuilderApplicationServices)
|
||||
|
||||
Reference in New Issue
Block a user