Show restream status in Admin.cshtml

This commit is contained in:
Laura Hausmann 2021-01-26 00:51:05 +01:00
parent 653b1cf500
commit 220ea3ad95
Signed by: zotan
GPG Key ID: 5EC1D38FFC321311
1 changed files with 12 additions and 9 deletions

View File

@ -30,18 +30,21 @@
<th scope="row">@user.Username</th>
<td>
@if (StreamUtils.IsLive(user.Username)) {
/*if (StreamUtils.IsLive(user.Username, "1080")) {
<button class="btn btn-dark" role="button" style="width:13ch" disabled>Restreaming</button>
if (user.AllowRestream && !string.IsNullOrWhiteSpace(user.RestreamTargets)) {
var restreams = StreamUtils.CountLiveRestreams(user.Username);
if (restreams > 0) {
<button class="btn btn-dark" role="button" style="width:18ch" disabled>Restreaming (@restreams)</button>
}
else {
<button class="btn btn-warning" role="button" style="width:18ch" disabled>Restreaming (@restreams)</button>
}
}
else {
<button class="btn btn-success" role="button" style="width:18ch" disabled>Live</button>
}
else {*/
<button class="btn btn-success" role="button" style="width:13ch" disabled>Live</button>
//}
//kept around for
//TODO Restreaming & direct stats support
}
else {
<button class="btn btn-danger" role="button" style="width:13ch" disabled>No data</button>
<button class="btn btn-danger" role="button" style="width:18ch" disabled>No data</button>
}
</td>
<td>