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:
DANYDHSV 2025-12-16 17:54:14 -06:00
parent 685ca0b882
commit c8061c49fe
4 changed files with 230 additions and 80 deletions

View File

@ -1,5 +1,11 @@
# 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
### Added
- Interfaz gráfica moderna y responsiva para la búsqueda de clientes y generación de pagos.

View File

@ -1,6 +1,6 @@
# SIIP - Generador de Payment Intents Stripe
![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)
![Version](https://img.shields.io/badge/version-1.1.0-blue.svg)
![UCRM Compliancy](https://img.shields.io/badge/UCRM-v1.0.0%2B-success.svg)
![PHP](https://img.shields.io/badge/PHP-7.4%2B-777bb4.svg)
![License](https://img.shields.io/badge/license-MIT-green.svg)
@ -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.
---
**Versión**: 1.0.0
**Versión**: 1.1.0
**Copyright**: © 2024 SIIP Internet. Todos los derechos reservados.

View File

@ -5,7 +5,7 @@
"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",
"url": "https://siip.mx",
"version": "1.0.0",
"version": "1.1.0",
"ucrmVersionCompliancy": {
"min": "1.0.0",
"max": null

View File

@ -107,84 +107,142 @@ if ($action === 'create_intent') {
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<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>
:root {
--primary: #006aff;
--primary-dark: #0056cc;
--bg-body: #f4f6f8;
/* Light Mode Variables */
--primary: #4f46e5; /* Indigo 600 */
--primary-hover: #4338ca; /* Indigo 700 */
--bg-body: #f3f4f6;
--bg-card: #ffffff;
--text-main: #1f2937;
--text-main: #111827;
--text-muted: #6b7280;
--border: #e5e7eb;
--success: #10b981;
--danger: #ef4444;
--radius: 12px;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
--input-bg: #ffffff;
--success-bg: #ecfdf5;
--success-text: #065f46;
--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; }
body {
font-family: 'Inter', sans-serif;
font-family: 'Outfit', sans-serif;
background-color: var(--bg-body);
color: var(--text-main);
margin: 0;
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
transition: background-color var(--transition), color var(--transition);
}
.container {
width: 100%;
max-width: 600px;
max-width: 550px;
background: var(--bg-card);
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 2rem;
box-shadow: var(--shadow-md);
padding: 2.5rem;
display: flex;
flex-direction: column;
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 {
text-align: center;
margin-bottom: 1rem;
margin-bottom: 0.5rem;
}
.header img {
max-height: 60px;
margin-bottom: 1rem;
max-height: 70px;
margin-bottom: 1.25rem;
display: block;
margin-left: auto;
margin-right: auto;
filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
border-radius: 16px;
}
.header h1 {
font-size: 1.5rem;
font-size: 1.75rem;
font-weight: 700;
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 {
color: var(--text-muted);
margin: 0.5rem 0 0;
margin: 0.75rem 0 0;
font-size: 0.95rem;
line-height: 1.5;
}
.form-group {
position: relative;
display: flex;
flex-direction: column;
gap: 0.5rem;
gap: 0.6rem;
}
label {
font-weight: 500;
font-weight: 600;
font-size: 0.9rem;
color: var(--text-main);
letter-spacing: 0.02em;
}
.input-wrapper {
@ -193,26 +251,34 @@ if ($action === 'create_intent') {
input[type="text"], input[type="number"] {
width: 100%;
padding: 0.75rem 1rem;
padding: 0.875rem 1rem;
border: 1px solid var(--border);
border-radius: 8px;
border-radius: 12px;
font-size: 1rem;
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 {
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 {
position: absolute;
right: 12px;
right: 14px;
top: 50%;
transform: translateY(-50%);
color: var(--text-muted);
pointer-events: none;
font-size: 1.1rem;
}
/* Predictions Dropdown */
@ -221,22 +287,23 @@ if ($action === 'create_intent') {
top: 100%;
left: 0;
right: 0;
background: white;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 8px;
margin-top: 4px;
max-height: 250px;
border-radius: 12px;
margin-top: 6px;
max-height: 260px;
overflow-y: auto;
z-index: 10;
z-index: 20;
display: none;
box-shadow: var(--shadow);
box-shadow: var(--shadow-md);
overflow: hidden;
}
.prediction-item {
padding: 0.75rem 1rem;
padding: 1rem;
cursor: pointer;
border-bottom: 1px solid var(--border);
transition: background 0.1s;
transition: background 0.15s;
}
.prediction-item:last-child {
@ -244,19 +311,20 @@ if ($action === 'create_intent') {
}
.prediction-item:hover {
background-color: #f9fafb;
background-color: rgba(99, 102, 241, 0.05);
}
.prediction-item .name {
font-weight: 600;
display: block;
color: var(--text-main);
}
.prediction-item .address {
font-size: 0.8rem;
font-size: 0.85rem;
color: var(--text-muted);
display: block;
margin-top: 2px;
margin-top: 4px;
}
/* Client Details Section */
@ -264,30 +332,38 @@ if ($action === 'create_intent') {
border-top: 1px solid var(--border);
padding-top: 1.5rem;
display: none;
animation: fadeIn 0.3s ease-out;
animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
@keyframes slideUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.info-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
margin-bottom: 1.5rem;
font-size: 0.9rem;
gap: 1.25rem 1rem;
margin-bottom: 2rem;
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 {
color: var(--text-muted);
font-size: 0.8rem;
margin-bottom: 2px;
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 4px;
font-weight: 600;
}
.info-item .value {
font-weight: 500;
font-weight: 600;
color: var(--text-main);
}
.btn {
@ -295,43 +371,50 @@ if ($action === 'create_intent') {
align-items: center;
justify-content: center;
width: 100%;
padding: 0.875rem;
padding: 1rem;
background-color: var(--primary);
color: white;
color: #ffffff;
font-weight: 600;
border: none;
border-radius: 8px;
border-radius: 12px;
cursor: pointer;
transition: background 0.2s, transform 0.1s;
transition: all 0.2s;
font-size: 1rem;
letter-spacing: 0.01em;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.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 {
transform: scale(0.99);
transform: translateY(0);
}
.btn:disabled {
background-color: var(--border);
color: var(--text-muted);
cursor: not-allowed;
box-shadow: none;
transform: none;
}
/* Modal */
.modal-overlay {
position: fixed;
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;
align-items: center;
justify-content: center;
z-index: 50;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s;
transition: opacity 0.3s;
}
.modal-overlay.active {
@ -340,15 +423,15 @@ if ($action === 'create_intent') {
}
.modal {
background: white;
background: var(--bg-card);
width: 90%;
max-width: 400px;
padding: 2rem;
border-radius: var(--radius);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
max-width: 420px;
padding: 2.5rem;
border-radius: 20px;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
text-align: center;
transform: scale(0.95);
transition: transform 0.2s;
transform: scale(0.9);
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal {
@ -357,43 +440,63 @@ if ($action === 'create_intent') {
.modal h3 {
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 {
display: flex;
gap: 1rem;
margin-top: 1.5rem;
}
.btn-secondary {
background: white;
background: transparent;
border: 1px solid var(--border);
color: var(--text-main);
}
.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 */
.alert {
padding: 1rem;
border-radius: 8px;
margin-bottom: 1rem;
font-size: 0.9rem;
border-radius: 12px;
margin-bottom: 1.5rem;
font-size: 0.95rem;
display: none;
border: 1px solid transparent;
display: flex;
align-items: flex-start;
gap: 0.75rem;
}
.alert.success {
background-color: #ecfdf5;
color: #065f46;
border: 1px solid #d1fae5;
background-color: var(--success-bg);
color: var(--success-text);
border-color: rgba(6, 95, 70, 0.1);
}
.alert.error {
background-color: #fef2f2;
color: #991b1b;
border: 1px solid #fee2e2;
background-color: var(--error-bg);
color: var(--error-text);
border-color: rgba(153, 27, 27, 0.1);
}
.spinner {
@ -404,7 +507,7 @@ if ($action === 'create_intent') {
border-radius: 50%;
border-top-color: white;
animation: spin 1s ease-in-out infinite;
margin-right: 8px;
margin-right: 10px;
}
@keyframes spin {
@ -416,6 +519,13 @@ if ($action === 'create_intent') {
<body>
<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">
<img src="?action=image&file=logo.png" alt="Logo">
<h1>Generar Intención de Pago</h1>
@ -423,14 +533,16 @@ if ($action === 'create_intent') {
</div>
<!-- Alert Box -->
<div id="alertBox" class="alert"></div>
<div id="alertBox" class="alert" style="display: none;"></div>
<!-- Search Section -->
<div class="form-group">
<label for="clientSearch">Buscar Cliente</label>
<div class="input-wrapper">
<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>
</div>
@ -493,6 +605,38 @@ if ($action === 'create_intent') {
const alertBox = document.getElementById('alertBox');
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 selectedClient = null;
@ -537,7 +681,7 @@ if ($action === 'create_intent') {
const selectClient = (id) => {
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}`)
.then(res => res.json())
@ -637,7 +781,7 @@ if ($action === 'create_intent') {
function showAlert(type, msg) {
alertBox.className = `alert ${type}`;
alertBox.textContent = msg;
alertBox.style.display = 'block';
alertBox.style.display = 'flex';
}
// Close predictions on click outside