Anpassung Menü

This commit is contained in:
2026-08-09 18:44:21 +02:00
parent b80e2d5a6c
commit 8ffbda875e
13 changed files with 365 additions and 58 deletions

View File

@@ -5,6 +5,7 @@ import { del, get, patch, post } from "../api.js";
import * as db from "../db.js";
import { clear, el, mount } from "../dom.js";
import { set, state } from "../store.js";
import { appBar } from "../appbar.js";
// Welche Zeile hat gerade ihr Menü offen
let openMenuId = null;
@@ -244,11 +245,14 @@ export async function listsView(root, { openList, onLogout, settings }) {
function render() {
mount(root,
el("header.bar", {},
el("span.who", {}, state.user.display_name || state.user.email),
el("span.bar-actions", {},
el("button.linklike", { type: "button", onclick: settings }, "Einstellungen"),
el("button.linklike", { type: "button", onclick: onLogout }, "Abmelden"))),
appBar({
title: state.user.display_name || state.user.email,
actions: [
{ label: "Einstellungen", onClick: settings,
hint: "Benachrichtigungen, Passwort" },
{ label: "Abmelden", onClick: onLogout, danger: true },
],
}),
banner ? el(banner.kind === "error" ? "p.error" : "p.notice", {}, banner.message) : null,