diff --git a/internal/web/assets/admin.js b/internal/web/assets/admin.js index 5199b85..1a08bee 100644 --- a/internal/web/assets/admin.js +++ b/internal/web/assets/admin.js @@ -553,7 +553,9 @@ async function notifications() { if (state.page !== "notifications") return; state.notif = d; const p = d.prefs; - const others = d.devices.length - (here ? 1 : 0); + // The count row is only worth showing when there's a device besides this one. + const total = d.devices.length; + const others = total - (here ? 1 : 0); const row = (label, help, control) => `
${label}${help ? `

${help}

` : ""}
${control}
@@ -576,7 +578,7 @@ async function notifications() {

Devices

${device} - ${others > 0 ? row(`${here ? "Other devices" : "Your devices"}`, `${others} ${others === 1 ? "device has" : "devices have"} notifications on.`, '') : ""} + ${others > 0 ? row("Your devices", `${total} ${total === 1 ? "device has" : "devices have"} notifications on${here ? ", this one included" : ", not this one"}.`, '') : ""}