mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-21 07:16:18 -04:00
remove forceDisconnect() and add change name notification
This commit is contained in:
parent
cb86e96ffc
commit
1b7aced340
2 changed files with 8 additions and 10 deletions
|
@ -9,6 +9,9 @@ window.iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|||
Events.on('display-name', e => {
|
||||
const me = e.detail.message;
|
||||
const $displayName = $('displayName')
|
||||
if ($displayName.textContent !== '') {
|
||||
Events.fire('notify-user', 'Your name has changed.');
|
||||
}
|
||||
$displayName.textContent = 'You are known as ' + me.displayName;
|
||||
$displayName.title = me.deviceName;
|
||||
});
|
||||
|
@ -65,6 +68,7 @@ class PeersUI {
|
|||
_clearPeers() {
|
||||
const $peers = $$('x-peers').innerHTML = '';
|
||||
Object.keys(this.peers).forEach(peerId => delete this.peers[peerId]);
|
||||
setTimeout(e => window.animateBackground(true), 1750); // Start animation again
|
||||
}
|
||||
|
||||
_onPaste(e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue