Issue 6918 re enable plugin (#6930)

* Added the enable button on disabled plugins

* Added the disable function and button for installed plugins

* Changes based on the coderabbitai comments

* Removed markers and added the disable in the same if block as the unistall

* Hide the uninstall button when plugin is queued for enabling

* Removed the duplicate enale function

* Removed the disable button for installed plugins

* Removed the disableplugin functions as they are no longer needed

* Trigger CI pipeline after dotnet restore

* reverted the git ignore
This commit is contained in:
monicamuyama
2025-11-21 14:23:12 +03:00
committed by GitHub
parent 0a518320ea
commit 5a487985f4
5 changed files with 47 additions and 10 deletions

View File

@@ -86,6 +86,20 @@ namespace BTCPayServer.Controllers
return RedirectToAction("ListPlugins");
}
[HttpPost("server/plugins/enable")]
public IActionResult EnablePlugin(
[FromServices] PluginService pluginService, string plugin)
{
pluginService.EnablePlugin(plugin);
TempData.SetStatusMessageModel(new StatusMessageModel
{
Message = StringLocalizer["Plugin scheduled to be enabled."].Value,
Severity = StatusMessageModel.StatusSeverity.Success
});
return RedirectToAction("ListPlugins");
}
[HttpPost("server/plugins/cancel")]
public IActionResult CancelPluginCommands(
[FromServices] PluginService pluginService, string plugin)