mirror of
https://github.com/assenzostefano/Apexie-Website.git
synced 2025-02-16 15:00:41 +01:00
Ok, this is the problem
This commit is contained in:
parent
5e6c202a3b
commit
c99f1e884a
@ -183,7 +183,6 @@ socket.onopen = () => {
|
||||
|
||||
socket.onmessage = (event) => {
|
||||
const data = JSON.parse(event.data);
|
||||
console.log(data);
|
||||
if(data.message === "PREVIEW_USERNAME_MISSING") {
|
||||
if(!isLoggedIn) return alphaPreviewNotLoggedInModal.show();
|
||||
alphaPreviewModal.show();
|
||||
@ -191,6 +190,10 @@ socket.onmessage = (event) => {
|
||||
alphaPreviewUsernameModal.hide();
|
||||
alphaPreviewGeneratedText.textContent = `${alphaPreviewUsername.value}'s preview key has been generated.\nPreview key: ${data.previewKey}`;
|
||||
alphaPreviewGeneratedModal.show();
|
||||
} else if (data.message === "USER_PREVIEW_INFO") {
|
||||
alphaPreviewGeneratedText.textContent = `${data.username}'s preview key is: ${data.previewKey}`;
|
||||
alphaPreviewGeneratedText.textContent = `You've already generated a preview key. Please use the key below to play the preview.\n\nUsername: ${data.username}\nPreview key: ${data.previewKey}`;
|
||||
alphaPreviewGeneratedModal.show();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user