65 lines
3.1 KiB
PHP
65 lines
3.1 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 (wordt overschreven als APP_ENV in .env staat)
|
|
$environment = defined('APP_ENV') ? APP_ENV : 'development';
|
|
|
|
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 (GROEN) -->
|
|
<div class="flex items-center space-x-2 px-3 py-1 rounded-full bg-slate-950/95 border border-emerald-500/70 shadow-lg shadow-emerald-500/25 backdrop-blur-md group">
|
|
<!-- Pulsing Green 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-emerald-400 opacity-80"></span>
|
|
<span class="relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-500 shadow-sm shadow-emerald-500"></span>
|
|
</span>
|
|
|
|
<span class="text-[11px] font-black tracking-wider text-emerald-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.2 rounded bg-emerald-500/20 text-emerald-300 border border-emerald-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.2 rounded bg-red-500/20 text-red-300 border border-red-500/30">
|
|
DEV
|
|
</span>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|