Spaces:
Sleeping
Sleeping
DmitrMakeev
commited on
Commit
•
6b24961
1
Parent(s):
15790cd
Update online.html
Browse files- online.html +6 -1
online.html
CHANGED
@@ -103,6 +103,7 @@
|
|
103 |
<div class="qr-container">
|
104 |
<p id="statusText"></p>
|
105 |
<img id="qrCode" src="" alt="QR Code" hidden>
|
|
|
106 |
</div>
|
107 |
</div>
|
108 |
|
@@ -120,17 +121,21 @@
|
|
120 |
.then(data => {
|
121 |
const qrCodeElement = document.getElementById("qrCode");
|
122 |
const statusText = document.getElementById("statusText");
|
|
|
123 |
|
124 |
if (data.type === 'qrCode') {
|
125 |
qrCodeElement.src = `data:image/png;base64,${data.message}`;
|
126 |
qrCodeElement.hidden = false;
|
|
|
127 |
statusText.textContent = "";
|
128 |
} else if (data.type === 'error') {
|
129 |
qrCodeElement.hidden = true;
|
|
|
130 |
statusText.textContent = `Error: ${data.message}`;
|
131 |
} else if (data.type === 'alreadyLogged') {
|
132 |
qrCodeElement.hidden = true;
|
133 |
-
|
|
|
134 |
}
|
135 |
})
|
136 |
.catch(error => {
|
|
|
103 |
<div class="qr-container">
|
104 |
<p id="statusText"></p>
|
105 |
<img id="qrCode" src="" alt="QR Code" hidden>
|
106 |
+
<div id="successMessage" class="success-message" hidden>Аккаунт авторизирован!<br>API рассылка активна.</div>
|
107 |
</div>
|
108 |
</div>
|
109 |
|
|
|
121 |
.then(data => {
|
122 |
const qrCodeElement = document.getElementById("qrCode");
|
123 |
const statusText = document.getElementById("statusText");
|
124 |
+
const successMessage = document.getElementById("successMessage");
|
125 |
|
126 |
if (data.type === 'qrCode') {
|
127 |
qrCodeElement.src = `data:image/png;base64,${data.message}`;
|
128 |
qrCodeElement.hidden = false;
|
129 |
+
successMessage.hidden = true;
|
130 |
statusText.textContent = "";
|
131 |
} else if (data.type === 'error') {
|
132 |
qrCodeElement.hidden = true;
|
133 |
+
successMessage.hidden = true;
|
134 |
statusText.textContent = `Error: ${data.message}`;
|
135 |
} else if (data.type === 'alreadyLogged') {
|
136 |
qrCodeElement.hidden = true;
|
137 |
+
successMessage.hidden = false;
|
138 |
+
statusText.textContent = "";
|
139 |
}
|
140 |
})
|
141 |
.catch(error => {
|