UX: Pro-Chips komplett ausgeblendet für Standard-User (kein 25% Opacity mehr) (SW by-v747)
This commit is contained in:
parent
7749aa6d2a
commit
fd87c9af7b
5 changed files with 17 additions and 7 deletions
|
|
@ -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():
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@
|
|||
<script src="/js/api.js?v=94"></script>
|
||||
<script src="/js/ui.js?v=94"></script>
|
||||
<script src="/js/app.js?v=94"></script>
|
||||
<script src="/js/worlds.js?v=746"></script>
|
||||
<script src="/js/worlds.js?v=747"></script>
|
||||
|
||||
<!-- Feature-Seiten werden lazy geladen -->
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Offline-Cache + Push Notifications + Tile-Cache
|
||||
============================================================ */
|
||||
|
||||
const CACHE_VERSION = 'by-v746';
|
||||
const CACHE_VERSION = 'by-v747';
|
||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
|
||||
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue