Login button: open Telegram bot deep-link, no modal; label switches to 'Approve in Telegram' and locks
This commit is contained in:
@@ -577,6 +577,12 @@ body {
|
||||
color: #1c1e21;
|
||||
border: none;
|
||||
}
|
||||
/* Login button after Telegram was triggered — no longer clickable */
|
||||
.btn-locked {
|
||||
opacity: 0.55;
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
}
|
||||
.btn-outline:hover {
|
||||
background: #e4e6eb;
|
||||
transform: translateY(-1px);
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@
|
||||
<button class="lang-btn" data-lang="de">DE</button>
|
||||
<button class="lang-btn" data-lang="en">EN</button>
|
||||
</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-en">Login</span>
|
||||
</a>
|
||||
|
||||
+5
-2
@@ -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');
|
||||
if (loginBtn) {
|
||||
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');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user