Social Media Manager: Route, DB, KI-Prompts, Frontend, Rolle; SW by-v338

This commit is contained in:
rene 2026-04-24 19:13:30 +02:00
parent d90d4f1eeb
commit 0df6d569c1
9 changed files with 784 additions and 6 deletions

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '324'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '325'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const App = (() => {
@ -54,6 +54,7 @@ const App = (() => {
lost: { title: 'Verlorener Hund', module: null },
friends: { title: 'Freunde', module: null, requiresAuth: true },
chat: { title: 'Nachrichten', module: null, requiresAuth: true },
social: { title: 'Social Media', module: null, requiresAuth: true },
admin: { title: 'Admin', module: null, requiresAuth: true },
impressum: { title: 'Impressum', module: null },
datenschutz: { title: 'Datenschutz', module: null },
@ -421,6 +422,11 @@ const App = (() => {
|| state.user.is_moderator;
adminItem.style.display = isMod ? '' : 'none';
}
const socialItem = document.getElementById('sidebar-social');
if (socialItem) {
const isSocial = state.user.is_social_media || state.user.rolle === 'admin';
socialItem.style.display = isSocial ? '' : 'none';
}
await _loadDogs();
// Eingeloggter User ohne Hund → Onboarding-Wizard (einmalig)