diff --git a/src/element/Relay.css b/src/element/Relay.css index a83c468c..76bf2a6b 100644 --- a/src/element/Relay.css +++ b/src/element/Relay.css @@ -12,9 +12,6 @@ padding: 5px; } -.relay > div:first-child { -} - .relay-extra { padding: 5px; margin: 0 5px; diff --git a/src/index.css b/src/index.css index 94dfaa54..ab527102 100644 --- a/src/index.css +++ b/src/index.css @@ -111,7 +111,7 @@ code { } .btn-rnd { - border-radius: 25px; + border-radius: 100%; } textarea { diff --git a/src/nostr/Connection.js b/src/nostr/Connection.js index efd1a5c1..40c001e3 100644 --- a/src/nostr/Connection.js +++ b/src/nostr/Connection.js @@ -211,7 +211,7 @@ export default class Connection { this.CurrentState.events.send = this.Stats.EventsSent; this.CurrentState.avgLatency = this.Stats.Latency.length > 0 ? (this.Stats.Latency.reduce((acc, v) => acc + v, 0) / this.Stats.Latency.length) : 0; this.CurrentState.disconnects = this.Stats.Disconnects; - this.Stats.Latency = this.Stats.Latency.slice(this.Stats.Latency.length - 20); // trim + this.Stats.Latency = this.Stats.Latency.slice(-20); // trim this.HasStateChange = true; this._NotifyState(); } diff --git a/src/pages/Layout.css b/src/pages/Layout.css index e4f7bfa9..9add2f2a 100644 --- a/src/pages/Layout.css +++ b/src/pages/Layout.css @@ -1,7 +1,15 @@ -.notifications { - margin-right: 10px; -} - .unread-count { - margin-left: .2em; + width: 20px; + height: 20px; + border: 1px solid; + border-radius: 100%; + position: relative; + padding: 3px; + line-height: 1.5em; + top: -10px; + left: -10px; + font-size: small; + background-color: var(--error); + font-weight: bold; + text-align: center; } diff --git a/src/pages/Layout.js b/src/pages/Layout.js index b0801992..d853941e 100644 --- a/src/pages/Layout.js +++ b/src/pages/Layout.js @@ -59,12 +59,10 @@ export default function Layout(props) { <>
goToNotifications(e)}> - {unreadNotifications !== 0 && ( - - {unreadNotifications} - - )}
+ + {unreadNotifications > 1000 ? "..." : unreadNotifications} + )