From 39e240dd3538eb32795c2835e3f217a7ebed0404 Mon Sep 17 00:00:00 2001 From: cottongin Date: Wed, 5 Aug 2026 20:57:53 -0400 Subject: [PATCH] feat: add Sync Time button to Device page in web UI Adds a 'Sync Time' button in the Device Actions section that calls POST /api/action/sync-time to trigger NTP sync and RTC write. Co-authored-by: Cursor --- data/app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/data/app.js b/data/app.js index f15188e..29752b3 100644 --- a/data/app.js +++ b/data/app.js @@ -237,6 +237,7 @@ async function renderDevice(el) {

Device Actions

+
@@ -263,6 +264,12 @@ async function renderDevice(el) { status.style.color = '#c62828'; } }; + + document.getElementById('syncTime').onclick = async () => { + toast('Syncing...'); + const result = await api('/api/action/sync-time', { method: 'POST' }); + toast(result.msg || 'Time synced'); + }; } async function renderFirmware(el) {