mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-13 19:04:06 +08:00
reorder, rename
This commit is contained in:
parent
e5aff03620
commit
adc2f36c51
2 changed files with 19 additions and 19 deletions
|
|
@ -1131,7 +1131,21 @@ export async function update(
|
|||
TestUI.toggleResultWords(true);
|
||||
}
|
||||
|
||||
updateTribe();
|
||||
updateTribeElements();
|
||||
|
||||
void TribeChat.fill("result").then(() => {
|
||||
TribeChat.scrollChat();
|
||||
});
|
||||
|
||||
const room = TribeState.getRoom();
|
||||
if (room?.users) {
|
||||
for (const userId of Object.keys(room.users)) {
|
||||
if (userId === TribeState.getSelf()?.id) continue;
|
||||
if (room.users[userId]?.isFinished) {
|
||||
void TribeChartController.drawChart(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AdController.updateFooterAndVerticalAds(true);
|
||||
void Funbox.clear();
|
||||
|
|
@ -1149,20 +1163,6 @@ export async function update(
|
|||
duration: Misc.applyReducedMotion(125),
|
||||
});
|
||||
|
||||
void TribeChat.fill("result").then(() => {
|
||||
TribeChat.scrollChat();
|
||||
});
|
||||
|
||||
const room = TribeState.getRoom();
|
||||
if (room?.users) {
|
||||
for (const userId of Object.keys(room.users)) {
|
||||
if (userId === TribeState.getSelf()?.id) continue;
|
||||
if (room.users[userId]?.isFinished) {
|
||||
void TribeChartController.drawChart(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Misc.scrollToCenterOrTop(resultEl);
|
||||
void AdController.renderResult();
|
||||
TestUI.setResultCalculating(false);
|
||||
|
|
@ -1170,7 +1170,7 @@ export async function update(
|
|||
ChartController.result.resize();
|
||||
}
|
||||
|
||||
export function updateTribe(): void {
|
||||
export function updateTribeElements(): void {
|
||||
if (TribeState.isInARoom()) {
|
||||
qs("#result #tribeResultBottom")?.show();
|
||||
qs("#result #restartTestButtonWithSameWordset")?.hide();
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ TribeSocket.in.system.disconnect((reason, details) => {
|
|||
updateClientState(TribeTypes.CLIENT_STATE.DISCONNECTED);
|
||||
TribeDelta.hide();
|
||||
TribeCountdown.hide();
|
||||
Result.updateTribe();
|
||||
Result.updateTribeElements();
|
||||
|
||||
if (!$(".pageTribe").hasClass("active")) {
|
||||
Notifications.add(
|
||||
|
|
@ -314,7 +314,7 @@ TribeSocket.in.system.connectFailed((err) => {
|
|||
customTitle: "Tribe",
|
||||
});
|
||||
}
|
||||
Result.updateTribe();
|
||||
Result.updateTribeElements();
|
||||
TribeState.setSocketId(undefined);
|
||||
TribeState.setRoom(undefined);
|
||||
TribeDelta.hide();
|
||||
|
|
@ -335,7 +335,7 @@ TribeSocket.in.system.connectError((err) => {
|
|||
customTitle: "Tribe",
|
||||
});
|
||||
}
|
||||
Result.updateTribe();
|
||||
Result.updateTribeElements();
|
||||
TribeDelta.hide();
|
||||
TribeCountdown.hide();
|
||||
TribeState.setSocketId(undefined);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue