diff --git a/backend/main.py b/backend/main.py index 936a202..c023c04 100644 --- a/backend/main.py +++ b/backend/main.py @@ -327,7 +327,7 @@ MEDIA_DIR = os.getenv("MEDIA_DIR", "/data/media") os.makedirs(MEDIA_DIR, exist_ok=True) app.mount("/media", StaticFiles(directory=MEDIA_DIR), name="media") -APP_VER = "746" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "747" # muss mit APP_VER in app.js übereinstimmen @app.get("/api/version") async def app_version(): diff --git a/backend/static/index.html b/backend/static/index.html index 184af40..11a3536 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -578,7 +578,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 5a80762..ffa1a09 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '746'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '747'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.5.0'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; diff --git a/backend/static/js/worlds.js b/backend/static/js/worlds.js index 0bfe6df..e451d69 100644 --- a/backend/static/js/worlds.js +++ b/backend/static/js/worlds.js @@ -569,6 +569,16 @@ window.Worlds = (() => { const u = _state?.user; const tier = u?.subscription_tier || 'standard'; const isTest = tier.endsWith('_test'); + + // Pro-Chips: komplett ausblenden wenn kein Zugriff + if (chip.pro) { + if (!u) return false; + if (isTest) return ['pro_test','breeder_test'].includes(tier); + if (u.rolle === 'admin' || u.rolle === 'moderator') return true; + if (u.is_moderator || u.is_social_media) return true; + return ['pro','breeder'].includes(tier); + } + // Role-Checks (hart — komplett ausblenden) if (!chip?.role) return true; if (chip.role === 'breeder') { @@ -1049,7 +1059,7 @@ window.Worlds = (() => {
Deine Bereiche
- ${features.map(f => _chip(f.icon, f.label, f.page, !!(f.pro && !_hasProAccess()))).join('')} + ${features.map(f => _chip(f.icon, f.label, f.page)).join('')}