feat: add light/dark theme, RU/EN i18n, instructions page, green/red monitoring

- Light and dark theme toggle with localStorage persistence
- Russian and English language support (full i18n)
- Instructions & cheat sheet modal with install/SSH/API/commands
- Green pulsing dot for online, red for offline servers
- Color-coded metrics: green (ok), yellow (warn >70%), red (crit >90%)
- Top bar on server cards: green=online, red=offline

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Андрей Бобырев
2026-05-20 05:55:16 +03:00
parent 468d0bd028
commit 4846742c60
6 changed files with 563 additions and 91 deletions

16
server/static/js/theme.js Normal file
View File

@@ -0,0 +1,16 @@
let currentTheme = localStorage.getItem('vps_theme') || 'dark';
function applyTheme(theme) {
currentTheme = theme;
localStorage.setItem('vps_theme', theme);
document.documentElement.setAttribute('data-theme', theme);
const btn = document.getElementById('themeToggleBtn');
if (btn) btn.textContent = theme === 'dark' ? '☀️' : '🌙';
}
function toggleTheme() {
applyTheme(currentTheme === 'dark' ? 'light' : 'dark');
}
// Apply on load
document.addEventListener('DOMContentLoaded', () => applyTheme(currentTheme));