From adf9e685ecccdf3ed40b4b896d3b1a16248eba87 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Sun, 14 Dec 2025 23:10:08 +0100 Subject: [PATCH] luci-app-travelmate: update 2.3.0-2 * fix a small issue in the new log-template Signed-off-by: Dirk Brenken --- applications/luci-app-travelmate/Makefile | 2 +- .../resources/view/travelmate/logtemplate.js | 37 +++++++++---------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/applications/luci-app-travelmate/Makefile b/applications/luci-app-travelmate/Makefile index 4ad673344f..648960f397 100644 --- a/applications/luci-app-travelmate/Makefile +++ b/applications/luci-app-travelmate/Makefile @@ -7,7 +7,7 @@ LUCI_TITLE:=LuCI support for Travelmate LUCI_DEPENDS:=+luci-base +luci-lib-uqr +travelmate PKG_VERSION:=2.3.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=Apache-2.0 PKG_MAINTAINER:=Dirk Brenken diff --git a/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/logtemplate.js b/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/logtemplate.js index 10c552721f..c26aa23bbd 100644 --- a/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/logtemplate.js +++ b/applications/luci-app-travelmate/htdocs/luci-static/resources/view/travelmate/logtemplate.js @@ -18,25 +18,24 @@ function Logview(logtag, name) { const logEl = document.getElementById('logfile'); if (!logEl) return; - const entries = res?.log ?? []; - if (entries.length > 0) { - const filtered = entries - .filter(entry => !logtag || entry.msg.includes(logtag)) - .map(entry => { - const d = new Date(entry.time); - const date = d.toLocaleDateString([], { - year: 'numeric', - month: '2-digit', - day: '2-digit' - }); - const time = d.toLocaleTimeString([], { - hour: '2-digit', - minute: '2-digit', - second: '2-digit', - hour12: false - }); - return `[${date}-${time}] ${entry.msg}`; - }); + const filtered = (res?.log ?? []) + .filter(entry => !logtag || entry.msg.includes(logtag)) + .map(entry => { + const d = new Date(entry.time); + const date = d.toLocaleDateString([], { + year: 'numeric', + month: '2-digit', + day: '2-digit' + }); + const time = d.toLocaleTimeString([], { + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + hour12: false + }); + return `[${date}-${time}] ${entry.msg}`; + }); + if (filtered.length > 0) { logEl.value = filtered.join('\n'); } else { logEl.value = _('No %s related logs yet!').format(name);