@@ -192,6 +192,8 @@ export class OptionsComponent implements OnInit {
192192 // to show full sized lora image
193193 displayModal : boolean = false ;
194194 selectedImageUrl : string | null = null ;
195+ showLoraLoadPrompt : boolean = false ;
196+ pendingLoraLoadImage : MobiansImage | null = null ;
195197
196198 // DB variables
197199 private db : IDBDatabase | null = null ;
@@ -1749,11 +1751,31 @@ export class OptionsComponent implements OnInit {
17491751 this . sharedService . setPrompt ( image . prompt ! ) ;
17501752 }
17511753
1752- if ( image . loras !== undefined ) {
1753- this . selectedLoras = this . resolveHistoryLoras ( image . loras ) ;
1754- this . generationRequest . loras = this . selectedLoras ;
1755- this . updateCreditCost ( ) ;
1754+ const hasHistoryLoras = Array . isArray ( image . loras ) && image . loras . length > 0 ;
1755+ if ( hasHistoryLoras ) {
1756+ this . pendingLoraLoadImage = image ;
1757+ this . showLoraLoadPrompt = true ;
1758+ }
1759+ }
1760+
1761+ confirmLoadHistoryLoras ( ) {
1762+ const image = this . pendingLoraLoadImage ;
1763+ this . clearLoraLoadPrompt ( ) ;
1764+ if ( ! image ) {
1765+ return ;
17561766 }
1767+ this . selectedLoras = this . resolveHistoryLoras ( image . loras ) ;
1768+ this . generationRequest . loras = this . selectedLoras ;
1769+ this . updateCreditCost ( ) ;
1770+ }
1771+
1772+ declineLoadHistoryLoras ( ) {
1773+ this . clearLoraLoadPrompt ( ) ;
1774+ }
1775+
1776+ private clearLoraLoadPrompt ( ) {
1777+ this . showLoraLoadPrompt = false ;
1778+ this . pendingLoraLoadImage = null ;
17571779 }
17581780
17591781 async downloadImage ( image : MobiansImage , event ?: Event ) {
0 commit comments