@@ -1038,6 +1038,13 @@ function _renderizar_gestion_dispositivos({ sesiones, confianzas, bloqueados = [
10381038 ? `<div class="gestion-dp-nombre">${ escapeHTML ( d . os ) } ${ badgeEste } </div>`
10391039 : `<div class="gestion-dp-nombre gestion-dp-desconocido">Sistema desconocido ${ badgeEste } </div>` ;
10401040 const hwLine = d . nombre ? `<div class="gestion-dp-hw">${ escapeHTML ( d . nombre ) } </div>` : '' ;
1041+ const hashLine = d . esteDispositivo ? `
1042+ <div class="gestion-dp-hash-linea">
1043+ <span class="gestion-dp-hash-label">Hash dispositivo</span>
1044+ <button class="gestion-dp-bt-copiar-hash" data-hash="${ d . id_dp_hash } " title="Copiar hash al portapapeles">
1045+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
1046+ </button>
1047+ </div>` : '' ;
10411048
10421049 const partesFecha = [ ] ;
10431050 if ( d . tieneSesion ) partesFecha . push ( `Sesión desde ${ fmt ( d . creadoEn ) } ` ) ;
@@ -1057,7 +1064,7 @@ function _renderizar_gestion_dispositivos({ sesiones, confianzas, bloqueados = [
10571064 html += `
10581065 <div class="${ claseItem } " data-hash="${ d . id_dp_hash } ">
10591066 <div class="gestion-dp-info">
1060- ${ osLine } ${ hwLine } ${ fechaLine }
1067+ ${ osLine } ${ hwLine } ${ hashLine } ${ fechaLine }
10611068 </div>
10621069 <div class="gestion-dp-acciones">${ btSesion } ${ btConfianza } ${ btBloquear } </div>
10631070 </div>` ;
@@ -1090,6 +1097,16 @@ function _renderizar_gestion_dispositivos({ sesiones, confianzas, bloqueados = [
10901097
10911098 contenedor . innerHTML = html ;
10921099
1100+ contenedor . querySelectorAll ( '.gestion-dp-bt-copiar-hash' ) . forEach ( btn => {
1101+ btn . addEventListener ( 'click' , async ( ) => {
1102+ await navigator . clipboard . writeText ( btn . dataset . hash ) ;
1103+ const svg = btn . innerHTML ;
1104+ btn . textContent = '✓' ;
1105+ btn . style . color = '#4ade80' ;
1106+ setTimeout ( ( ) => { btn . innerHTML = svg ; btn . style . color = '' ; } , 1500 ) ;
1107+ } ) ;
1108+ } ) ;
1109+
10931110 contenedor . querySelectorAll ( '.gestion-dp-bt' ) . forEach ( btn => {
10941111 btn . addEventListener ( 'click' , async ( ) => {
10951112 const tipo = btn . dataset . tipo ;
0 commit comments