Skip to content

Commit

Permalink
copy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kukks committed Mar 15, 2024
1 parent 9985bb1 commit 78c0b55
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions BTCPayServer/Controllers/UIServerController.Plugins.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public class ListPluginsViewModel
public IActionResult EnablePlugin(
[FromServices] PluginService pluginService, string plugin)
{
pluginService.CancelCommands(plugin);
pluginService.Enable(plugin);
TempData.SetStatusMessageModel(new StatusMessageModel()
{
Expand Down
44 changes: 22 additions & 22 deletions BTCPayServer/Views/UIServer/ListPlugins.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -484,28 +484,28 @@

</div>
@if (pendingAction == "install")
{
<div class="card-footer border-0 ">
<form asp-action="ToggleAutoUpdate" asp-route-plugin="@plugin.Identifier" class="form-group" data-bs-toggle="tooltip" title=" @(autoUpdate.Contains(plugin.Identifier) ? "Disable" : "Enable") automatic updates for this plugin. You will still need to restart BTCPay Server to apply the update.">
<label class="d-flex align-items-center">
<button type="submit" class="btcpay-toggle me-3 @if (autoUpdate.Contains(plugin.Identifier)) { @("btcpay-toggle--active") }" value="scripting-@(autoUpdate.Contains(plugin.Identifier) ? "off" : "on")">@(autoUpdate.Contains(plugin.Identifier) ? "Disable" : "Enable") automatic updates</button>
<div class="">
<span>Automatic updates</span>
</div>
</label>
</form>
<form asp-action="ToggleKillswitch" asp-route-plugin="@plugin.Identifier" class="form-group"
data-bs-toggle="tooltip" title="@(killswitch.Contains(plugin.Identifier) ? "Disable" : "Enable") killswitch for this plugin. The plugin server would notify your BTCpay server to disable this plugin if it is found to be vulnerable. You will still need to restart BTCPay Server to apply.">
<label class="d-flex align-items-center">
<button type="submit" class="btcpay-toggle me-3 @if (killswitch.Contains(plugin.Identifier)) { @("btcpay-toggle--active") }" value="scripting-@(killswitch.Contains(plugin.Identifier) ? "off" : "on")">@(killswitch.Contains(plugin.Identifier) ? "Disable" : "Enable") killswitch</button>
<div class="">
<span>Kill switch</span>
</div>
</label>
</form>
</div>
}
{
<div class="card-footer border-0 ">
<form asp-action="ToggleAutoUpdate" asp-route-plugin="@plugin.Identifier" class="form-group" data-bs-toggle="tooltip" title=" @(autoUpdate.Contains(plugin.Identifier) ? "Disable" : "Enable") automatic updates for this plugin. You will still need to restart BTCPay Server to apply the update.">
<label class="d-flex align-items-center">
<button type="submit" class="btcpay-toggle me-3 @if (autoUpdate.Contains(plugin.Identifier)) { @("btcpay-toggle--active") }" value="scripting-@(autoUpdate.Contains(plugin.Identifier) ? "off" : "on")">@(autoUpdate.Contains(plugin.Identifier) ? "Disable" : "Enable") automatic updates</button>
<div class="">
<span>Automatic updates</span>
</div>
</label>
</form>

<form asp-action="ToggleKillswitch" asp-route-plugin="@plugin.Identifier" class="form-group"
data-bs-toggle="tooltip" title="@(killswitch.Contains(plugin.Identifier) ? "Disable" : "Enable") killswitch for this plugin. The plugin server would notify your BTCpay server to disable this plugin if it is found to be vulnerable. You will still need to restart BTCPay Server to apply.">
<label class="d-flex align-items-center">
<button type="submit" class="btcpay-toggle me-3 @if (killswitch.Contains(plugin.Identifier)) { @("btcpay-toggle--active") }" value="scripting-@(killswitch.Contains(plugin.Identifier) ? "off" : "on")">@(killswitch.Contains(plugin.Identifier) ? "Disable" : "Enable") killswitch</button>
<div class="">
<span>Vulnerability kill switch</span>
</div>
</label>
</form>
</div>
}
</div>
</div>
}
Expand Down

0 comments on commit 78c0b55

Please sign in to comment.