From 807c0c10cbbc8edf6487ebce9a9ed3c1e2f65721 Mon Sep 17 00:00:00 2001 From: Moe Date: Thu, 27 Oct 2022 11:54:23 -0700 Subject: [PATCH] make Live Grid remember logs open, clean up Live Grid html and css --- definitions/base.js | 6 ----- web/assets/js/bs5.liveGrid.js | 44 ++++++++++++++++++++++++++-------- web/assets/js/bs5.videos.js | 45 +++++++++++++++++++---------------- 3 files changed, 58 insertions(+), 37 deletions(-) diff --git a/definitions/base.js b/definitions/base.js index d3742abf..4d1227fc 100644 --- a/definitions/base.js +++ b/definitions/base.js @@ -7447,12 +7447,6 @@ module.exports = function(s,config,lang){
$MONITOR_NAME
- -
-
-
-
-
`, quickLinks: { "Options": { diff --git a/web/assets/js/bs5.liveGrid.js b/web/assets/js/bs5.liveGrid.js index b587f6c3..0472fa8c 100644 --- a/web/assets/js/bs5.liveGrid.js +++ b/web/assets/js/bs5.liveGrid.js @@ -160,6 +160,7 @@ function buildLiveGridBlock(monitor){ var streamType = subStreamChannel ? monitorDetails.substream ? monitorDetails.substream.output.stream_type : 'hls' : monitorDetails.stream_type var streamElement = buildStreamElementHtml(streamType) var streamBlockInfo = definitions['Monitor Stream Window'] + var wasLiveGridLogStreamOpenBefore = isLiveGridLogStreamOpenBefore(monitorId) if(!loadedLiveGrids[monitor.mid])loadedLiveGrids[monitor.mid] = {} var quickLinkHtml = '' $.each(streamBlockInfo.quickLinks,function(n,button){ @@ -171,18 +172,26 @@ function buildLiveGridBlock(monitor){ data-ke="${monitor.ke}" data-mid="${monitor.mid}" data-mode="${monitor.mode}" - class="monitor_item glM${monitor.mid} ${streamBlockInfo.gridBlockClass || ''}" + class="monitor_item ${wasLiveGridLogStreamOpenBefore ? 'show_data' : ''} glM${monitor.mid} ${streamBlockInfo.gridBlockClass || ''}" > -
- ${streamBlockInfo.streamBlockPreHtml || ''} -
-
- ${streamBlockInfo.streamBlockHudHtml || ''} -
- ${streamBlockInfo.streamBlockHudControlsHtml || ''} +
+
+ ${streamBlockInfo.streamBlockPreHtml || ''} +
+
+ ${streamBlockInfo.streamBlockHudHtml || ''} +
+ ${streamBlockInfo.streamBlockHudControlsHtml || ''} +
+
+ ${streamElement} +
+
+
+
+
- ${streamElement}
${(streamBlockInfo.gridBlockAfterContentHtml || '').replace(`$QUICKLINKS`,quickLinkHtml)}