fix(ui): center login on mobile, prevent viewport horizontal wiggle and widen desktop chat assistant (v3.8.42)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"version": "3.8.41",
|
||||
"version": "3.8.42",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -433,11 +433,16 @@ body {
|
||||
======================================================= */
|
||||
.auth-wrapper {
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1.5rem;
|
||||
background: var(--app-bg);
|
||||
width: 100%;
|
||||
max-width: 100vw;
|
||||
overflow-x: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.auth-card {
|
||||
@@ -448,9 +453,32 @@ body {
|
||||
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
|
||||
max-width: 460px;
|
||||
width: 100%;
|
||||
margin: auto !important;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
transition: transform 0.25s ease, box-shadow 0.25s ease;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.auth-wrapper {
|
||||
min-height: 100vh !important;
|
||||
min-height: 100dvh !important;
|
||||
padding: 1rem 0.85rem !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
}
|
||||
.auth-card {
|
||||
margin: auto !important;
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
border-left: 1px solid var(--card-border) !important;
|
||||
border-right: 1px solid var(--card-border) !important;
|
||||
border-top: 5px solid var(--brand-primary) !important;
|
||||
border-radius: 20px !important;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
|
||||
}
|
||||
}
|
||||
|
||||
[data-bs-theme="dark"] .auth-card {
|
||||
|
||||
@@ -66,14 +66,41 @@
|
||||
|
||||
function getWelcomeMessage(role, name) {
|
||||
const greeting = name ? `¡Hola, ${name}!` : '¡Hola!';
|
||||
if (role === 'admin') {
|
||||
return `${greeting} Soy **UdeCi**, tu tutor de Edu-Space para Administración y Gobierno del Sistema. ¿En qué te puedo ayudar hoy?`;
|
||||
} else if (role === 'bedelia') {
|
||||
return `${greeting} Soy **UdeCi**, tu asistente de soporte para Bedelía. Puedo orientarte en el circuito de 9 pasos, resolución de conflictos y reservas.`;
|
||||
} else if (role === 'docente') {
|
||||
return `${greeting} Soy **UdeCi**, tu tutor docente. Puedo orientarte sobre asignaciones de aulas, comisiones y el Libro de Calificaciones.`;
|
||||
return `## ${greeting}\n¿Cómo puedo ayudarte?`;
|
||||
}
|
||||
|
||||
function getDefaultOptions(role) {
|
||||
const r = (role || '').toLowerCase();
|
||||
if (r.includes('alumno') || r.includes('estudiante')) {
|
||||
return [
|
||||
"¿Dónde curso hoy y qué aula me toca?",
|
||||
"¿Cuáles son mis calificaciones y notas?",
|
||||
"¿Qué convenios y descuentos tengo vigentes?"
|
||||
];
|
||||
} else if (r.includes('docente') || r.includes('profesor') || r.includes('teacher')) {
|
||||
return [
|
||||
"¿Qué comisiones y horarios tengo asignados hoy?",
|
||||
"¿Cómo registro calificaciones en el acta?",
|
||||
"¿Cómo solicitar una nueva reserva de aula?"
|
||||
];
|
||||
} else if (r.includes('bedelia')) {
|
||||
return [
|
||||
"¿Cuáles son los 9 pasos del flujo de Bedelía?",
|
||||
"¿Cómo resuelvo un conflicto áulico o de aforo?",
|
||||
"¿Cómo agrego un nuevo convenio o beneficio?"
|
||||
];
|
||||
} else if (r.includes('recepcion')) {
|
||||
return [
|
||||
"¿Cómo verificar una credencial digital QR?",
|
||||
"¿Cómo buscar a un alumno por documento?",
|
||||
"¿Cómo consultar las clases presenciales de hoy?"
|
||||
];
|
||||
} else {
|
||||
return `${greeting} Soy **UdeCi**, tu tutor virtual de cursada. Puedo orientarte sobre aulas, horarios y notas. ¿En qué te puedo ayudar?`;
|
||||
return [
|
||||
"¿Cómo agrego un nuevo convenio comercial?",
|
||||
"¿Cómo funciona el escáner de recepción QR?",
|
||||
"¿Cómo optimizar aulas con el algoritmo genético?"
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +197,19 @@
|
||||
if (options && options.length > 0) {
|
||||
optionsHtml = '<div class="ai-msg-options">';
|
||||
options.forEach(opt => {
|
||||
optionsHtml += `<button type="button" class="ai-option-btn" data-query="${opt}">${opt}</button>`;
|
||||
let iconClass = 'bi-chat-left-dots';
|
||||
const optLower = opt.toLowerCase();
|
||||
if (optLower.includes('aula') || optLower.includes('curso') || optLower.includes('donde') || optLower.includes('espacio')) iconClass = 'bi-door-closed';
|
||||
else if (optLower.includes('nota') || optLower.includes('calificaci') || optLower.includes('acta')) iconClass = 'bi-award';
|
||||
else if (optLower.includes('descuento') || optLower.includes('beneficio') || optLower.includes('convenio')) iconClass = 'bi-tag';
|
||||
else if (optLower.includes('reserva') || optLower.includes('horario') || optLower.includes('clase')) iconClass = 'bi-calendar3';
|
||||
else if (optLower.includes('qr') || optLower.includes('credencial') || optLower.includes('verificar') || optLower.includes('documento')) iconClass = 'bi-qr-code';
|
||||
else if (optLower.includes('paso') || optLower.includes('flujo') || optLower.includes('bedelia') || optLower.includes('genetico')) iconClass = 'bi-diagram-3';
|
||||
|
||||
optionsHtml += `<button type="button" class="ai-option-btn" data-query="${opt}">
|
||||
<i class="bi ${iconClass}"></i>
|
||||
<span class="flex-grow-1">${opt}</span>
|
||||
</button>`;
|
||||
});
|
||||
optionsHtml += '</div>';
|
||||
}
|
||||
@@ -459,16 +498,16 @@
|
||||
sessionStorage.removeItem(getStorageKey());
|
||||
const messagesContainer = document.getElementById('aiChatMessages');
|
||||
if (messagesContainer) messagesContainer.innerHTML = '';
|
||||
appendMessage('assistant', getWelcomeMessage(role, name), [], false);
|
||||
appendMessage('assistant', getWelcomeMessage(role, name), getDefaultOptions(role), false);
|
||||
});
|
||||
}
|
||||
|
||||
// Cargar historial previo o bienvenida
|
||||
// Cargar historial previo o bienvenida con sugerencias
|
||||
const history = loadHistory();
|
||||
if (history.length > 0) {
|
||||
history.forEach(msg => appendMessage(msg.role, msg.content, msg.options || [], false, msg.timeStr));
|
||||
} else {
|
||||
appendMessage('assistant', getWelcomeMessage(role, name), [], false);
|
||||
appendMessage('assistant', getWelcomeMessage(role, name), getDefaultOptions(role), false);
|
||||
}
|
||||
|
||||
// Atajo Enter en desktop
|
||||
|
||||
+3
-3
@@ -86,9 +86,9 @@ const env = nunjucks.configure(path.join(__dirname, '../views'), {
|
||||
});
|
||||
|
||||
// Versiones institucionales del sistema
|
||||
const APP_VERSION = '3.8.41';
|
||||
const FRONTEND_VERSION = '3.8.41';
|
||||
const BACKEND_VERSION = '3.8.41';
|
||||
const APP_VERSION = '3.8.42';
|
||||
const FRONTEND_VERSION = '3.8.42';
|
||||
const BACKEND_VERSION = '3.8.42';
|
||||
|
||||
env.addGlobal('app_version', APP_VERSION);
|
||||
env.addGlobal('frontend_version', FRONTEND_VERSION);
|
||||
|
||||
@@ -74,6 +74,52 @@
|
||||
}
|
||||
.divider-text::before { margin-right: 0.75em; }
|
||||
.divider-text::after { margin-left: 0.75em; }
|
||||
|
||||
/* Estructura Base y Centrado Óptico/Matemático en Móvil & Desktop */
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
max-width: 100vw;
|
||||
overflow-x: hidden;
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
}
|
||||
.auth-wrapper {
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
width: 100%;
|
||||
max-width: 100vw;
|
||||
overflow-x: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1.5rem 1rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.auth-card {
|
||||
margin: auto !important;
|
||||
width: 100%;
|
||||
max-width: 440px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.auth-wrapper {
|
||||
padding: 1rem 0.85rem !important;
|
||||
}
|
||||
.auth-card {
|
||||
border-left: 1px solid var(--card-border) !important;
|
||||
border-right: 1px solid var(--card-border) !important;
|
||||
border-top: 5px solid var(--brand-primary) !important;
|
||||
border-radius: 20px !important;
|
||||
margin: auto !important;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
.auth-header {
|
||||
padding: 1.5rem 1.25rem 0.75rem !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -86,7 +132,7 @@
|
||||
<p class="text-muted small mb-0">Sistema de Gestión de Espacios Áulicos</p>
|
||||
</div>
|
||||
|
||||
<div class="px-4 pb-4 pt-2">
|
||||
<div class="px-3 px-sm-4 pb-4 pt-2">
|
||||
<!-- Flash Messages -->
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible fade show rounded-3 py-2 small" role="alert">
|
||||
|
||||
@@ -31,9 +31,16 @@
|
||||
<link href="/css/style.css" rel="stylesheet">
|
||||
<link href="/css/walkthrough.css" rel="stylesheet">
|
||||
<style>
|
||||
html, body {
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
position: relative;
|
||||
}
|
||||
body {
|
||||
font-family: 'Inter', sans-serif;
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
transition: background-color 0.25s ease, color 0.25s ease;
|
||||
}
|
||||
|
||||
@@ -428,7 +435,12 @@
|
||||
======================================================= */
|
||||
.app-wrapper {
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
display: flex;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.sidebar {
|
||||
width: 275px;
|
||||
@@ -1249,13 +1261,21 @@
|
||||
.main-content {
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
overflow-x: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: transparent;
|
||||
position: relative;
|
||||
}
|
||||
.app-main-container {
|
||||
padding-top: 0.85rem !important;
|
||||
padding-bottom: 1.5rem !important;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Anular margen excesivo heredado de templates antiguos */
|
||||
|
||||
@@ -174,23 +174,30 @@
|
||||
}
|
||||
|
||||
/* ==============================================================
|
||||
PANEL DE CONVERSACIÓN: DESKTOP
|
||||
PANEL DE CONVERSACIÓN: DESKTOP (AMPLIO ESTILO MERCADO LIBRE / MAGO)
|
||||
============================================================== */
|
||||
.ai-chat-panel {
|
||||
width: 400px;
|
||||
width: 480px;
|
||||
max-width: calc(100vw - 32px);
|
||||
height: 560px;
|
||||
max-height: calc(100vh - 90px);
|
||||
height: 700px;
|
||||
max-height: calc(100vh - 75px);
|
||||
border-radius: 24px !important;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35) !important;
|
||||
box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
|
||||
animation: aiSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
||||
background: #ffffff;
|
||||
border: 1px solid rgba(180, 62, 142, 0.2) !important;
|
||||
border: 1px solid rgba(180, 62, 142, 0.22) !important;
|
||||
z-index: 1075;
|
||||
}
|
||||
@media (min-width: 1400px) {
|
||||
.ai-chat-panel {
|
||||
width: 520px;
|
||||
height: 740px;
|
||||
max-height: calc(100vh - 80px);
|
||||
}
|
||||
}
|
||||
@keyframes aiSlideUp {
|
||||
from { opacity: 0; transform: translateY(16px) scale(0.97); }
|
||||
to { opacity: 1; transform: translateY(0) scale(1); }
|
||||
@@ -316,6 +323,59 @@
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Opciones Rápidas / Tarjetas de Sugerencia Estilo Mercado Libre / Mago */
|
||||
.ai-msg-options {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
margin-top: 14px;
|
||||
margin-bottom: 4px;
|
||||
width: 100%;
|
||||
}
|
||||
.ai-option-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
width: 100%;
|
||||
padding: 12px 16px;
|
||||
background: #F8FAFC;
|
||||
border: 1px solid rgba(226, 232, 240, 0.95);
|
||||
border-radius: 14px;
|
||||
color: #1E293B;
|
||||
font-size: 0.92rem;
|
||||
font-weight: 500;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
.ai-option-btn i {
|
||||
font-size: 1.15rem;
|
||||
color: #B43E8E;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.ai-option-btn:hover {
|
||||
background: #FFFFFF;
|
||||
border-color: #B43E8E;
|
||||
color: #B43E8E;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 18px rgba(180, 62, 142, 0.12);
|
||||
}
|
||||
[data-bs-theme="dark"] .ai-option-btn {
|
||||
background: rgba(30, 41, 59, 0.65);
|
||||
border-color: rgba(51, 65, 85, 0.7);
|
||||
color: #F1F5F9;
|
||||
}
|
||||
[data-bs-theme="dark"] .ai-option-btn i {
|
||||
color: #EC4899;
|
||||
}
|
||||
[data-bs-theme="dark"] .ai-option-btn:hover {
|
||||
background: rgba(51, 65, 85, 0.9);
|
||||
border-color: #EC4899;
|
||||
color: #FFFFFF;
|
||||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
/* Fila de Acciones debajo de la respuesta de UdeCi (Copiar, Audio, Feedback) */
|
||||
.ai-msg-actions {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user