mirror of
https://github.com/assenzostefano/Apexie-Website.git
synced 2025-06-27 09:03:04 +02:00
Ok, this is the problem
This commit is contained in:
@@ -183,7 +183,6 @@ socket.onopen = () => {
|
|||||||
|
|
||||||
socket.onmessage = (event) => {
|
socket.onmessage = (event) => {
|
||||||
const data = JSON.parse(event.data);
|
const data = JSON.parse(event.data);
|
||||||
console.log(data);
|
|
||||||
if(data.message === "PREVIEW_USERNAME_MISSING") {
|
if(data.message === "PREVIEW_USERNAME_MISSING") {
|
||||||
if(!isLoggedIn) return alphaPreviewNotLoggedInModal.show();
|
if(!isLoggedIn) return alphaPreviewNotLoggedInModal.show();
|
||||||
alphaPreviewModal.show();
|
alphaPreviewModal.show();
|
||||||
@@ -191,6 +190,10 @@ socket.onmessage = (event) => {
|
|||||||
alphaPreviewUsernameModal.hide();
|
alphaPreviewUsernameModal.hide();
|
||||||
alphaPreviewGeneratedText.textContent = `${alphaPreviewUsername.value}'s preview key has been generated.\nPreview key: ${data.previewKey}`;
|
alphaPreviewGeneratedText.textContent = `${alphaPreviewUsername.value}'s preview key has been generated.\nPreview key: ${data.previewKey}`;
|
||||||
alphaPreviewGeneratedModal.show();
|
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();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user