Release 1.6.1
This commit is contained in:
@@ -104,13 +104,6 @@
|
||||
data-current-transition="{{ d.transition or 'none' }}"
|
||||
data-current-show-overlay="{{ '1' if d.show_overlay else '0' }}"
|
||||
data-current-ticker-enabled="{{ '1' if d.ticker_enabled else '0' }}"
|
||||
data-current-ticker-rss-url="{{ d.ticker_rss_url or '' }}"
|
||||
data-current-ticker-color="{{ d.ticker_color or '' }}"
|
||||
data-current-ticker-bg-color="{{ d.ticker_bg_color or '' }}"
|
||||
data-current-ticker-bg-opacity="{{ d.ticker_bg_opacity or '' }}"
|
||||
data-current-ticker-font-family="{{ d.ticker_font_family or '' }}"
|
||||
data-current-ticker-font-size-px="{{ d.ticker_font_size_px or '' }}"
|
||||
data-current-ticker-speed="{{ d.ticker_speed or '' }}"
|
||||
data-legacy-playlist-id="{{ d.assigned_playlist_id or '' }}"
|
||||
data-active-playlist-ids="{{ d.display_playlists | map(attribute='playlist_id') | list | join(',') }}"
|
||||
>
|
||||
@@ -179,61 +172,13 @@
|
||||
<div class="form-text">If your company has an overlay uploaded, it will be displayed on top of the content.</div>
|
||||
</div>
|
||||
|
||||
<div class="card" style="border: 1px solid rgba(0,0,0,0.10);">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<div class="fw-bold">Ticker tape</div>
|
||||
<div class="text-muted small">Scroll RSS headlines at the bottom of the display.</div>
|
||||
</div>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="editTickerEnabled" />
|
||||
<label class="form-check-label" for="editTickerEnabled">Enabled</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<label class="form-label" for="editTickerRssUrl">RSS feed URL</label>
|
||||
<input class="form-control" id="editTickerRssUrl" type="url" placeholder="https://example.com/feed.xml" />
|
||||
<div class="form-text">Tip: use a public RSS/Atom feed. Headlines are fetched server-side.</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-2 mt-2">
|
||||
<div class="col-12 col-md-5">
|
||||
<label class="form-label" for="editTickerColor">Text color</label>
|
||||
<input class="form-control form-control-color" id="editTickerColor" type="color" value="#ffffff" title="Choose text color" />
|
||||
</div>
|
||||
<div class="col-12 col-md-5">
|
||||
<label class="form-label" for="editTickerFontSize">Font size (px)</label>
|
||||
<input class="form-control" id="editTickerFontSize" type="number" min="10" max="200" step="1" placeholder="28" />
|
||||
</div>
|
||||
<div class="col-12 col-md-7">
|
||||
<label class="form-label" for="editTickerFontFamily">Font</label>
|
||||
<select class="form-select" id="editTickerFontFamily">
|
||||
<option value="system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif">System (default)</option>
|
||||
<option value="Arial, Helvetica, sans-serif">Arial</option>
|
||||
<option value="Segoe UI, Arial, sans-serif">Segoe UI</option>
|
||||
<option value="Roboto, Arial, sans-serif">Roboto</option>
|
||||
<option value="Georgia, serif">Georgia</option>
|
||||
<option value="Times New Roman, Times, serif">Times New Roman</option>
|
||||
<option value="ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace">Monospace</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-md-7">
|
||||
<label class="form-label" for="editTickerBgColor">Background color</label>
|
||||
<input class="form-control form-control-color" id="editTickerBgColor" type="color" value="#000000" title="Choose background color" />
|
||||
</div>
|
||||
<div class="col-12 col-md-5">
|
||||
<label class="form-label" for="editTickerBgOpacity">Background opacity</label>
|
||||
<input class="form-range" id="editTickerBgOpacity" type="range" min="0" max="100" step="1" />
|
||||
<div class="form-text"><span id="editTickerBgOpacityLabel">75</span>%</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<label class="form-label" for="editTickerSpeed">Speed</label>
|
||||
<input class="form-range" id="editTickerSpeed" type="range" min="1" max="100" step="1" />
|
||||
<div class="form-text">Slower ⟷ Faster</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-check form-switch mb-2">
|
||||
<input class="form-check-input" type="checkbox" id="editTickerEnabled" />
|
||||
<label class="form-check-label" for="editTickerEnabled">
|
||||
Enable ticker tape on this display
|
||||
</label>
|
||||
<div class="form-text">
|
||||
RSS feed + styling is configured in <a href="{{ url_for('company.my_company') }}">My Company</a>.
|
||||
</div>
|
||||
</div>
|
||||
<hr class="my-3" />
|
||||
@@ -382,31 +327,9 @@
|
||||
const plTransitionEl = document.getElementById('editPlaylistsTransitionSelect');
|
||||
const plShowOverlayEl = document.getElementById('editPlaylistsShowOverlayCheck');
|
||||
const tickerEnabledEl = document.getElementById('editTickerEnabled');
|
||||
const tickerRssUrlEl = document.getElementById('editTickerRssUrl');
|
||||
const tickerColorEl = document.getElementById('editTickerColor');
|
||||
const tickerBgColorEl = document.getElementById('editTickerBgColor');
|
||||
const tickerBgOpacityEl = document.getElementById('editTickerBgOpacity');
|
||||
const tickerBgOpacityLabelEl = document.getElementById('editTickerBgOpacityLabel');
|
||||
const tickerFontFamilyEl = document.getElementById('editTickerFontFamily');
|
||||
const tickerFontSizeEl = document.getElementById('editTickerFontSize');
|
||||
const tickerSpeedEl = document.getElementById('editTickerSpeed');
|
||||
let activePlDisplayId = null;
|
||||
let activePlButton = null;
|
||||
|
||||
function setRangeValue(rangeEl, labelEl, value, fallback) {
|
||||
if (!rangeEl) return;
|
||||
const n = parseInt(value || '', 10);
|
||||
const v = Number.isFinite(n) ? n : fallback;
|
||||
rangeEl.value = String(v);
|
||||
if (labelEl) labelEl.textContent = String(v);
|
||||
}
|
||||
|
||||
function onOpacityInput() {
|
||||
if (!tickerBgOpacityEl || !tickerBgOpacityLabelEl) return;
|
||||
tickerBgOpacityLabelEl.textContent = String(tickerBgOpacityEl.value || '0');
|
||||
}
|
||||
if (tickerBgOpacityEl) tickerBgOpacityEl.addEventListener('input', onOpacityInput);
|
||||
|
||||
function updatePlDescCount() {
|
||||
if (!plDescInputEl || !plDescCountEl) return;
|
||||
plDescCountEl.textContent = String((plDescInputEl.value || '').length);
|
||||
@@ -477,14 +400,6 @@
|
||||
const raw = (btn.dataset.currentTickerEnabled || '').toLowerCase();
|
||||
tickerEnabledEl.checked = raw === '1' || raw === 'true' || raw === 'yes' || raw === 'on';
|
||||
}
|
||||
if (tickerRssUrlEl) tickerRssUrlEl.value = btn.dataset.currentTickerRssUrl || '';
|
||||
if (tickerColorEl) tickerColorEl.value = btn.dataset.currentTickerColor || '#ffffff';
|
||||
if (tickerBgColorEl) tickerBgColorEl.value = btn.dataset.currentTickerBgColor || '#000000';
|
||||
setRangeValue(tickerBgOpacityEl, tickerBgOpacityLabelEl, btn.dataset.currentTickerBgOpacity, 75);
|
||||
onOpacityInput();
|
||||
if (tickerFontFamilyEl) tickerFontFamilyEl.value = btn.dataset.currentTickerFontFamily || 'system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif';
|
||||
if (tickerFontSizeEl) tickerFontSizeEl.value = btn.dataset.currentTickerFontSizePx || '';
|
||||
setRangeValue(tickerSpeedEl, null, btn.dataset.currentTickerSpeed, 25);
|
||||
|
||||
const selected = computeActiveIdsFromDataset(btn);
|
||||
renderPlaylistCheckboxes(selected);
|
||||
@@ -502,13 +417,6 @@
|
||||
const transition = plTransitionEl ? (plTransitionEl.value || 'none') : 'none';
|
||||
const showOverlay = plShowOverlayEl ? !!plShowOverlayEl.checked : false;
|
||||
const tickerEnabled = tickerEnabledEl ? !!tickerEnabledEl.checked : false;
|
||||
const tickerRssUrl = tickerRssUrlEl ? (tickerRssUrlEl.value || '').trim() : '';
|
||||
const tickerColor = tickerColorEl ? (tickerColorEl.value || '').trim() : '';
|
||||
const tickerBgColor = tickerBgColorEl ? (tickerBgColorEl.value || '').trim() : '';
|
||||
const tickerBgOpacity = tickerBgOpacityEl ? (tickerBgOpacityEl.value || '').trim() : '';
|
||||
const tickerFontFamily = tickerFontFamilyEl ? (tickerFontFamilyEl.value || '').trim() : '';
|
||||
const tickerFontSizePx = tickerFontSizeEl ? (tickerFontSizeEl.value || '').trim() : '';
|
||||
const tickerSpeed = tickerSpeedEl ? (tickerSpeedEl.value || '').trim() : '';
|
||||
plSaveBtn.disabled = true;
|
||||
try {
|
||||
const [updatedPlaylists, updatedDesc] = await Promise.all([
|
||||
@@ -517,14 +425,7 @@
|
||||
description: desc,
|
||||
transition,
|
||||
show_overlay: showOverlay,
|
||||
ticker_enabled: tickerEnabled,
|
||||
ticker_rss_url: tickerRssUrl,
|
||||
ticker_color: tickerColor,
|
||||
ticker_bg_color: tickerBgColor,
|
||||
ticker_bg_opacity: tickerBgOpacity,
|
||||
ticker_font_family: tickerFontFamily,
|
||||
ticker_font_size_px: tickerFontSizePx,
|
||||
ticker_speed: tickerSpeed
|
||||
ticker_enabled: tickerEnabled
|
||||
})
|
||||
]);
|
||||
|
||||
@@ -553,34 +454,6 @@
|
||||
: tickerEnabled;
|
||||
activePlButton.dataset.currentTickerEnabled = newTickerEnabled ? '1' : '0';
|
||||
|
||||
activePlButton.dataset.currentTickerRssUrl = (updatedDesc && typeof updatedDesc.ticker_rss_url === 'string')
|
||||
? (updatedDesc.ticker_rss_url || '')
|
||||
: tickerRssUrl;
|
||||
|
||||
activePlButton.dataset.currentTickerColor = (updatedDesc && typeof updatedDesc.ticker_color === 'string')
|
||||
? (updatedDesc.ticker_color || '')
|
||||
: tickerColor;
|
||||
|
||||
activePlButton.dataset.currentTickerBgColor = (updatedDesc && typeof updatedDesc.ticker_bg_color === 'string')
|
||||
? (updatedDesc.ticker_bg_color || '')
|
||||
: tickerBgColor;
|
||||
|
||||
activePlButton.dataset.currentTickerBgOpacity = (updatedDesc && (typeof updatedDesc.ticker_bg_opacity === 'number' || typeof updatedDesc.ticker_bg_opacity === 'string'))
|
||||
? String(updatedDesc.ticker_bg_opacity || '')
|
||||
: String(tickerBgOpacity || '');
|
||||
|
||||
activePlButton.dataset.currentTickerFontFamily = (updatedDesc && typeof updatedDesc.ticker_font_family === 'string')
|
||||
? (updatedDesc.ticker_font_family || '')
|
||||
: tickerFontFamily;
|
||||
|
||||
activePlButton.dataset.currentTickerFontSizePx = (updatedDesc && (typeof updatedDesc.ticker_font_size_px === 'number' || typeof updatedDesc.ticker_font_size_px === 'string'))
|
||||
? String(updatedDesc.ticker_font_size_px || '')
|
||||
: String(tickerFontSizePx || '');
|
||||
|
||||
activePlButton.dataset.currentTickerSpeed = (updatedDesc && (typeof updatedDesc.ticker_speed === 'number' || typeof updatedDesc.ticker_speed === 'string'))
|
||||
? String(updatedDesc.ticker_speed || '')
|
||||
: String(tickerSpeed || '');
|
||||
|
||||
showToast('Display updated', 'text-bg-success');
|
||||
refreshPreviewIframe(activePlDisplayId);
|
||||
if (plModal) plModal.hide();
|
||||
|
||||
Reference in New Issue
Block a user