Made it say Ready~
This commit is contained in:
parent
4adf3d80a1
commit
4bc23eabc4
1 changed files with 3 additions and 3 deletions
|
@ -418,7 +418,7 @@ window.Umi = { UI: {}, Protocol: { SockChat: { Protocol: {} } } };
|
|||
const pingIndicator = new MamiPingIndicator;
|
||||
const pingToggle = Umi.UI.Toggles.Add('ping', {
|
||||
click: () => alert(pingToggle.title),
|
||||
}, 'Ready!');
|
||||
}, 'Ready~');
|
||||
pingToggle.appendChild(pingIndicator.getElement());
|
||||
console.log(pingIndicator);
|
||||
|
||||
|
@ -623,8 +623,8 @@ window.Umi = { UI: {}, Protocol: { SockChat: { Protocol: {} } } };
|
|||
if(dumpEvents) console.log('ping:recv', recv);
|
||||
|
||||
let strength = 3;
|
||||
if(recv.diff > 1000) --strength;
|
||||
if(recv.diff > 250) --strength;
|
||||
if(recv.diff >= 1000) --strength;
|
||||
if(recv.diff >= 250) --strength;
|
||||
|
||||
pingToggle.title = `${recv.diff.toLocaleString()}ms`;
|
||||
pingIndicator.setStrength(strength);
|
||||
|
|
Loading…
Reference in a new issue