1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-11-22 08:42:44 +01:00
Minecraft-Phantom-Panel/Server/Phantom.Server.Web/Shared/InstanceStatusText.razor

51 lines
1.1 KiB
Plaintext

@using Phantom.Common.Data.Instance
@switch (Status) {
case InstanceIsOffline:
<text>Offline</text>
break;
case InstanceIsInvalid invalid:
<text>Invalid <sup title="@invalid.Reason">[?]</sup></text>
break;
case InstanceIsNotRunning:
<text>Not Running</text>
break;
case InstanceIsDownloading downloading:
<ProgressBar Value="@downloading.Progress" Maximum="100">
Downloading Server (@downloading.Progress%)
</ProgressBar>
break;
case InstanceIsLaunching:
<div class="spinner-border spinner-border-sm" role="status"></div>
<text>&nbsp;Launching</text>
break;
case InstanceIsRunning:
<text>Running</text>
break;
case InstanceIsRestarting:
<div class="spinner-border spinner-border-sm" role="status"></div>
<text>&nbsp;Restarting</text>
break;
case InstanceIsStopping:
<div class="spinner-border spinner-border-sm" role="status"></div>
<text>&nbsp;Stopping</text>
break;
case InstanceIsFailed failed:
<text>Failed <sup title="@failed.Reason.ToSentence()">[?]</sup></text>
break;
}
@code {
[Parameter]
public IInstanceStatus? Status { get; set; }
}