new build
All checks were successful
Deploy / deploy (push) Successful in 51s

This commit is contained in:
2026-07-22 21:40:34 +02:00
parent eb16827fdf
commit 2e800d4839
11 changed files with 674 additions and 98 deletions

View File

@@ -14,15 +14,21 @@ if (!in_array($childGender, ['male', 'female', 'mixed'], true)) {
$debugEnabled = defined('APP_DEBUG') && APP_DEBUG === true;
$locationTrackingPreference = 'prompt';
$showDebugTools = false;
if (isset($_SESSION['user_id'])) {
try {
$pdo = $app->pdo();
if ($pdo) {
$profileSettings = new \App\ProfileSettings($pdo);
$locationTrackingPreference = $profileSettings->getLocationTrackingPreference((int)$_SESSION['user_id']);
$communityCfg = dirname(__DIR__, 2) . '/config/community.php';
$communityConfig = file_exists($communityCfg) ? require $communityCfg : [];
$communityAccess = new \App\CommunityAccess($pdo, $communityConfig);
$showDebugTools = $debugEnabled && $communityAccess->hasRole((int)$_SESSION['user_id'], 'site_admin');
}
} catch (\Throwable) {
$locationTrackingPreference = 'prompt';
$showDebugTools = false;
}
}
$debugFiles = [];
@@ -158,7 +164,7 @@ if ($debugEnabled) {
</div>
</div>
<?php if ($debugEnabled): ?>
<?php if ($showDebugTools): ?>
<style>
.debug-fab { position: fixed; right: 18px; bottom: 18px; z-index: 200; background:#111827; color:#fff; border:none; border-radius: 999px; width: 52px; height:52px; display:flex; align-items:center; justify-content:center; font-size:24px; box-shadow:0 10px 30px rgba(0,0,0,0.2); cursor:pointer; }
.debug-modal { position:fixed; inset:0; background: rgba(0,0,0,0.4); display:none; align-items:center; justify-content:center; z-index: 210; padding:16px; }