@@ -233,7 +233,7 @@ export default function GetImages() {
233
233
< span title = "Random" className = { `sortOption ${ sort == "random" ? "highlight" : "" } ` } onClick = { ( ) => handleSortChange ( "random" ) } > R</ span >
234
234
</ div >
235
235
</ div >
236
- < div >
236
+ < div id = "imgGrid" >
237
237
{ loading && < div className = "lds-ellipsis" > < div > </ div > < div > </ div > < div > </ div > < div > </ div > </ div > }
238
238
{ error && < h2 > There was an error loading the images.</ h2 > }
239
239
{ ! loading && ! error && images . map ( ( image , index ) => (
@@ -256,26 +256,28 @@ export default function GetImages() {
256
256
{ moreLoading && < div className = "lds-ellipsis" > < div > </ div > < div > </ div > < div > </ div > < div > </ div > </ div > }
257
257
{ moreError && < h2 > There was an error during loading.</ h2 > }
258
258
{ ! moreLoading && ! moreError && images [ moreIndex ] && moreImages [ 0 ] && ! moreDocument && < div className = "modalHeader" style = { { width : `calc(224px * ${ moreImages . length } )` } /*adjust header size for # of images until max width*/ } > { images [ moreIndex ] . path + images [ moreIndex ] . filename } </ div > }
259
- { ! moreLoading && ! moreError && images [ moreIndex ] && moreImages [ 0 ] && ! moreDocument && moreImages . map ( ( image , index ) => (
260
- < div key = { index + 1000000 } className = "imgCard" onClick = { ( ) => { navigator . clipboard . writeText ( images [ moreIndex ] . prompt ) } } >
261
- < img width = "224" height = "336"
262
- src = { "http://localhost:3000/" + image . path + encodeURIComponent ( image . filename ) }
263
- loading = { index <= 60 ? "eager" : "lazy" }
264
- title = { image . filename }
265
- />
266
- </ div >
267
- ) ) }
268
- { ! moreLoading && ! moreError && moreDocument && images [ moreIndex ] &&
269
- < div className = "moreDocument" >
270
- < pre >
271
- File: { images [ moreIndex ] . filename } { < br /> }
272
- { type != "styles" && `Keywords: ${ images [ moreIndex ] . keywords } \n` }
273
- { type != "styles" && `Weight: ${ images [ moreIndex ] . weight } ` }
274
- { type == "styles" && `Prompt: ${ images [ moreIndex ] . prompt } ` }
275
- </ pre >
276
- < pre > { moreDocument } </ pre >
277
- </ div >
278
- }
259
+ < div id = "modalImgGrid" >
260
+ { ! moreLoading && ! moreError && images [ moreIndex ] && moreImages [ 0 ] && ! moreDocument && moreImages . map ( ( image , index ) => (
261
+ < div key = { index + 1000000 } className = "imgCard" onClick = { ( ) => { navigator . clipboard . writeText ( images [ moreIndex ] . prompt ) } } >
262
+ < img width = "224" height = "336"
263
+ src = { "http://localhost:3000/" + image . path + encodeURIComponent ( image . filename ) }
264
+ loading = { index <= 60 ? "eager" : "lazy" }
265
+ title = { image . filename }
266
+ />
267
+ </ div >
268
+ ) ) }
269
+ { ! moreLoading && ! moreError && moreDocument && images [ moreIndex ] &&
270
+ < div className = "moreDocument" >
271
+ < pre >
272
+ File: { images [ moreIndex ] . filename } { < br /> }
273
+ { type != "styles" && `Keywords: ${ images [ moreIndex ] . keywords } \n` }
274
+ { type != "styles" && `Weight: ${ images [ moreIndex ] . weight } ` }
275
+ { type == "styles" && `Prompt: ${ images [ moreIndex ] . prompt } ` }
276
+ </ pre >
277
+ < pre > { moreDocument } </ pre >
278
+ </ div >
279
+ }
280
+ </ div >
279
281
</ div >
280
282
</ ReactModal >
281
283
</ div >
0 commit comments