diff --git a/frontend/src/devices/DeviceDetail.jsx b/frontend/src/devices/DeviceDetail.jsx index b02c1ab..cc37642 100644 --- a/frontend/src/devices/DeviceDetail.jsx +++ b/frontend/src/devices/DeviceDetail.jsx @@ -59,7 +59,7 @@ function Subsection({ title, children, isFirst = false }) { return (

{title}

-
{children}
+
{children}
); } @@ -298,10 +298,10 @@ export default function DeviceDetail() { )} -
+
{/* Basic Information */} -
+
{device.device_id} @@ -321,12 +321,12 @@ export default function DeviceDetail() { {/* Misc */} -
+
{attr.deviceLocale || "-"} {device.websocket_url} -
+
{device.churchAssistantURL}
@@ -334,7 +334,7 @@ export default function DeviceDetail() { {/* Subscription */} -
+
{sub.subscrTier} @@ -452,7 +452,7 @@ export default function DeviceDetail() { {device.device_melodies_all?.length ?? 0} {device.device_melodies_favorites?.length ?? 0} {stats.perBellStrikes?.length > 0 && ( -
+
{stats.perBellStrikes.slice(0, attr.totalBells || stats.perBellStrikes.length).map((count, i) => ( @@ -506,73 +506,108 @@ export default function DeviceDetail() { )} - {/* Device Settings — spans 2 columns on ultrawide */} -
- - {/* Subsection 1: Basic Attributes */} - - - - - + {/* Device Settings */} + +
+ {/* Left Column */} +
+ {/* Basic Attributes */} + + + + + - {/* Subsection 2: Bell Settings */} - - - {attr.totalBells} - {attr.bellOutputs?.length > 0 ? attr.bellOutputs.join(", ") : "-"} - {attr.hammerTimings?.length > 0 ? attr.hammerTimings.join(", ") : "-"} - - - {/* Subsection 3.1: Clock Settings */} - - - {clock.clockOutputs?.[0] ?? "-"} - {clock.clockOutputs?.[1] ?? "-"} - {clock.clockTimings?.[0] != null ? msToSeconds(clock.clockTimings[0]) : "-"} - {clock.clockTimings?.[1] != null ? msToSeconds(clock.clockTimings[1]) : "-"} - - {clock.ringAlerts || "-"} - {clock.ringIntervals} - {clock.hourAlertsBell} - {clock.halfhourAlertsBell} - {clock.quarterAlertsBell} - - {clock.isDaySilenceOn && ( - + {/* Alert Settings */} + + + {clock.ringAlerts || "-"} + {clock.ringIntervals} + {clock.hourAlertsBell} + {clock.halfhourAlertsBell} + {clock.quarterAlertsBell} + + {formatTimestamp(clock.daySilenceFrom)} - {formatTimestamp(clock.daySilenceTo)} - )} - - {clock.isNightSilenceOn && ( + {formatTimestamp(clock.nightSilenceFrom)} - {formatTimestamp(clock.nightSilenceTo)} - )} - + - {/* Subsection 3.2: Backlight Settings */} - - - {clock.backlightOutput} - {formatTimestamp(clock.backlightTurnOnTime)} - {formatTimestamp(clock.backlightTurnOffTime)} - + {/* Backlight Settings */} + + + {clock.backlightOutput} + + {formatTimestamp(clock.backlightTurnOnTime)} - {formatTimestamp(clock.backlightTurnOffTime)} + + - {/* Subsection 4: Network */} - - {net.hostname} - - + {/* Logging */} + + {attr.serialLogLevel} + {attr.sdLogLevel} + {attr.mqttLogLevel ?? 0} + +
- {/* Subsection 5: Logging */} - - {attr.serialLogLevel} - {attr.sdLogLevel} - {attr.mqttLogLevel ?? 0} - - -
+ {/* Right Column */} +
+ {/* Network */} + + {net.hostname} + + + + {/* Clock Settings */} + + + {clock.ringIntervals} + {clock.clockOutputs?.[0] ?? "-"} + {clock.clockOutputs?.[1] ?? "-"} + {clock.clockTimings?.[0] != null ? msToSeconds(clock.clockTimings[0]) : "-"} + {clock.clockTimings?.[1] != null ? msToSeconds(clock.clockTimings[1]) : "-"} + + + {/* Bell Settings */} + + + {attr.totalBells ?? "-"} + {/* Bell Output-to-Timing mapping */} + {attr.bellOutputs?.length > 0 && ( +
+
+ Output & Timing Map +
+
+ {attr.bellOutputs.map((output, i) => ( +
+
+ Bell {i + 1} +
+
+ Output {output} +
+
+ {attr.hammerTimings?.[i] != null ? ( + <>{attr.hammerTimings[i]} ms + ) : "-"} +
+
+ ))} +
+
+ )} +
+
+
+ {/* Equipment Notes */}