Fix: show profile/logout buttons immediately after login, smaller with icons
This commit is contained in:
@@ -35,6 +35,10 @@ a:hover { text-decoration: underline; }
|
|||||||
cursor: pointer; color: var(--black); transition: all .2s;
|
cursor: pointer; color: var(--black); transition: all .2s;
|
||||||
}
|
}
|
||||||
.lang-btn.active { background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
|
.lang-btn.active { background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
|
||||||
|
.brand { display: flex; align-items: center; gap: 16px; }
|
||||||
|
.user-actions { display: flex; gap: 8px; align-items: center; }
|
||||||
|
.user-btn { padding: 6px 12px; font-size: .75rem; border-radius: 6px; display: flex; align-items: center; gap: 6px; }
|
||||||
|
.user-btn svg { width: 16px; height: 16px; fill: currentColor; }
|
||||||
|
|
||||||
.intro { padding: 48px 0 32px; text-align: center; }
|
.intro { padding: 48px 0 32px; text-align: center; }
|
||||||
.intro h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
|
.intro h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
|
||||||
|
|||||||
+8
-2
@@ -20,8 +20,14 @@
|
|||||||
<button class="lang-btn" data-lang="en">EN</button>
|
<button class="lang-btn" data-lang="en">EN</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-actions hidden">
|
<div class="user-actions hidden">
|
||||||
<button class="btn-secondary user-btn" onclick="openProfileModal()"><span class="hide-de">Profil</span><span class="hide-en">Profile</span></button>
|
<button class="btn-secondary user-btn" onclick="openProfileModal()">
|
||||||
<button class="btn-secondary user-btn" onclick="logout()"><span class="hide-de">Abmelden</span><span class="hide-en">Logout</span></button>
|
<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>
|
||||||
|
</button>
|
||||||
|
<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>
|
||||||
|
<span class="hide-de">Abmelden</span><span class="hide-en">Logout</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ async function submitLoginData() {
|
|||||||
document.getElementById('profile-username').value = document.getElementById('telegram-user').value;
|
document.getElementById('profile-username').value = document.getElementById('telegram-user').value;
|
||||||
document.getElementById('profile-name').value = document.getElementById('full-name').value;
|
document.getElementById('profile-name').value = document.getElementById('full-name').value;
|
||||||
document.getElementById('profile-llc').value = document.getElementById('llc-name').value;
|
document.getElementById('profile-llc').value = document.getElementById('llc-name').value;
|
||||||
|
document.querySelectorAll('.user-actions').forEach(el => el.classList.remove('hidden'));
|
||||||
alert('Erfolgreich angemeldet! Willkommen!');
|
alert('Erfolgreich angemeldet! Willkommen!');
|
||||||
} else {
|
} else {
|
||||||
alert('Fehler bei der Anmeldung.');
|
alert('Fehler bei der Anmeldung.');
|
||||||
|
|||||||
Reference in New Issue
Block a user