Fix: '+ Weiteren Hund anlegen' nur für Pro sichtbar, App.hasPro() public (SW by-v766)

This commit is contained in:
rene 2026-05-08 11:06:23 +02:00
parent b0ea805434
commit b6eaaad47a
5 changed files with 6 additions and 5 deletions

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '765'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '766'; // ← 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';
@ -1090,6 +1090,7 @@ const App = (() => {
}
return { init, navigate, callModule, state, setActiveDog,
hasPro: (user) => _hasPro(user ?? state.user),
renderDogSwitcher: _renderDogSwitcher,
getInstallPrompt: () => _installPrompt, requireAuth,
showOnboarding: _showOnboardingModal,

View file

@ -202,7 +202,7 @@ window.Page_dog_profile = (() => {
<svg class="ph-icon" aria-hidden="true"><use href="/icons/phosphor.svg#identification-card"></use></svg>
Visitenkarte teilen
</button>` : ''}
${!dog.is_guest ? `<button class="btn btn-secondary w-full" id="dp-add-dog-btn">
${!dog.is_guest && App.hasPro(_appState.user) ? `<button class="btn btn-secondary w-full" id="dp-add-dog-btn">
+ Weiteren Hund anlegen
</button>` : ''}
${!dog.is_guest ? `<button class="btn btn-secondary w-full" id="dp-wrapped-btn"