feat(ui): rediseño visual v1.1.0 con modo oscuro y mejoras estéticas
- Implementado soporte completo para Modo Oscuro con detección de sistema. - Mejorada la interfaz con tipografía 'Outfit', sombras suaves y bordes redondeados. - Estilizado el logo principal con esquinas redondeadas. - Actualizada versión a 1.1.0 en manifest y documentación.
This commit is contained in:
parent
685ca0b882
commit
c8061c49fe
@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.1.0] - 16-12-2025
|
||||||
|
### Added
|
||||||
|
- Soporte para Modo Oscuro (Dark Mode) con detección automática y toggle manual.
|
||||||
|
- Mejoras de UI/UX: Nueva tipografía 'Outfit', sombras suavizadas, transiciones y bordes redondeados.
|
||||||
|
- Estilización mejorada del logo.
|
||||||
|
|
||||||
## [1.0.0] - 16-12-2025
|
## [1.0.0] - 16-12-2025
|
||||||
### Added
|
### Added
|
||||||
- Interfaz gráfica moderna y responsiva para la búsqueda de clientes y generación de pagos.
|
- Interfaz gráfica moderna y responsiva para la búsqueda de clientes y generación de pagos.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# SIIP - Generador de Payment Intents Stripe
|
# SIIP - Generador de Payment Intents Stripe
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
@ -38,5 +38,5 @@ Este plugin permite buscar clientes en la base de datos de UISP CRM y generar in
|
|||||||
- Si el cliente no tiene un "Stripe Customer ID", no se permitirá generar el pago.
|
- Si el cliente no tiene un "Stripe Customer ID", no se permitirá generar el pago.
|
||||||
|
|
||||||
---
|
---
|
||||||
**Versión**: 1.0.0
|
**Versión**: 1.1.0
|
||||||
**Copyright**: © 2024 SIIP Internet. Todos los derechos reservados.
|
**Copyright**: © 2024 SIIP Internet. Todos los derechos reservados.
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
"displayName": "SIIP - Generador de Payment Intents Stripe",
|
"displayName": "SIIP - Generador de Payment Intents Stripe",
|
||||||
"description": "Generador manual de Payment Intents Stripe para los clientes de UISP CRM, útil para conciliación de pagos no registrados en UISP CRM",
|
"description": "Generador manual de Payment Intents Stripe para los clientes de UISP CRM, útil para conciliación de pagos no registrados en UISP CRM",
|
||||||
"url": "https://siip.mx",
|
"url": "https://siip.mx",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"ucrmVersionCompliancy": {
|
"ucrmVersionCompliancy": {
|
||||||
"min": "1.0.0",
|
"min": "1.0.0",
|
||||||
"max": null
|
"max": null
|
||||||
|
|||||||
298
public.php
298
public.php
@ -107,84 +107,142 @@ if ($action === 'create_intent') {
|
|||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--primary: #006aff;
|
/* Light Mode Variables */
|
||||||
--primary-dark: #0056cc;
|
--primary: #4f46e5; /* Indigo 600 */
|
||||||
--bg-body: #f4f6f8;
|
--primary-hover: #4338ca; /* Indigo 700 */
|
||||||
|
--bg-body: #f3f4f6;
|
||||||
--bg-card: #ffffff;
|
--bg-card: #ffffff;
|
||||||
--text-main: #1f2937;
|
--text-main: #111827;
|
||||||
--text-muted: #6b7280;
|
--text-muted: #6b7280;
|
||||||
--border: #e5e7eb;
|
--border: #e5e7eb;
|
||||||
--success: #10b981;
|
--input-bg: #ffffff;
|
||||||
--danger: #ef4444;
|
--success-bg: #ecfdf5;
|
||||||
--radius: 12px;
|
--success-text: #065f46;
|
||||||
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
--error-bg: #fef2f2;
|
||||||
|
--error-text: #991b1b;
|
||||||
|
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
||||||
|
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||||
|
--radius: 16px;
|
||||||
|
--transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="dark"] {
|
||||||
|
/* Dark Mode Variables */
|
||||||
|
--primary: #6366f1; /* Indigo 500 */
|
||||||
|
--primary-hover: #818cf8; /* Indigo 400 */
|
||||||
|
--bg-body: #111827; /* Gray 900 */
|
||||||
|
--bg-card: #1f2937; /* Gray 800 */
|
||||||
|
--text-main: #f9fafb; /* Gray 50 */
|
||||||
|
--text-muted: #9ca3af; /* Gray 400 */
|
||||||
|
--border: #374151; /* Gray 700 */
|
||||||
|
--input-bg: #111827; /* Gray 900 */
|
||||||
|
--success-bg: #064e3b;
|
||||||
|
--success-text: #6ee7b7;
|
||||||
|
--error-bg: #7f1d1d;
|
||||||
|
--error-text: #fca5a5;
|
||||||
|
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
|
||||||
|
--shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
* { box-sizing: border-box; outline: none; }
|
* { box-sizing: border-box; outline: none; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Inter', sans-serif;
|
font-family: 'Outfit', sans-serif;
|
||||||
background-color: var(--bg-body);
|
background-color: var(--bg-body);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
transition: background-color var(--transition), color var(--transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 600px;
|
max-width: 550px;
|
||||||
background: var(--bg-card);
|
background: var(--bg-card);
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
box-shadow: var(--shadow);
|
box-shadow: var(--shadow-md);
|
||||||
padding: 2rem;
|
padding: 2.5rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
|
position: relative;
|
||||||
|
transition: background-color var(--transition), box-shadow var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dark Mode Toggle */
|
||||||
|
.theme-toggle {
|
||||||
|
position: absolute;
|
||||||
|
top: 1.5rem;
|
||||||
|
right: 1.5rem;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
color: var(--text-muted);
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0.5rem;
|
||||||
|
border-radius: 50%;
|
||||||
|
transition: all 0.2s;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-toggle:hover {
|
||||||
|
color: var(--primary);
|
||||||
|
background-color: rgba(99, 102, 241, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header img {
|
.header img {
|
||||||
max-height: 60px;
|
max-height: 70px;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1.25rem;
|
||||||
display: block;
|
display: block;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
|
||||||
|
border-radius: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header h1 {
|
.header h1 {
|
||||||
font-size: 1.5rem;
|
font-size: 1.75rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--text-main);
|
background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
background-clip: text;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header p {
|
.header p {
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
margin: 0.5rem 0 0;
|
margin: 0.75rem 0 0;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group {
|
.form-group {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.5rem;
|
gap: 0.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
|
letter-spacing: 0.02em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-wrapper {
|
.input-wrapper {
|
||||||
@ -193,26 +251,34 @@ if ($action === 'create_intent') {
|
|||||||
|
|
||||||
input[type="text"], input[type="number"] {
|
input[type="text"], input[type="number"] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.875rem 1rem;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
transition: border-color 0.2s, box-shadow 0.2s;
|
background-color: var(--input-bg);
|
||||||
|
color: var(--text-main);
|
||||||
|
transition: all 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:focus {
|
input:focus {
|
||||||
border-color: var(--primary);
|
border-color: var(--primary);
|
||||||
box-shadow: 0 0 0 3px rgba(0, 106, 255, 0.1);
|
box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
input::placeholder {
|
||||||
|
color: var(--text-muted);
|
||||||
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-icon {
|
.search-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 12px;
|
right: 14px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Predictions Dropdown */
|
/* Predictions Dropdown */
|
||||||
@ -221,22 +287,23 @@ if ($action === 'create_intent') {
|
|||||||
top: 100%;
|
top: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
background: white;
|
background: var(--bg-card);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
margin-top: 4px;
|
margin-top: 6px;
|
||||||
max-height: 250px;
|
max-height: 260px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
z-index: 10;
|
z-index: 20;
|
||||||
display: none;
|
display: none;
|
||||||
box-shadow: var(--shadow);
|
box-shadow: var(--shadow-md);
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.prediction-item {
|
.prediction-item {
|
||||||
padding: 0.75rem 1rem;
|
padding: 1rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-bottom: 1px solid var(--border);
|
border-bottom: 1px solid var(--border);
|
||||||
transition: background 0.1s;
|
transition: background 0.15s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.prediction-item:last-child {
|
.prediction-item:last-child {
|
||||||
@ -244,19 +311,20 @@ if ($action === 'create_intent') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.prediction-item:hover {
|
.prediction-item:hover {
|
||||||
background-color: #f9fafb;
|
background-color: rgba(99, 102, 241, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.prediction-item .name {
|
.prediction-item .name {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
display: block;
|
display: block;
|
||||||
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
|
||||||
.prediction-item .address {
|
.prediction-item .address {
|
||||||
font-size: 0.8rem;
|
font-size: 0.85rem;
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 2px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Client Details Section */
|
/* Client Details Section */
|
||||||
@ -264,30 +332,38 @@ if ($action === 'create_intent') {
|
|||||||
border-top: 1px solid var(--border);
|
border-top: 1px solid var(--border);
|
||||||
padding-top: 1.5rem;
|
padding-top: 1.5rem;
|
||||||
display: none;
|
display: none;
|
||||||
animation: fadeIn 0.3s ease-out;
|
animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes fadeIn {
|
@keyframes slideUp {
|
||||||
from { opacity: 0; transform: translateY(10px); }
|
from { opacity: 0; transform: translateY(20px); }
|
||||||
to { opacity: 1; transform: translateY(0); }
|
to { opacity: 1; transform: translateY(0); }
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-grid {
|
.info-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
gap: 1rem;
|
gap: 1.25rem 1rem;
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 2rem;
|
||||||
font-size: 0.9rem;
|
font-size: 0.95rem;
|
||||||
|
background: rgba(99, 102, 241, 0.03);
|
||||||
|
padding: 1.5rem;
|
||||||
|
border-radius: 12px;
|
||||||
|
border: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-item .label {
|
.info-item .label {
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
margin-bottom: 2px;
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-item .value {
|
.info-item .value {
|
||||||
font-weight: 500;
|
font-weight: 600;
|
||||||
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
@ -295,43 +371,50 @@ if ($action === 'create_intent') {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.875rem;
|
padding: 1rem;
|
||||||
background-color: var(--primary);
|
background-color: var(--primary);
|
||||||
color: white;
|
color: #ffffff;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.2s, transform 0.1s;
|
transition: all 0.2s;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
|
letter-spacing: 0.01em;
|
||||||
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:hover {
|
.btn:hover {
|
||||||
background-color: var(--primary-dark);
|
background-color: var(--primary-hover);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 4px 6px rgba(0,0,0,0.15);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:active {
|
.btn:active {
|
||||||
transform: scale(0.99);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:disabled {
|
.btn:disabled {
|
||||||
background-color: var(--border);
|
background-color: var(--border);
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
box-shadow: none;
|
||||||
|
transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Modal */
|
/* Modal */
|
||||||
.modal-overlay {
|
.modal-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0; left: 0; right: 0; bottom: 0;
|
top: 0; left: 0; right: 0; bottom: 0;
|
||||||
background: rgba(0,0,0,0.5);
|
background: rgba(0,0,0,0.6);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
transition: opacity 0.2s;
|
transition: opacity 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-overlay.active {
|
.modal-overlay.active {
|
||||||
@ -340,15 +423,15 @@ if ($action === 'create_intent') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
background: white;
|
background: var(--bg-card);
|
||||||
width: 90%;
|
width: 90%;
|
||||||
max-width: 400px;
|
max-width: 420px;
|
||||||
padding: 2rem;
|
padding: 2.5rem;
|
||||||
border-radius: var(--radius);
|
border-radius: 20px;
|
||||||
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
transform: scale(0.95);
|
transform: scale(0.9);
|
||||||
transition: transform 0.2s;
|
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-overlay.active .modal {
|
.modal-overlay.active .modal {
|
||||||
@ -357,43 +440,63 @@ if ($action === 'create_intent') {
|
|||||||
|
|
||||||
.modal h3 {
|
.modal h3 {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
color: var(--text-main);
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal p {
|
||||||
|
color: var(--text-muted);
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal strong {
|
||||||
|
color: var(--primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-actions {
|
.modal-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
margin-top: 1.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-secondary {
|
.btn-secondary {
|
||||||
background: white;
|
background: transparent;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-secondary:hover {
|
.btn-secondary:hover {
|
||||||
background: #f9fafb;
|
background: rgba(0,0,0,0.05);
|
||||||
|
border-color: var(--text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme="dark"] .btn-secondary:hover {
|
||||||
|
background: rgba(255,255,255,0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Alerts */
|
/* Alerts */
|
||||||
.alert {
|
.alert {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1.5rem;
|
||||||
font-size: 0.9rem;
|
font-size: 0.95rem;
|
||||||
display: none;
|
display: none;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert.success {
|
.alert.success {
|
||||||
background-color: #ecfdf5;
|
background-color: var(--success-bg);
|
||||||
color: #065f46;
|
color: var(--success-text);
|
||||||
border: 1px solid #d1fae5;
|
border-color: rgba(6, 95, 70, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert.error {
|
.alert.error {
|
||||||
background-color: #fef2f2;
|
background-color: var(--error-bg);
|
||||||
color: #991b1b;
|
color: var(--error-text);
|
||||||
border: 1px solid #fee2e2;
|
border-color: rgba(153, 27, 27, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.spinner {
|
.spinner {
|
||||||
@ -404,7 +507,7 @@ if ($action === 'create_intent') {
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border-top-color: white;
|
border-top-color: white;
|
||||||
animation: spin 1s ease-in-out infinite;
|
animation: spin 1s ease-in-out infinite;
|
||||||
margin-right: 8px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
@ -416,6 +519,13 @@ if ($action === 'create_intent') {
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
<button class="theme-toggle" id="themeToggle" title="Cambiar tema">
|
||||||
|
<!-- Sun Icon -->
|
||||||
|
<svg id="sunIcon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display:none"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>
|
||||||
|
<!-- Moon Icon -->
|
||||||
|
<svg id="moonIcon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
|
||||||
|
</button>
|
||||||
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<img src="?action=image&file=logo.png" alt="Logo">
|
<img src="?action=image&file=logo.png" alt="Logo">
|
||||||
<h1>Generar Intención de Pago</h1>
|
<h1>Generar Intención de Pago</h1>
|
||||||
@ -423,14 +533,16 @@ if ($action === 'create_intent') {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Alert Box -->
|
<!-- Alert Box -->
|
||||||
<div id="alertBox" class="alert"></div>
|
<div id="alertBox" class="alert" style="display: none;"></div>
|
||||||
|
|
||||||
<!-- Search Section -->
|
<!-- Search Section -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="clientSearch">Buscar Cliente</label>
|
<label for="clientSearch">Buscar Cliente</label>
|
||||||
<div class="input-wrapper">
|
<div class="input-wrapper">
|
||||||
<input type="text" id="clientSearch" placeholder="Nombre, ID, Dirección..." autocomplete="off">
|
<input type="text" id="clientSearch" placeholder="Nombre, ID, Dirección..." autocomplete="off">
|
||||||
<span class="search-icon">🔍</span>
|
<span class="search-icon">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
|
||||||
|
</span>
|
||||||
<div id="predictions" class="predictions"></div>
|
<div id="predictions" class="predictions"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -493,6 +605,38 @@ if ($action === 'create_intent') {
|
|||||||
const alertBox = document.getElementById('alertBox');
|
const alertBox = document.getElementById('alertBox');
|
||||||
const confirmModal = document.getElementById('confirmModal');
|
const confirmModal = document.getElementById('confirmModal');
|
||||||
|
|
||||||
|
// Theme Toggle Logic
|
||||||
|
const themeToggle = document.getElementById('themeToggle');
|
||||||
|
const sunIcon = document.getElementById('sunIcon');
|
||||||
|
const moonIcon = document.getElementById('moonIcon');
|
||||||
|
const htmlEl = document.documentElement;
|
||||||
|
|
||||||
|
// Check saved theme or pref
|
||||||
|
const savedTheme = localStorage.getItem('theme');
|
||||||
|
if (savedTheme === 'dark' || (!savedTheme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
||||||
|
htmlEl.setAttribute('data-theme', 'dark');
|
||||||
|
sunIcon.style.display = 'block';
|
||||||
|
moonIcon.style.display = 'none';
|
||||||
|
} else {
|
||||||
|
htmlEl.removeAttribute('data-theme');
|
||||||
|
sunIcon.style.display = 'none';
|
||||||
|
moonIcon.style.display = 'block';
|
||||||
|
}
|
||||||
|
|
||||||
|
themeToggle.addEventListener('click', () => {
|
||||||
|
if (htmlEl.hasAttribute('data-theme')) {
|
||||||
|
htmlEl.removeAttribute('data-theme');
|
||||||
|
localStorage.setItem('theme', 'light');
|
||||||
|
sunIcon.style.display = 'none';
|
||||||
|
moonIcon.style.display = 'block';
|
||||||
|
} else {
|
||||||
|
htmlEl.setAttribute('data-theme', 'dark');
|
||||||
|
localStorage.setItem('theme', 'dark');
|
||||||
|
sunIcon.style.display = 'block';
|
||||||
|
moonIcon.style.display = 'none';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
let debounceTimer;
|
let debounceTimer;
|
||||||
let selectedClient = null;
|
let selectedClient = null;
|
||||||
|
|
||||||
@ -537,7 +681,7 @@ if ($action === 'create_intent') {
|
|||||||
|
|
||||||
const selectClient = (id) => {
|
const selectClient = (id) => {
|
||||||
predictionsDiv.style.display = 'none';
|
predictionsDiv.style.display = 'none';
|
||||||
searchInput.value = ''; // Or keep name? "Se limpia el formulario" usually refers to after success, but search box usually clears or shows selected. User said: "se seleccione el cliente deseado... se deben cargar sus datos... y ahí estará el formulario".
|
searchInput.value = '';
|
||||||
|
|
||||||
fetch(`?action=details&id=${id}`)
|
fetch(`?action=details&id=${id}`)
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
@ -637,7 +781,7 @@ if ($action === 'create_intent') {
|
|||||||
function showAlert(type, msg) {
|
function showAlert(type, msg) {
|
||||||
alertBox.className = `alert ${type}`;
|
alertBox.className = `alert ${type}`;
|
||||||
alertBox.textContent = msg;
|
alertBox.textContent = msg;
|
||||||
alertBox.style.display = 'block';
|
alertBox.style.display = 'flex';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close predictions on click outside
|
// Close predictions on click outside
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user