feat: major improvements and fixes

- Fixed Docker permissions issue by running as root user
- Added DEBUG_MODE support with conditional Swagger docs and auto-reload
- Created start.sh script for conditional Uvicorn execution
- Removed verbose debug logs from WebSocket status endpoint
- Added comprehensive screenshots to documentation
- Enhanced help tooltip with full-screen modal design
- Added theme switcher to error page
- Updated documentation with local development and Docker benefits
- Fixed WebSocket status display issues
- Improved hotkey functionality and documentation
- Added detailed project descriptions for local dev and Docker users

Technical improvements:
- Dockerfile: removed appuser switch, simplified permissions
- docker-compose.yml: kept user: 0:0 for Docker socket access
- app.py: removed debug prints, added DEBUG_MODE support
- templates: enhanced UI/UX with better tooltips and themes
- docs: comprehensive updates with new screenshots and descriptions
This commit is contained in:
Сергей Антропов
2025-08-19 13:01:32 +03:00
parent 5c8efe2644
commit e80f665470
26 changed files with 1017 additions and 148 deletions

View File

@@ -46,12 +46,14 @@
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.3s ease, color 0.3s ease;
}
.error-container {
max-width: 600px;
padding: 2rem;
text-align: center;
transition: all 0.3s ease;
}
.error-icon {
@@ -130,6 +132,34 @@
flex-wrap: wrap;
}
.theme-toggle {
position: fixed;
top: 1rem;
right: 1rem;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 50%;
width: 48px;
height: 48px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
font-size: 1.2rem;
color: var(--fg);
z-index: 1000;
}
.theme-toggle:hover {
background: var(--border);
transform: scale(1.1);
}
.theme-toggle:active {
transform: scale(0.95);
}
.auth-notice {
background: var(--warn);
color: var(--bg);
@@ -178,10 +208,23 @@
width: 100%;
max-width: 300px;
}
.theme-toggle {
top: 0.5rem;
right: 0.5rem;
width: 40px;
height: 40px;
font-size: 1rem;
}
}
</style>
</head>
<body>
<!-- Кнопка переключателя темы -->
<button class="theme-toggle" onclick="toggleTheme()" title="Переключить тему (Ctrl+T)">
🌙
</button>
<div class="error-container">
<div class="error-icon">
{% if error_code == 401 %}
@@ -239,12 +282,31 @@
const savedTheme = localStorage.getItem('lb_theme') || 'dark';
document.documentElement.setAttribute('data-theme', savedTheme);
// Функция для обновления иконки темы
function updateThemeIcon() {
const themeToggle = document.querySelector('.theme-toggle');
const currentTheme = document.documentElement.getAttribute('data-theme');
if (themeToggle) {
if (currentTheme === 'light') {
themeToggle.innerHTML = '🌙';
themeToggle.title = 'Переключить на темную тему (Ctrl+T)';
} else {
themeToggle.innerHTML = '☀️';
themeToggle.title = 'Переключить на светлую тему (Ctrl+T)';
}
}
}
// Переключатель темы
function toggleTheme() {
const currentTheme = document.documentElement.getAttribute('data-theme');
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
document.documentElement.setAttribute('data-theme', newTheme);
localStorage.setItem('lb_theme', newTheme);
// Обновляем иконку
updateThemeIcon();
}
// Добавляем обработчик клавиш для переключения темы (Ctrl+T)
@@ -254,6 +316,11 @@
toggleTheme();
}
});
// Инициализируем иконку при загрузке страницы
document.addEventListener('DOMContentLoaded', function() {
updateThemeIcon();
});
</script>
</body>
</html>