Add File Seller plugin

This commit is contained in:
Kukks
2023-06-19 08:54:10 +02:00
parent f43af81f46
commit b8d244380f
9 changed files with 275 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
using BTCPayServer.Abstractions.Contracts;
using BTCPayServer.Abstractions.Models;
using BTCPayServer.Abstractions.Services;
using Microsoft.Extensions.DependencyInjection;
namespace BTCPayServer.Plugins.FileSeller;
public class FileSellerPlugin : BaseBTCPayServerPlugin
{
public override IBTCPayServerPlugin.PluginDependency[] Dependencies { get; } =
{
new() { Identifier = nameof(BTCPayServer), Condition = ">=1.10.3" }
};
public override void Execute(IServiceCollection applicationBuilder)
{
applicationBuilder.AddHostedService<FileSellerService>();
applicationBuilder.AddSingleton<IUIExtension>(new UIExtension("FileSeller/Detect",
"header-nav"));
applicationBuilder.AddSingleton<IUIExtension>(new UIExtension("FileSeller/Detect",
"checkout-end"));
applicationBuilder.AddSingleton<IUIExtension>(new UIExtension("FileSeller/FileSellerTemplateEditorItemDetail",
"app-template-editor-item-detail"));
base.Execute(applicationBuilder);
}
}