diff --git a/00-backend/datasource/database.sqlite b/00-backend/datasource/database.sqlite index 073b1b4..246d0e0 100644 Binary files a/00-backend/datasource/database.sqlite and b/00-backend/datasource/database.sqlite differ diff --git a/01-frontend/public/locales/de/translation.json b/01-frontend/public/locales/de/translation.json index 92ff8fe..4332fc3 100644 --- a/01-frontend/public/locales/de/translation.json +++ b/01-frontend/public/locales/de/translation.json @@ -107,5 +107,6 @@ "discount100": "Rabatt in %", "deleteProduct": "Produkt löschen", "description": "Beschreibung", - "images": "Bilder" + "images": "Bilder", + "loggedInAs": "Angemeldet als" } diff --git a/01-frontend/public/locales/en/translation.json b/01-frontend/public/locales/en/translation.json index 83d0cad..faa6f6a 100644 --- a/01-frontend/public/locales/en/translation.json +++ b/01-frontend/public/locales/en/translation.json @@ -107,5 +107,6 @@ "discount100": "Discount in %", "deleteProduct": "Delete Product", "description": "Description", - "images": "Images" + "images": "Images", + "loggedInAs": "Logged in as" } \ No newline at end of file diff --git a/01-frontend/src/helper/navbar/NavBar.tsx b/01-frontend/src/helper/navbar/NavBar.tsx index f590119..eaac097 100644 --- a/01-frontend/src/helper/navbar/NavBar.tsx +++ b/01-frontend/src/helper/navbar/NavBar.tsx @@ -43,6 +43,11 @@ export default function NavBar() { const pages = pageKeys.map(key => ({ key, label: t(key) })); const settings = user ? [ + { + key: 'email', + label: `${t('loggedInAs')}: ${user.email}`, + disabled: true // wir nutzen dieses Flag gleich zur Erkennung + }, { key: 'account', label: t('account') }, { key: 'orders', label: t('orders') }, { key: 'logout', label: t('logout') } @@ -234,8 +239,14 @@ export default function NavBar() { open={Boolean(anchorElUser)} onClose={() => setAnchorElUser(null)} > - {settings.map(({ key, label }) => ( - handleCloseUserMenu(key)}> + {settings.map(({ key, label, disabled }) => ( + { + if (!disabled) handleCloseUserMenu(key); + }} + disabled={disabled} + > {label} ))}