Remove login form, update Telegram link, fix profile modal layout
This commit is contained in:
+14
-57
@@ -22,7 +22,7 @@
|
|||||||
<div class="user-actions hidden">
|
<div class="user-actions hidden">
|
||||||
<button class="btn-secondary user-btn" onclick="openProfileModal()">
|
<button class="btn-secondary user-btn" onclick="openProfileModal()">
|
||||||
<svg viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
|
<svg viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
|
||||||
<span class="hide-de">Profil</span><span class="hide-en">Profile</span>
|
<span class="hide-de">Dein Profil</span><span class="hide-en">Your Profile</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn-secondary user-btn" onclick="logout()">
|
<button class="btn-secondary user-btn" onclick="logout()">
|
||||||
<svg viewBox="0 0 24 24"><path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"/></svg>
|
<svg viewBox="0 0 24 24"><path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"/></svg>
|
||||||
@@ -59,64 +59,19 @@
|
|||||||
<p class="hide-de">Die Website paraguay.odoo4projects.com bietet weiterführende Informationen: Wiki, Teilnehmerliste, Anmeldung für die Gruppe und mehr.</p>
|
<p class="hide-de">Die Website paraguay.odoo4projects.com bietet weiterführende Informationen: Wiki, Teilnehmerliste, Anmeldung für die Gruppe und mehr.</p>
|
||||||
<p class="hide-en">The website paraguay.odoo4projects.com offers additional resources: wiki, member list, group registration and more.</p>
|
<p class="hide-en">The website paraguay.odoo4projects.com offers additional resources: wiki, member list, group registration and more.</p>
|
||||||
<div style="margin-top: 24px; padding: 20px; background: var(--gray1); border-radius: 12px; text-align: center;">
|
<div style="margin-top: 24px; padding: 20px; background: var(--gray1); border-radius: 12px; text-align: center;">
|
||||||
<p style="font-size: 1.2rem; font-weight: 700; margin-bottom: 12px;">
|
<p style="font-size: 1.1rem; font-weight: 700; margin-bottom: 12px;">
|
||||||
<span class="hide-de">Melden Sie sich bei unserem Bot im Channel an</span>
|
<span class="hide-de">Tritt unserer Telegram-Gruppe bei!</span>
|
||||||
<span class="hide-en">Login to our bot in the channel</span>
|
<span class="hide-en">Join our Telegram group!</span>
|
||||||
</p>
|
</p>
|
||||||
<p style="font-size: 1rem; color: #4b5563; margin-bottom: 16px;">
|
<a href="https://t.me/+2s0N78kM5n4xMzBi" class="btn-primary" style="display: inline-block; background: #2AABEE;">
|
||||||
<span class="hide-de">senden Sie /start</span>
|
<span class="hide-de">Telegram Gruppe beitreten</span>
|
||||||
<span class="hide-en">send /start</span>
|
<span class="hide-en">Join Telegram Group</span>
|
||||||
</p>
|
|
||||||
<a href="https://t.me/paraguaysrcllc_bot" class="btn-primary" style="display: inline-block; background: #2AABEE;">
|
|
||||||
<span class="hide-de">Telegram beitreten</span>
|
|
||||||
<span class="hide-en">Join Telegram</span>
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<aside class="sidebar-col" id="login-panel">
|
<aside class="sidebar-col" id="login-panel">
|
||||||
<div class="login-panel">
|
<div class="newsletter-panel" id="newsletter-panel">
|
||||||
<h3 class="hide-de">Anmeldung</h3>
|
|
||||||
<h3 class="hide-en">Login</h3>
|
|
||||||
<form id="login-form">
|
|
||||||
<div id="login-step-1">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="telegram-user" class="hide-de">Telegram Nutzername</label>
|
|
||||||
<label for="telegram-user" class="hide-en">Telegram Username</label>
|
|
||||||
<input type="text" id="telegram-user" required placeholder="@username" />
|
|
||||||
</div>
|
|
||||||
<button type="button" class="btn-primary hide-de" onclick="sendTelegramUser()">Anmelden</button>
|
|
||||||
<button type="button" class="btn-primary hide-en" onclick="sendTelegramUser()">Login</button>
|
|
||||||
<p class="hide-de" style="font-size: .85rem; color: #6b7280; margin-top: 12px;">Wir senden einen Code an Ihren Telegram-Account.</p>
|
|
||||||
<p class="hide-en" style="font-size: .85rem; color: #6b7280; margin-top: 12px;">We'll send a code to your Telegram account.</p>
|
|
||||||
</div>
|
|
||||||
<div id="login-step-2" class="hidden">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="verification-code" class="hide-de">Verifizierungscode</label>
|
|
||||||
<label for="verification-code" class="hide-en">Verification code</label>
|
|
||||||
<input type="text" id="verification-code" required placeholder="123456" />
|
|
||||||
</div>
|
|
||||||
<button type="button" class="btn-primary hide-de" onclick="verifyCode()">Anmelden</button>
|
|
||||||
<button type="button" class="btn-primary hide-en" onclick="verifyCode()">Login</button>
|
|
||||||
</div>
|
|
||||||
<div id="login-step-3" class="hidden">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="full-name" class="hide-de">Vollständiger Name</label>
|
|
||||||
<label for="full-name" class="hide-en">Full name</label>
|
|
||||||
<input type="text" id="full-name" required placeholder="Max Mustermann" />
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="llc-name" class="hide-de">Name der LLC / SRL</label>
|
|
||||||
<label for="llc-name" class="hide-en">LLC / SRL name</label>
|
|
||||||
<input type="text" id="llc-name" required placeholder="Paraguay LLC" />
|
|
||||||
</div>
|
|
||||||
<button type="button" class="btn-primary hide-de" onclick="submitLoginData()">Anmelden</button>
|
|
||||||
<button type="button" class="btn-primary hide-en" onclick="submitLoginData()">Login</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="newsletter-panel hidden" id="newsletter-panel-inner">
|
|
||||||
<h3 class="hide-de">Newsletter</h3>
|
<h3 class="hide-de">Newsletter</h3>
|
||||||
<h3 class="hide-en">Newsletter</h3>
|
<h3 class="hide-en">Newsletter</h3>
|
||||||
<form id="newsletter-form">
|
<form id="newsletter-form">
|
||||||
@@ -175,13 +130,15 @@
|
|||||||
<div id="profile-modal" class="modal hidden">
|
<div id="profile-modal" class="modal hidden">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<span class="close-btn" onclick="closeProfileModal()">×</span>
|
<span class="close-btn" onclick="closeProfileModal()">×</span>
|
||||||
<h3 class="hide-de">Profil bearbeiten</h3>
|
<h3 class="hide-de">Dein Profil</h3>
|
||||||
<h3 class="hide-en">Edit Profile</h3>
|
<h3 class="hide-en">Your Profile</h3>
|
||||||
<div class="profile-form">
|
<div class="profile-form">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="username-display" id="profile-username-display">odoo4projects</div>
|
<div style="display: flex; align-items: center; gap: 8px; flex-wrap: wrap;">
|
||||||
<div style="display: flex; align-items: center; gap: 8px; margin-top: 12px;">
|
<span id="profile-username-display" class="username-display" style="margin: 0;"></span>
|
||||||
<input type="checkbox" id="profile-publish" />
|
<input type="checkbox" id="profile-publish" />
|
||||||
|
<label for="profile-publish" class="hide-de" style="display: inline; font-size: .85rem; font-weight: 600;">Veröffentlichen</label>
|
||||||
|
<label for="profile-publish" class="hide-en" style="display: inline; font-size: .85rem; font-weight: 600;">Publish</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="profile-edit-fields" class="hidden">
|
<div id="profile-edit-fields" class="hidden">
|
||||||
|
|||||||
+4
-3
@@ -27,20 +27,21 @@ const WIKI_URL = 'https://n8n.odoo4projects.com/webhook/paraguay/wiki';
|
|||||||
|
|
||||||
function checkSession() {
|
function checkSession() {
|
||||||
const sessionid = getCookie('sessionid');
|
const sessionid = getCookie('sessionid');
|
||||||
console.log('checkSession: sessionid =', sessionid);
|
|
||||||
const intro = document.getElementById('intro-section');
|
const intro = document.getElementById('intro-section');
|
||||||
const news = document.getElementById('news-col');
|
const news = document.getElementById('news-col');
|
||||||
const login = document.getElementById('login-panel');
|
const login = document.getElementById('login-panel');
|
||||||
const newsletter = document.querySelector('#login-panel .newsletter-panel');
|
const newsletter = document.getElementById('newsletter-panel');
|
||||||
const notebook = document.getElementById('notebook-panel');
|
const notebook = document.getElementById('notebook-panel');
|
||||||
console.log('checkSession elements:', { intro, news, login, newsletter, notebook });
|
|
||||||
if (sessionid) {
|
if (sessionid) {
|
||||||
|
// User is logged in via n8n cookie
|
||||||
if (intro) intro.classList.add('hidden');
|
if (intro) intro.classList.add('hidden');
|
||||||
if (news) news.classList.add('hidden');
|
if (news) news.classList.add('hidden');
|
||||||
if (login) login.classList.add('hidden');
|
if (login) login.classList.add('hidden');
|
||||||
if (notebook) notebook.classList.remove('hidden');
|
if (notebook) notebook.classList.remove('hidden');
|
||||||
document.querySelectorAll('.user-actions').forEach(el => el.classList.remove('hidden'));
|
document.querySelectorAll('.user-actions').forEach(el => el.classList.remove('hidden'));
|
||||||
|
if (newsletter) newsletter.classList.remove('hidden');
|
||||||
} else {
|
} else {
|
||||||
|
// User is not logged in
|
||||||
if (notebook) notebook.classList.add('hidden');
|
if (notebook) notebook.classList.add('hidden');
|
||||||
if (login) login.classList.remove('hidden');
|
if (login) login.classList.remove('hidden');
|
||||||
if (newsletter) newsletter.classList.remove('hidden');
|
if (newsletter) newsletter.classList.remove('hidden');
|
||||||
|
|||||||
Reference in New Issue
Block a user