feat: Implement rulesets and layout management for kiosk plugin

- Added rulesets manager to handle various data types and updates via HTTP and WebSocket.
- Introduced layout store for managing kiosk layouts with caching and server synchronization.
- Enhanced dashboard and data routes to support new layout and ruleset features.
- Updated kiosk HTML and JavaScript to utilize new layout rendering and data binding.
- Removed obsolete map route and integrated map functionality into the new tile renderer.
- Improved Telegram commands to reflect changes in data structure and logging.
- Refactored weather fetching intervals to prevent multiple instances.
- Added SSE stream for real-time layout updates in the kiosk.
This commit is contained in:
Giuseppe Raffa
2026-05-12 10:17:54 +02:00
parent bb8d267cd4
commit c2c1598226
27 changed files with 1061 additions and 326 deletions

View File

@@ -39,7 +39,7 @@ module.exports = {
}
// Mare
const marine = skFlow.getWithFilter('meb.marine');
const marine = skFlow.getWithFilter('meb.waves');
text += '\n*Dati Meteo del mare*\n\n';
if (marine && Object.keys(marine).length > 0) {
for (const [path, value] of Object.entries(marine)) {
@@ -50,7 +50,7 @@ module.exports = {
text += 'Nessun dato disponibile.\n';
}
bot.sendMessage(chatId, text, {
return bot.sendMessage(chatId, text, {
parse_mode: 'Markdown',
reply_to_message_id: msg.message_id,
reply_markup: liveMarkup(msg.message_id, 'data')

View File

@@ -8,7 +8,7 @@ module.exports = {
const logs = await recorder.listLogs();
if (!logs || logs.length === 0) {
bot.sendMessage(chatId, 'Nessun file di log disponibile.', {
await bot.sendMessage(chatId, 'Nessun file di log disponibile.', {
reply_to_message_id: msg.message_id,
reply_markup: closeButton(msg.message_id)
});
@@ -44,7 +44,7 @@ module.exports = {
// Aggiungi il bottone chiudi
keyboard.push([{ text: '<- Chiudi', callback_data: `close:${msg.message_id}` }]);
bot.sendMessage(chatId, text, {
await bot.sendMessage(chatId, text, {
parse_mode: 'Markdown',
reply_to_message_id: msg.message_id,
reply_markup: { inline_keyboard: keyboard }