Release v2.17.4: add API region sorting and indexed placeholders
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile, web, pulse-signage-web) (push) Successful in 1m17s
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile.player, player, pulse-signage-player) (push) Successful in 1m10s

This commit is contained in:
lzstealth committed 2026-10-23 20:54:15 +01:00
1 parent bc8075379a
commit 46636939de
18 files changed
+709 -232

No files matched your search

+5
View File
@@ -466,6 +466,9 @@ async function buildTemplateContent(pool, template, body, filesByField, existing
const sourceId = body[`region_api_source_id_${region.id}`];
const itemNumber = body[`region_api_item_number_${region.id}`];
const itemsPath = body[`region_api_items_path_${region.id}`];
const sortMode = body[`region_api_sort_mode_${region.id}`];
const sortBy = body[`region_api_sort_by_${region.id}`];
const sortDirection = body[`region_api_sort_direction_${region.id}`];
const parsedItemNumber = Math.max(1, Number(itemNumber || current.item_number || 1));
content[region.region_key] = {
type: 'api',
@@ -473,6 +476,8 @@ async function buildTemplateContent(pool, template, body, filesByField, existing
source_id: sourceId === undefined || sourceId === null ? (current.source_id || null) : (sourceId === '' ? null : Number(sourceId)),
item_number: Number.isFinite(parsedItemNumber) && parsedItemNumber > 0 ? parsedItemNumber : 1,
items_path: itemsPath === undefined || itemsPath === null ? (current.items_path === undefined || current.items_path === null ? '' : String(current.items_path)) : String(itemsPath || '').trim(),
sort_by: sortMode === undefined ? String(current.sort_by || '') : (sortMode === 'field' ? String(sortBy || '').trim() : ''),
sort_direction: sortDirection === undefined ? (String(current.sort_direction || '').toLowerCase() === 'desc' ? 'desc' : 'asc') : (sortDirection === 'desc' ? 'desc' : 'asc'),
variable_name: 'item',
font_family: style.font_family,
font_size: style.font_size,