[FIX] FAB segnalazione/ARIA: icone FontAwesome -> SVG inline (regressione swap BI) + slot data-api-key
Icone: bug-reporter.js (nx-bell fa-bell, nx-bug fa-life-ring) + common.js ai-chat-fab/header/send (fa-wand-magic-sparkles, fa-paper-plane) erano FA, rimosso dallo swap BI -> cerchi vuoti. Sostituite con SVG inline (currentColor, self-contained). Verificato headless: 3 FAB renderizzano svg. Auth widget: cablato s.dataset.apiKey <- window.NEXUS_WIDGET_API_KEY (X-API-Key gateway AgileHub, era assente -> 401). _detectUser ora legge anche nis2_access_token. SERVE la chiave X-API-Key da AgileHub.
This commit is contained in:
+8
-3
@@ -953,6 +953,11 @@ function switchLang(lang) {
|
||||
s.dataset.product = 'NIS2';
|
||||
s.dataset.tenantId = '7';
|
||||
s.dataset.apiUrl = 'https://agilehub.agile.software';
|
||||
// X-API-Key per il gateway ticket AgileHub. Senza, il widget riceve 401
|
||||
// "Header X-API-Key o Authorization: Bearer richiesto". Valorizzare con la
|
||||
// chiave NIS2 emessa da AgileHub (prodotto NIS2, tenant 7). Inietta via
|
||||
// window.NEXUS_WIDGET_API_KEY oppure hardcoda qui quando disponibile.
|
||||
s.dataset.apiKey = (window.NEXUS_WIDGET_API_KEY || '');
|
||||
s.dataset.userName = userName;
|
||||
s.dataset.userEmail = userEmail;
|
||||
s.dataset.userRole = userRole;
|
||||
@@ -972,7 +977,7 @@ function switchLang(lang) {
|
||||
+ 'background:linear-gradient(135deg,#7C3AED,#3B82F6);color:#fff;'
|
||||
+ 'box-shadow:0 6px 20px rgba(124,58,237,.4);font-size:22px;'
|
||||
+ 'display:flex;align-items:center;justify-content:center;';
|
||||
fab.innerHTML = '<i class="fa-solid fa-wand-magic-sparkles"></i>';
|
||||
fab.innerHTML = '<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3l1.8 4.6L18.5 9.5l-4.7 1.9L12 16l-1.8-4.6L5.5 9.5l4.7-1.9L12 3z"/></svg>';
|
||||
document.body.appendChild(fab);
|
||||
|
||||
var panel = document.createElement('div');
|
||||
@@ -1009,7 +1014,7 @@ function switchLang(lang) {
|
||||
'<div style="padding:14px 16px;background:linear-gradient(135deg,#7C3AED,#3B82F6);'
|
||||
+ 'color:#fff;display:flex;justify-content:space-between;align-items:center">'
|
||||
+ '<div style="display:flex;align-items:center;gap:8px;font-weight:600">'
|
||||
+ '<i class="fa-solid fa-wand-magic-sparkles"></i> ARIA — Assistente NIS2'
|
||||
+ '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:-2px"><path d="M12 3l1.8 4.6L18.5 9.5l-4.7 1.9L12 16l-1.8-4.6L5.5 9.5l4.7-1.9L12 3z"/></svg> ARIA — Assistente NIS2'
|
||||
+ '</div>'
|
||||
+ '<button id="ai-chat-close" aria-label="Chiudi" style="background:none;'
|
||||
+ 'border:none;color:#fff;font-size:18px;cursor:pointer">×</button>'
|
||||
@@ -1028,7 +1033,7 @@ function switchLang(lang) {
|
||||
+ '<button type="submit" style="padding:10px 14px;border:none;'
|
||||
+ 'border-radius:10px;background:linear-gradient(135deg,#7C3AED,#3B82F6);'
|
||||
+ 'color:#fff;font-weight:600;cursor:pointer">'
|
||||
+ '<i class="fa-solid fa-paper-plane"></i>'
|
||||
+ '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="22" y1="2" x2="11" y2="13"/><polygon points="22 2 15 22 11 13 2 9 22 2"/></svg>'
|
||||
+ '</button>'
|
||||
+ '</form>';
|
||||
document.getElementById('ai-chat-close').onclick = function () {
|
||||
|
||||
Reference in New Issue
Block a user