mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-21 07:16:18 -04:00
add notification on connect
This commit is contained in:
parent
62b9e4e9e4
commit
fe2422264a
2 changed files with 17 additions and 7 deletions
|
@ -23,7 +23,7 @@ class PeersUI {
|
|||
Events.on('peers', e => this._onPeers(e.detail));
|
||||
Events.on('file-progress', e => this._onFileProgress(e.detail));
|
||||
Events.on('paste', e => this._onPaste(e));
|
||||
Events.on('disconnect', _ => this._clearPeers());
|
||||
Events.on('ws-disconnect', _ => this._clearPeers());
|
||||
this.peers = {};
|
||||
}
|
||||
|
||||
|
@ -523,8 +523,9 @@ class Notifications {
|
|||
class NetworkStatusUI {
|
||||
|
||||
constructor() {
|
||||
Events.on('offline', this._showOfflineMessage);
|
||||
Events.on('online', this._showOnlineMessage);
|
||||
Events.on('offline', _ => this._showOfflineMessage());
|
||||
Events.on('online', _ => this._showOnlineMessage());
|
||||
Events.on('ws-connected', _ => this._showOnlineMessage());
|
||||
if (!navigator.onLine) this._showOfflineMessage();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue