commit 85dedf03ceda52116a139165fd07ae44215e790d
parent 612d8cf1ea0733499d0e55399aeaaf0e819e142d
Author: RobinLinus <robinlinus@users.noreply.github.com>
Date: Wed, 16 Dec 2020 04:16:53 +0100
Cleanup
Diffstat:
4 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/client/scripts/network.js b/client/scripts/network.js
@@ -41,8 +41,8 @@ class ServerConnection {
case 'ping':
this.send({ type: 'pong' });
break;
- case 'displayName':
- Events.fire('displayName', msg);
+ case 'display-name':
+ Events.fire('display-name', msg);
break;
default:
console.error('WS: unkown message type', msg);
diff --git a/client/scripts/ui.js b/client/scripts/ui.js
@@ -6,8 +6,8 @@ window.isProductionEnvironment = !window.location.host.startsWith('localhost');
window.iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
// set display name
-Events.on('displayName', e => {
- $("displayName").textContent = "You are known as " + e.detail.message;
+Events.on('display-name', e => {
+ $('displayName').textContent = 'You are known as ' + e.detail.message;
});
class PeersUI {
diff --git a/client/styles.css b/client/styles.css
@@ -593,6 +593,7 @@ x-instructions {
opacity: 0.5;
transition: opacity 300ms;
z-index: -1;
+ text-align: center;
}
x-instructions:before {
diff --git a/server/index.js b/server/index.js
@@ -19,7 +19,7 @@ class SnapdropServer {
this._keepAlive(peer);
// send displayName
- this._send(peer, { type: 'displayName', message: peer.name.displayName });
+ this._send(peer, { type: 'display-name', message: peer.name.displayName });
}
_onHeaders(headers, response) {