65 lines
3.0 KiB
PHP
65 lines
3.0 KiB
PHP
<?php
|
|
/**
|
|
* =========================================================================
|
|
* FOCIZ OMGEVINGSINDICATOR (DEV VS MAIN/LIVE)
|
|
* =========================================================================
|
|
*
|
|
* Dit bestandje bepaalt de flashy notificatie links bovenin het scherm.
|
|
*
|
|
* - OP DE DEV OMGEVING: $environment = 'development'; (Rood met 'Development' + radar ping)
|
|
* - OP DE MAIN OMGEVING: $environment = 'live'; (Groen met 'Live' + radar ping)
|
|
*
|
|
* U kunt dit hieronder aanpassen, of instellen via APP_ENV in .env / .env.example!
|
|
*/
|
|
|
|
require_once __DIR__ . '/../config/config.php';
|
|
|
|
// Standaard waarde voor de main branch: 'live' (kan overschreven worden via APP_ENV)
|
|
$environment = defined('APP_ENV') ? APP_ENV : 'live';
|
|
|
|
if (function_exists('fociz_env') && fociz_env('APP_ENV')) {
|
|
$environment = fociz_env('APP_ENV');
|
|
}
|
|
|
|
$isLive = in_array(strtolower(trim($environment)), ['live', 'production', 'prod', 'main']);
|
|
?>
|
|
|
|
<!-- FLASHY OMGEVINGSINDICATOR LINKS BOVENIN -->
|
|
<div id="fociz-env-badge" class="fixed top-2.5 left-2.5 z-[9999] pointer-events-auto select-none transition-all duration-300 hover:scale-105">
|
|
<?php if ($isLive): ?>
|
|
<!-- LIVE OMGEVING (TEAL) -->
|
|
<div class="flex items-center space-x-2 px-3 py-1 rounded-full bg-slate-950/90 border border-teal-500/50 shadow-xs backdrop-blur-md group">
|
|
<!-- Pulsing Teal Radar Indicator -->
|
|
<span class="relative flex h-2 w-2">
|
|
<span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-teal-400 opacity-75"></span>
|
|
<span class="relative inline-flex rounded-full h-2 w-2 bg-teal-500"></span>
|
|
</span>
|
|
|
|
<span class="text-[10px] font-bold tracking-wider text-teal-400 uppercase flex items-center space-x-1">
|
|
<span>Live</span>
|
|
</span>
|
|
|
|
<span class="hidden sm:inline-block text-[9px] font-mono font-bold px-1.5 py-0.5 rounded bg-teal-500/15 text-teal-300 border border-teal-500/30">
|
|
MAIN
|
|
</span>
|
|
</div>
|
|
<?php else: ?>
|
|
<!-- DEVELOPMENT OMGEVING (ROOD) -->
|
|
<div class="flex items-center space-x-2 px-3 py-1 rounded-full bg-slate-950/95 border border-red-500/70 shadow-lg shadow-red-500/30 backdrop-blur-md group">
|
|
<!-- Pulsing Red Radar Indicator -->
|
|
<span class="relative flex h-2.5 w-2.5">
|
|
<span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-80"></span>
|
|
<span class="relative inline-flex rounded-full h-2.5 w-2.5 bg-red-500 shadow-sm shadow-red-500"></span>
|
|
</span>
|
|
|
|
<span class="text-[11px] font-black tracking-wider text-red-400 uppercase flex items-center space-x-1">
|
|
<span>Development</span>
|
|
</span>
|
|
|
|
<span class="hidden sm:inline-block text-[9px] font-mono font-bold px-1.5 py-0.5 rounded bg-red-500/20 text-red-300 border border-red-500/30">
|
|
DEV
|
|
</span>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|