mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
Add documentation link to plugins (#4329)
* Add documentation link to plugins * Minor UI updates Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
This commit is contained in:
@@ -33,13 +33,17 @@ namespace BTCPayServer.Controllers
|
||||
});
|
||||
availablePlugins = Array.Empty<PluginService.AvailablePlugin>();
|
||||
}
|
||||
var docsByIdentifier = new Dictionary<string, string>();
|
||||
foreach (var p in availablePlugins.Where(p => !string.IsNullOrEmpty(p.Documentation)))
|
||||
docsByIdentifier.TryAdd(p.Identifier, p.Documentation);
|
||||
var res = new ListPluginsViewModel()
|
||||
{
|
||||
Installed = pluginService.LoadedPlugins,
|
||||
Available = availablePlugins,
|
||||
Commands = pluginService.GetPendingCommands(),
|
||||
Disabled = pluginService.GetDisabledPlugins(),
|
||||
CanShowRestart = btcPayServerOptions.DockerDeployment
|
||||
CanShowRestart = btcPayServerOptions.DockerDeployment,
|
||||
DocsByIdentifier = docsByIdentifier
|
||||
};
|
||||
return View(res);
|
||||
}
|
||||
@@ -51,6 +55,7 @@ namespace BTCPayServer.Controllers
|
||||
public (string command, string plugin)[] Commands { get; set; }
|
||||
public bool CanShowRestart { get; set; }
|
||||
public string[] Disabled { get; set; }
|
||||
public Dictionary<string, string> DocsByIdentifier { get; set; } = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
[HttpPost("server/plugins/uninstall")]
|
||||
|
||||
Reference in New Issue
Block a user