1
0

Add buttons to turn servers online or offline in servers list.

This commit is contained in:
Kevin Matsubara 2025-03-27 22:16:15 +01:00
parent 8a39b661cb
commit 8e6fd76b76

View File

@ -10,6 +10,21 @@
@(Server.IsOnline ? "online" : "offline")
</span>;
&nbsp;
@if (Server.IsOnline)
{
<button type="button" class="btn btn-outline-danger"
@onclick="@(() => { Server.IsOnline = false; })">
Turn off
</button>
}
else
{
<button type="button" class="btn btn-outline-success"
@onclick="@(() => { Server.IsOnline = true; })">
Turn on
</button>
}
&nbsp;
<a href="@($"/servers/{Server.Id}")" class="btn btn-primary">Edit</a>
&nbsp;
<EditForm