Add buttons to turn servers online or offline in servers list.
This commit is contained in:
parent
8a39b661cb
commit
8e6fd76b76
@ -10,6 +10,21 @@
|
|||||||
@(Server.IsOnline ? "online" : "offline")
|
@(Server.IsOnline ? "online" : "offline")
|
||||||
</span>;
|
</span>;
|
||||||
|
|
||||||
|
@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>
|
||||||
|
}
|
||||||
|
|
||||||
<a href="@($"/servers/{Server.Id}")" class="btn btn-primary">Edit</a>
|
<a href="@($"/servers/{Server.Id}")" class="btn btn-primary">Edit</a>
|
||||||
|
|
||||||
<EditForm
|
<EditForm
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user