MCPcopy Create free account
hub / github.com/SnapDrop/snapdrop / NetworkStatusUI

Class NetworkStatusUI

client/scripts/ui.js:492–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490
491
492class NetworkStatusUI {
493
494 constructor() {
495 window.addEventListener('offline', e => this._showOfflineMessage(), false);
496 window.addEventListener('online', e => this._showOnlineMessage(), false);
497 if (!navigator.onLine) this._showOfflineMessage();
498 }
499
500 _showOfflineMessage() {
501 Events.fire('notify-user', 'You are offline');
502 }
503
504 _showOnlineMessage() {
505 Events.fire('notify-user', 'You are back online');
506 }
507}
508
509class WebShareTargetUI {
510 constructor() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected