Login button: open Telegram bot deep-link, no modal; label switches to 'Approve in Telegram' and locks

This commit is contained in:
Kato
2026-09-05 18:53:44 +00:00
parent 13b1b773c6
commit 3d1b577cb1
3 changed files with 12 additions and 3 deletions
+6
View File
@@ -577,6 +577,12 @@ body {
color: #1c1e21; color: #1c1e21;
border: none; border: none;
} }
/* Login button after Telegram was triggered — no longer clickable */
.btn-locked {
opacity: 0.55;
cursor: default;
pointer-events: none;
}
.btn-outline:hover { .btn-outline:hover {
background: #e4e6eb; background: #e4e6eb;
transform: translateY(-1px); transform: translateY(-1px);
+1 -1
View File
@@ -45,7 +45,7 @@
<button class="lang-btn" data-lang="de">DE</button> <button class="lang-btn" data-lang="de">DE</button>
<button class="lang-btn" data-lang="en">EN</button> <button class="lang-btn" data-lang="en">EN</button>
</div> </div>
<a href="https://t.me/+2s0N78kM5n4xMzBi" target="_blank" rel="noopener" class="btn btn-outline" id="login-btn"> <a href="https://t.me/YourBotUsername?start=send_a_login_link" target="_blank" rel="noopener" class="btn btn-outline" id="login-btn">
<span class="hide-de">Anmelden</span> <span class="hide-de">Anmelden</span>
<span class="hide-en">Login</span> <span class="hide-en">Login</span>
</a> </a>
+5 -2
View File
@@ -94,11 +94,14 @@ document.addEventListener('DOMContentLoaded', () => {
} }
}); });
// Login button // Login button — opens Telegram bot deep-link, then locks itself
const loginBtn = document.getElementById('login-btn'); const loginBtn = document.getElementById('login-btn');
if (loginBtn) { if (loginBtn) {
loginBtn.addEventListener('click', () => { loginBtn.addEventListener('click', () => {
openLoginModal(); // No modal: swap label, drop the link, make the button unclickable
loginBtn.innerHTML = 'Approve in Telegram';
loginBtn.removeAttribute('href');
loginBtn.classList.add('btn-locked');
}); });
} }