Botón de cerrar sesión implementado
This commit is contained in:
parent
caaa195fba
commit
3cddcb548e
@ -12270,3 +12270,4 @@ Response Patch CallBell:
|
|||||||
[2026-02-20 16:00:10.902672] [debug] Evento recibido: invoice.draft_approved
|
[2026-02-20 16:00:10.902672] [debug] Evento recibido: invoice.draft_approved
|
||||||
[2026-02-20 16:00:10.902920] [debug] Aprobación de Factura
|
[2026-02-20 16:00:10.902920] [debug] Aprobación de Factura
|
||||||
|
|
||||||
|
[2026-02-20 19:37:44.798831] [info] NMS Login OK for user: danielhumberto
|
||||||
|
|||||||
19
public.php
19
public.php
@ -1426,11 +1426,21 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador
|
|||||||
<div style="display: flex; gap: 10px; align-items: center;">
|
<div style="display: flex; gap: 10px; align-items: center;">
|
||||||
<button class="btn btn-secondary hidden" id="btnBackToMenu" onclick="showDashboard()">
|
<button class="btn btn-secondary hidden" id="btnBackToMenu" onclick="showDashboard()">
|
||||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||||
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
|
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2-2H5a2 2 0 0 1-2-2z" />
|
||||||
<polyline points="9 22 9 12 15 12 15 22" />
|
<polyline points="9 22 9 12 15 12 15 22" />
|
||||||
</svg>
|
</svg>
|
||||||
Menú Principal
|
Menú Principal
|
||||||
</button>
|
</button>
|
||||||
|
<?php if (strpos($_SERVER['REQUEST_URI'], '_plugins') !== false): ?>
|
||||||
|
<button class="btn btn-secondary" style="color: #ef4444; border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.05);" onclick="handleLogout()">
|
||||||
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="vertical-align:middle; margin-right:6px;">
|
||||||
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
|
||||||
|
<polyline points="16 17 21 12 16 7"></polyline>
|
||||||
|
<line x1="21" y1="12" x2="9" y2="12"></line>
|
||||||
|
</svg>
|
||||||
|
Cerrar Sesión
|
||||||
|
</button>
|
||||||
|
<?php endif; ?>
|
||||||
<!-- RESTORED THEME BUTTON -->
|
<!-- RESTORED THEME BUTTON -->
|
||||||
<!-- PREMIUM THEME BUTTON -->
|
<!-- PREMIUM THEME BUTTON -->
|
||||||
<button class="theme-toggle" id="themeBtn" onclick="toggleTheme()">
|
<button class="theme-toggle" id="themeBtn" onclick="toggleTheme()">
|
||||||
@ -1925,6 +1935,13 @@ $installersData = json_decode($config['installersDataWhatsApp'] ?? '{"instalador
|
|||||||
updateThemeBtn();
|
updateThemeBtn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.handleLogout = () => {
|
||||||
|
sessionStorage.removeItem('nms_auth_token');
|
||||||
|
sessionStorage.removeItem('nms_user');
|
||||||
|
window.location.reload();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
function updateThemeBtn() {
|
function updateThemeBtn() {
|
||||||
const iconSun = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#f59e0b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><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>`;
|
const iconSun = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#f59e0b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><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>`;
|
||||||
const iconMoon = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#6366f1" 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>`;
|
const iconMoon = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#6366f1" 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>`;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user