Compare commits
1 Commits
0e344de9c1
...
d6e64763cc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6e64763cc |
@@ -52,6 +52,8 @@ func isStale(lastPing int64) bool {
|
||||
return lastPing == 0
|
||||
}
|
||||
|
||||
var connectionWatcherHandle = templ.NewOnceHandle()
|
||||
|
||||
// ConnectionIndicator shows a small dot indicating SSE connection status.
|
||||
// Server patches this with a timestamp; client JS detects staleness.
|
||||
templ ConnectionIndicator(lastPing int64) {
|
||||
@@ -79,7 +81,9 @@ templ ConnectionIndicator(lastPing int64) {
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
@connectionWatcher()
|
||||
@connectionWatcherHandle.Once() {
|
||||
@connectionWatcher()
|
||||
}
|
||||
}
|
||||
|
||||
script connectionWatcher() {
|
||||
|
||||
Reference in New Issue
Block a user