chore: switch to TEST mode and add environment indicator

This commit is contained in:
2026-01-07 06:12:34 +00:00
parent d8cc287330
commit ca486a6196
2 changed files with 39 additions and 2 deletions
+28 -2
View File
@@ -955,9 +955,35 @@
</script>
<!-- Version Info -->
<div class="fixed bottom-4 right-4 text-xs text-gray-400">
v1.0.0-beta3
<div class="fixed bottom-4 right-4 text-xs text-gray-400 flex items-center gap-2">
<span id="env-badge" class="hidden px-1.5 py-0.5 rounded-sm font-semibold uppercase tracking-wider text-[10px]"></span>
<span id="version-text">v1.0.0-beta3</span>
</div>
<script>
// Fetch environment info
async function updateEnvBadge() {
try {
const response = await fetch('/api/config');
if (!response.ok) return;
const data = await response.json();
const badge = document.getElementById('env-badge');
if (data.mode === 'PROD') {
badge.textContent = 'PROD';
badge.className = 'px-1.5 py-0.5 rounded-sm font-bold uppercase tracking-wider text-[10px] bg-green-600 text-white';
badge.classList.remove('hidden');
} else if (data.mode === 'TEST') {
badge.textContent = 'TEST';
badge.className = 'px-1.5 py-0.5 rounded-sm font-bold uppercase tracking-wider text-[10px] bg-amber-500 text-white';
badge.classList.remove('hidden');
}
} catch (err) {
console.error('Failed to fetch config:', err);
}
}
updateEnvBadge();
</script>
</body>
</html>