Release v2.5.4

This commit is contained in:
2026-08-03 21:20:54 +01:00
parent a5e8ecb21f
commit a45552fed3
22 changed files with 371 additions and 9 deletions
+11
View File
@@ -2,7 +2,17 @@
const { renderView } = require('../../../view');
function normalizeBaseUrl(value) {
return String(value || '').trim().replace(/\/$/, '');
}
module.exports = function renderDashboardPage(data, message, currentUser) {
const primaryPlayerUrl = Array.isArray(data.screens)
? String((data.screens.find(function (screen) {
return screen && String(screen.public_base_url || '').trim();
}) || {}).public_base_url || '').trim()
: '';
return renderView('dashboard/index', {
title: 'Dashboard',
active: 'dashboard',
@@ -13,6 +23,7 @@ module.exports = function renderDashboardPage(data, message, currentUser) {
clients: data.clients || [],
slides: data.slides || [],
connectedClientsCount: Number(data.connectedClientsCount || 0),
primaryPlayerUrl: normalizeBaseUrl(primaryPlayerUrl) || null,
scripts: ['js/dashboard/dashboard-page.js']
});
};