Loading overlay: monoliten vzorec v barvi postaje namesto ravne barve

This commit is contained in:
OpenClaw Agent
2026-07-01 17:09:22 +00:00
parent bfb337fe8e
commit f5cc53ea03
2 changed files with 27 additions and 4 deletions
+4 -4
View File
@@ -160,13 +160,13 @@ function channelOverlayBg(color) {
}
function showVideoPlayer(ch) {
const bg = ch ? channelOverlayBg(ch.color) : '#000';
const color = ch ? ch.color : '#000';
const logo = ch ? ch.logo : '';
document.getElementById('player-area').innerHTML = `
<div class="split__video_ratio" style="position:relative;">
<video id="video" controls autoplay loop playsinline></video>
<div id="video-loading" style="position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:${bg};border-radius:15px;z-index:2;pointer-events:none;">
<img src="${logo}" alt="" style="max-width:32%;max-height:32%;object-fit:contain;filter:drop-shadow(0 2px 8px rgba(0,0,0,.25));">
<div id="video-loading" class="channelLoading" style="--ch:${color};position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:15px;z-index:2;pointer-events:none;">
<img src="${logo}" alt="" style="position:relative;z-index:1;max-width:32%;max-height:32%;object-fit:contain;filter:drop-shadow(0 2px 8px rgba(0,0,0,.25));">
</div>
</div>
`;
@@ -183,7 +183,7 @@ function hideLoadingOverlay() {
function showLoadingOverlay(ch) {
const el = document.getElementById('video-loading');
if (!el) return;
if (ch) { el.style.background = channelOverlayBg(ch.color); const img = el.querySelector('img'); if (img) img.src = ch.logo; }
if (ch) { el.style.setProperty('--ch', ch.color); const img = el.querySelector('img'); if (img) img.src = ch.logo; }
el.style.display = 'flex'; el.style.opacity = '1';
}