UX: Pro-Chips komplett ausgeblendet für Standard-User (kein 25% Opacity mehr) (SW by-v747)

This commit is contained in:
rene 2026-05-06 20:47:13 +02:00
parent 7749aa6d2a
commit fd87c9af7b
5 changed files with 17 additions and 7 deletions

View file

@ -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 = (() => {
<div class="world-bottom">
<div class="world-section-label">Deine Bereiche</div>
<div class="world-chips-grid">
${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('')}
</div>
<div class="world-footer-links">
<span data-wnav="impressum">Impressum</span>
@ -1270,7 +1280,7 @@ window.Worlds = (() => {
` : ''}
<div class="world-section-label">Alles über ${_esc(dog.name)}</div>
<div class="world-chips-grid">
${chips.map(c => _chip(c.icon, c.label, c.page, !!(c.pro && !_hasProAccess()))).join('')}
${chips.map(c => _chip(c.icon, c.label, c.page)).join('')}
</div>
<div class="world-footer-links">
<span data-wnav="gruender">Die 100 Gründer</span>
@ -1364,7 +1374,7 @@ window.Worlds = (() => {
<div class="world-bottom">
<div class="world-section-label">Die Welt da draußen</div>
<div class="world-chips-grid">
${chips.map(c => _chip(c.icon, c.label, c.page, !!(c.pro && !_hasProAccess()))).join('')}
${chips.map(c => _chip(c.icon, c.label, c.page)).join('')}
</div>
<div class="world-footer-links">
<span data-wnav="datenschutz">Datenschutz</span>