@@ -97,7 +97,7 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
9797 if ( window . __TAURI__ ?. app ?. getVersion ) {
9898 return await window . __TAURI__ . app . getVersion ( ) ;
9999 }
100-
100+
101101 if ( window . __TAURI__ ?. core ?. invoke ) {
102102 return await window . __TAURI__ . core . invoke ( 'plugin:app|version' ) ;
103103 }
@@ -140,7 +140,7 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
140140 enableTestMode ( ) {
141141 localStorage . setItem ( 'presto_force_update_test' , 'true' ) ;
142142 console . warn ( '⚠️ MODALITÀ TEST AGGIORNAMENTI ATTIVATA' ) ;
143-
143+
144144 if ( ! this . isDevelopmentMode ( ) && this . autoCheck && ! this . checkInterval ) {
145145 this . startAutoCheck ( ) ;
146146 }
@@ -154,7 +154,7 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
154154 disableTestMode ( ) {
155155 localStorage . removeItem ( 'presto_force_update_test' ) ;
156156 console . log ( 'ℹ️ Modalità test aggiornamenti disattivata' ) ;
157-
157+
158158 if ( this . isDevelopmentMode ( ) ) {
159159 this . stopAutoCheck ( ) ;
160160 }
@@ -277,7 +277,7 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
277277 compareVersions ( a , b ) {
278278 const cleanA = a . replace ( / ^ v / , '' ) ;
279279 const cleanB = b . replace ( / ^ v / , '' ) ;
280-
280+
281281 const aParts = cleanA . split ( '.' ) . map ( n => parseInt ( n ) || 0 ) ;
282282 const bParts = cleanB . split ( '.' ) . map ( n => parseInt ( n ) || 0 ) ;
283283
@@ -319,7 +319,7 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
319319
320320 const githubRelease = await response . json ( ) ;
321321 const latestVersion = githubRelease . tag_name . replace ( / ^ v / , '' ) ;
322-
322+
323323 console . log ( `📋 Ultima versione GitHub: ${ latestVersion } ` ) ;
324324
325325 // Confronta versioni
@@ -328,7 +328,7 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
328328 this . updateAvailable = false ;
329329 this . currentUpdate = null ;
330330 this . emit ( 'updateNotAvailable' ) ;
331-
331+
332332 if ( showDialog ) {
333333 alert ( `Nessun aggiornamento disponibile.\n\nVersione corrente: ${ currentVersion } \nUltima versione: ${ latestVersion } ` ) ;
334334 }
@@ -349,9 +349,9 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
349349
350350 if ( showDialog ) {
351351 const message = `🎉 Aggiornamento disponibile!\n\n` +
352- `Versione corrente: ${ currentVersion } \n` +
353- `Nuova versione: ${ latestVersion } \n\n` +
354- `Nota: In modalità sviluppo, scarica manualmente da GitHub.` ;
352+ `Versione corrente: ${ currentVersion } \n` +
353+ `Nuova versione: ${ latestVersion } \n\n` +
354+ `Nota: In modalità sviluppo, scarica manualmente da GitHub.` ;
355355 alert ( message ) ;
356356 }
357357
@@ -447,7 +447,7 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
447447 if ( tauriAPI ) {
448448 console . log ( '🔄 Usando API Tauri updater...' ) ;
449449 const tauriUpdate = await tauriAPI . check ( ) ;
450-
450+
451451 if ( tauriUpdate && tauriUpdate . available ) {
452452 console . log ( '✅ Aggiornamento confermato via Tauri API' ) ;
453453 this . updateAvailable = true ;
@@ -504,10 +504,10 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
504504 */
505505 async simulateUpdate ( ) {
506506 console . log ( '🧪 Simulazione aggiornamento per test...' ) ;
507-
507+
508508 const currentVersion = await this . getAppVersion ( ) ;
509509 const simulatedNewVersion = this . incrementVersion ( currentVersion ) ;
510-
510+
511511 const update = {
512512 version : simulatedNewVersion ,
513513 date : new Date ( ) . toISOString ( ) ,
@@ -577,16 +577,16 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
577577 // Se supporta download automatico via Tauri
578578 if ( this . currentUpdate . isAutoDownloadable && this . currentUpdate . source === 'tauri-api' ) {
579579 console . log ( '📥 Download automatico via Tauri...' ) ;
580-
580+
581581 const tauriAPI = await this . getTauriUpdaterAPI ( ) ;
582582 if ( tauriAPI && tauriAPI . downloadAndInstall ) {
583583 await tauriAPI . downloadAndInstall ( ( progress ) => {
584584 console . log ( `📥 Progresso download: ${ progress } %` ) ;
585585 this . downloadProgress = progress ;
586- this . emit ( 'downloadProgress' , {
586+ this . emit ( 'downloadProgress' , {
587587 progress,
588588 chunkLength : progress ,
589- contentLength : 100
589+ contentLength : 100
590590 } ) ;
591591 } ) ;
592592
@@ -598,10 +598,10 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
598598 } ) ;
599599
600600 this . emit ( 'downloadFinished' ) ;
601-
601+
602602 // Installa e riavvia
603603 this . emit ( 'installFinished' ) ;
604-
604+
605605 const shouldRestart = await this . askConfirmation (
606606 'Aggiornamento scaricato e installato con successo!\n\nVuoi riavviare ora l\'applicazione?' ,
607607 { title : 'Aggiornamento Completato' }
@@ -615,7 +615,7 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
615615 // Download manuale
616616 console . log ( '🌐 Reindirizzamento a download manuale...' ) ;
617617 await this . openDownloadUrl ( this . currentUpdate . downloadUrl ) ;
618-
618+
619619 this . emit ( 'downloadError' , new Error ( 'Download manuale richiesto' ) ) ;
620620 }
621621
@@ -633,15 +633,15 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
633633 */
634634 async simulateDownloadAndInstall ( ) {
635635 console . log ( '🧪 Simulazione download...' ) ;
636-
636+
637637 // Simula progresso download
638638 for ( let i = 0 ; i <= 100 ; i += 10 ) {
639639 await new Promise ( resolve => setTimeout ( resolve , 100 ) ) ;
640640 this . downloadProgress = i ;
641- this . emit ( 'downloadProgress' , {
641+ this . emit ( 'downloadProgress' , {
642642 progress : i ,
643643 chunkLength : i ,
644- contentLength : 100
644+ contentLength : 100
645645 } ) ;
646646 }
647647
@@ -671,7 +671,7 @@ window.UpdateManagerV2 = class UpdateManagerV2 {
671671 */
672672 setAutoCheck ( enabled ) {
673673 this . autoCheck = enabled ;
674-
674+
675675 if ( enabled ) {
676676 this . startAutoCheck ( ) ;
677677 } else {
0 commit comments