From 572926650c6b8448b6485e001544e187fb049bf8 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Tue, 8 Feb 2022 08:03:48 +0100 Subject: [PATCH] Show private streams in admin panel --- Pages/Admin.cshtml | 17 +++++++++++++++++ wwwroot/css/dark-mode.css | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Pages/Admin.cshtml b/Pages/Admin.cshtml index ca9bbef..46eff1b 100644 --- a/Pages/Admin.cshtml +++ b/Pages/Admin.cshtml @@ -47,6 +47,23 @@ } } + 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) { + + } + else { + + } + } + else { + + } + + } else { } diff --git a/wwwroot/css/dark-mode.css b/wwwroot/css/dark-mode.css index 330f0c1..79818c5 100644 --- a/wwwroot/css/dark-mode.css +++ b/wwwroot/css/dark-mode.css @@ -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;