Skip to content

Commit 4771453

Browse files
authored
Merge pull request #60 from TimUx/copilot/add-show-started-notification
Display scheduled show notification as prominent banner above buttons
2 parents d50bf1d + e7611a2 commit 4771453

File tree

2 files changed

+29
-20
lines changed

2 files changed

+29
-20
lines changed

config.js

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
1-
// Default config for local testing without Docker
21
window.FPP_CONFIG = {
3-
siteName: 'Brauns Lichtershow',
4-
siteSubtitle: 'Fernsteuerung für den Falcon Player',
5-
statusPollMs: 10000,
6-
donationPoolId: 'abc123',
7-
donationCampaignName: 'FPP Weihnachtsaktion',
8-
donationSubtitle: 'Unterstütze die Lichtershow',
9-
donationText: 'Vielen Dank für deine Unterstützung!',
10-
buyMeACoffeeUsername: 'example',
2+
siteName: "Test",
3+
siteSubtitle: "Fernsteuerung für den Falcon Player",
114
previewMode: true,
12-
accessCode: '1234',
13-
socialFacebook: 'https://facebook.com/example',
14-
socialInstagram: 'https://instagram.com/example',
15-
socialTiktok: '',
16-
socialWhatsapp: '',
17-
socialYoutube: 'https://youtube.com/@example',
18-
socialWebsite: 'https://example.com',
19-
socialEmail: 'kontakt@example.com',
20-
buttonPlaylist1Text: 'Show starten',
21-
buttonPlaylist2Text: 'Kids-Show starten'
22-
};
5+
statusPollMs: 10000,
6+
accessCode: "",
7+
buttonPlaylist1Text: "Playlist 1 starten",
8+
buttonPlaylist2Text: "Playlist 2 starten",
9+
socialFacebook: "",
10+
socialInstagram: "",
11+
socialTiktok: "",
12+
socialWhatsapp: "",
13+
socialYoutube: "",
14+
socialWebsite: "",
15+
socialEmail: ""
16+
};

index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ <h1 id="headline"></h1>
3333

3434
<div id="main-content" class="hidden">
3535
<p class="quiet-banner hidden" id="preview-banner"></p>
36+
<p class="quiet-banner hidden" id="scheduled-show-banner"></p>
3637
<p class="quiet-banner hidden" id="show-running-banner"></p>
3738
<p class="quiet-banner hidden" id="quiet-banner"></p>
3839
<p class="quiet-banner hidden" id="outside-window-banner"></p>
@@ -80,6 +81,7 @@ <h3 class="social-footer-title">Unsere Kanäle:</h3>
8081
const btnRequest = document.getElementById('btn-request');
8182
const btnDonate = document.getElementById('btn-donate');
8283
const previewBanner = document.getElementById('preview-banner');
84+
const scheduledShowBanner = document.getElementById('scheduled-show-banner');
8385
const showRunningBanner = document.getElementById('show-running-banner');
8486
const quietBanner = document.getElementById('quiet-banner');
8587
const outsideWindowBanner = document.getElementById('outside-window-banner');
@@ -285,6 +287,7 @@ <h3 class="social-footer-title">Unsere Kanäle:</h3>
285287
const isQuiet = Boolean(data.locks && data.locks.quiet);
286288
const isOutsideWindow = Boolean(data.locks && data.locks.outsideShowWindow);
287289
const showPeriod = data.locks && data.locks.showPeriod;
290+
const scheduledShowActive = Boolean(data.scheduledShowActive);
288291

289292
// Hide preview banner in normal mode
290293
previewBanner.classList.add('hidden');
@@ -310,12 +313,22 @@ <h3 class="social-footer-title">Unsere Kanäle:</h3>
310313
outsideWindowBanner.appendChild(line3);
311314
outsideWindowBanner.classList.remove('hidden');
312315
quietBanner.classList.add('hidden');
316+
scheduledShowBanner.classList.add('hidden');
313317
showRunningBanner.classList.add('hidden');
314318
note.textContent = data.note || '';
315319
} else if (isQuiet && showPeriod) {
316320
quietBanner.textContent = `Ruhezeit ${showPeriod.endTime}${showPeriod.startTime} – keine Wiedergabe möglich.`;
317321
quietBanner.classList.remove('hidden');
318322
outsideWindowBanner.classList.add('hidden');
323+
scheduledShowBanner.classList.add('hidden');
324+
showRunningBanner.classList.add('hidden');
325+
note.textContent = data.note || '';
326+
} else if (scheduledShowActive && isRunning) {
327+
// Show scheduled show banner when a scheduled show is running
328+
scheduledShowBanner.textContent = 'Geplante Show gestartet – Wünsche pausiert.';
329+
scheduledShowBanner.classList.remove('hidden');
330+
quietBanner.classList.add('hidden');
331+
outsideWindowBanner.classList.add('hidden');
319332
showRunningBanner.classList.add('hidden');
320333
note.textContent = data.note || '';
321334
} else if (lockReason && !isQuiet && !isOutsideWindow) {
@@ -324,10 +337,12 @@ <h3 class="social-footer-title">Unsere Kanäle:</h3>
324337
showRunningBanner.classList.remove('hidden');
325338
quietBanner.classList.add('hidden');
326339
outsideWindowBanner.classList.add('hidden');
340+
scheduledShowBanner.classList.add('hidden');
327341
note.textContent = data.note || '';
328342
} else {
329343
quietBanner.classList.add('hidden');
330344
outsideWindowBanner.classList.add('hidden');
345+
scheduledShowBanner.classList.add('hidden');
331346
showRunningBanner.classList.add('hidden');
332347
note.textContent = data.note || '';
333348
}

0 commit comments

Comments
 (0)