fix(ui/ux): restore mobile header, fix collapsed session options, compact version badge and theme endpoint v3.8.16

This commit is contained in:
2026-10-26 14:52:22 -03:00
parent 6bf2a72d08
commit 91ea4bbfc7
7 changed files with 172 additions and 35 deletions
+19 -3
View File
@@ -86,9 +86,9 @@ const env = nunjucks.configure(path.join(__dirname, '../views'), {
});
// Versiones institucionales del sistema
const APP_VERSION = '3.8.15';
const FRONTEND_VERSION = '3.8.15';
const BACKEND_VERSION = '3.8.15';
const APP_VERSION = '3.8.16';
const FRONTEND_VERSION = '3.8.16';
const BACKEND_VERSION = '3.8.16';
env.addGlobal('app_version', APP_VERSION);
env.addGlobal('frontend_version', FRONTEND_VERSION);
@@ -402,6 +402,22 @@ app.get(['/genetic_optimizer', '/genetic_algorithm_web/genetic_optimizer'], requ
});
});
// Sincronización rápida de tema visual de usuario por AJAX (evita 404 en /api/user/theme)
app.post(['/api/user/theme', '/theme'], async (req, res) => {
const theme = req.body.theme || req.body.theme_preference || 'auto';
try {
if (req.user) {
req.user.theme_preference = theme;
}
if (req.apiClient) {
await req.apiClient.post('/auth/theme', { theme });
}
return res.json({ status: 'success', theme });
} catch (err) {
return res.json({ status: 'ok', theme, notice: 'saved-locally' });
}
});
// Proxy transparente de peticiones /api a Flask
app.use('/api', async (req, res) => {
// Si es dashboard-stats mock directo