espid2sensor: Logout-Button und Fix für dauerhafte "User gelöscht"-Meldung
Logout-Button rechts in der Tab-Zeile ergänzt. Die Bestätigungsmeldung nach dem Löschen eines Users blieb bisher beim erneuten Öffnen des User-Tabs stehen; sie wird jetzt beim (Wieder-)Betreten des Tabs zurückgesetzt. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "espid2sensor",
|
"name": "espid2sensor",
|
||||||
"version": "1.5.0",
|
"version": "1.6.0",
|
||||||
"date": "2026-08-07",
|
"date": "2026-08-07",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "Kleine Webapp ESP-ID <-> Sensornummer, speichern in MongoDB",
|
"description": "Kleine Webapp ESP-ID <-> Sensornummer, speichern in MongoDB",
|
||||||
|
|||||||
@@ -585,7 +585,12 @@ function showModal(message, showCancelButton, callback) {
|
|||||||
tabInput.addEventListener('click', () => showTab('input'))
|
tabInput.addEventListener('click', () => showTab('input'))
|
||||||
tabList.addEventListener('click', () => showTab('list'))
|
tabList.addEventListener('click', () => showTab('list'))
|
||||||
const tabUser = document.getElementById('tabUser');
|
const tabUser = document.getElementById('tabUser');
|
||||||
if (tabUser) tabUser.addEventListener('click', () => { showTab('user'); loadUsers(); })
|
if (tabUser) tabUser.addEventListener('click', () => {
|
||||||
|
showTab('user');
|
||||||
|
const usersResult = document.getElementById('usersResult');
|
||||||
|
if (usersResult) usersResult.textContent = '';
|
||||||
|
loadUsers();
|
||||||
|
})
|
||||||
|
|
||||||
loadEntries();
|
loadEntries();
|
||||||
window.loadUsers = loadUsers;
|
window.loadUsers = loadUsers;
|
||||||
|
|||||||
@@ -26,6 +26,19 @@
|
|||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#logoutBtn {
|
||||||
|
margin-left: auto;
|
||||||
|
align-self: center;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 500;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 0.7rem 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#logoutBtn:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
/* Modal Fehlerfenster */
|
/* Modal Fehlerfenster */
|
||||||
.custom-modal-popup {
|
.custom-modal-popup {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ html(lang="de")
|
|||||||
button.tab-btn#tabProfile(type="button" onclick="showTab('profile')") Profil
|
button.tab-btn#tabProfile(type="button" onclick="showTab('profile')") Profil
|
||||||
if isAdmin
|
if isAdmin
|
||||||
button.tab-btn#tabUser(type="button" onclick="showTab('user')") User
|
button.tab-btn#tabUser(type="button" onclick="showTab('user')") User
|
||||||
|
a#logoutBtn(href="/logout") Logout
|
||||||
|
|
||||||
// Eingabe-Tab
|
// Eingabe-Tab
|
||||||
div#tabInputContent.tab-content
|
div#tabInputContent.tab-content
|
||||||
|
|||||||
Reference in New Issue
Block a user