Show private streams in admin panel

master
Laura Hausmann 6 months ago
parent 7ce4ad0290
commit 572926650c
Signed by: zotan
GPG Key ID: D044E84C5BE01605
  1. 17
      Pages/Admin.cshtml
  2. 8
      wwwroot/css/dark-mode.css

@ -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>
}

@ -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;

Loading…
Cancel
Save