Show private streams in admin panel

This commit is contained in:
Laura Hausmann 2022-02-08 08:03:48 +01:00
parent 7ce4ad0290
commit 572926650c
Signed by: zotan
GPG Key ID: D044E84C5BE01605
2 changed files with 24 additions and 1 deletions

View File

@ -47,6 +47,23 @@
}
<button class="btn btn-dark" role="button" disabled>@uptime.ToString("c")</button>
}
else if (StreamUtils.IsLive(user.PrivateAccessKey, stats)) {
var uptime = TimeSpan.FromMilliseconds(StreamUtils.GetClientTime(user.PrivateAccessKey, stats)).StripMilliseconds();
if (user.AllowRestream && !string.IsNullOrWhiteSpace(user.RestreamTargets)) {
var restreams = StreamUtils.CountLiveRestreams(user.PrivateAccessKey, stats);
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-warning" role="button" style="width:18ch" disabled>Live (private)</button>
}
<button class="btn btn-dark" role="button" disabled>@uptime.ToString("c")</button>
}
else {
<button class="btn btn-danger" role="button" style="width:18ch" disabled>No data</button>
}

View File

@ -117,11 +117,17 @@
border-color: #1b7630;
}
[data-theme="dark"] .btn-danger.disabled, [data-theme="dark"] .btn-danger:disabled {
[data-theme="dark"] .btn-danger.disabled, [data-theme="dark"] .btn-danger:disabled {
background-color: #721d25;
border-color: #721d25;
}
[data-theme="dark"] .btn-warning.disabled, [data-theme="dark"] .btn-warning:disabled {
color: #ffffff;
background-color: #a57b00;
border-color: #a57b00;
}
.notransition, .notransition::before, .notransition::after {
-webkit-transition: none !important;
-moz-transition: none !important;