-
-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c320ec2
commit f1d5ab2
Showing
13 changed files
with
113 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,3 @@ test-output | |
__pycache__ | ||
/lobe_theme_config.json | ||
/javascript/*.js | ||
!/javascript/main.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ Dockerfile* | |
|
||
# misc | ||
# add other ignore file below | ||
*.py | ||
style.css | ||
javascript/ | ||
.stylelintignore |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { memo, useEffect } from 'react'; | ||
|
||
const Preview = memo(() => { | ||
useEffect(() => { | ||
console.time('🤯 [layout] inject - Split Previewer'); | ||
// tab_txt2img | ||
const txt2imgToprow = gradioApp().querySelector('#txt2img_toprow') as HTMLDivElement; | ||
const txt2imgSettings = gradioApp().querySelector('#txt2img_settings') as HTMLDivElement; | ||
const txt2imgGenerate = gradioApp().querySelector('#txt2img_generate') as HTMLButtonElement; | ||
const txt2imgPreview = gradioApp().querySelector( | ||
'#txt2img_gallery_container', | ||
) as HTMLDivElement; | ||
if (txt2imgToprow && txt2imgSettings && txt2imgGenerate && txt2imgPreview) { | ||
txt2imgSettings.prepend(txt2imgToprow); | ||
txt2imgPreview.prepend(txt2imgGenerate); | ||
} | ||
// tab_img2img | ||
const img2imgToprow = gradioApp().querySelector('#img2img_toprow') as HTMLDivElement; | ||
const img2imgSettings = gradioApp().querySelector('#img2img_settings') as HTMLDivElement; | ||
const img2imgGenerate = gradioApp().querySelector('#img2img_generate') as HTMLButtonElement; | ||
const img2imgPreview = gradioApp().querySelector( | ||
'#img2img_gallery_container', | ||
) as HTMLDivElement; | ||
if (img2imgSettings && img2imgToprow && img2imgGenerate && img2imgPreview) { | ||
img2imgSettings.prepend(img2imgToprow); | ||
img2imgPreview.prepend(img2imgGenerate); | ||
} | ||
console.timeEnd('🤯 [layout] inject - Split Previewer'); | ||
}, []); | ||
|
||
return null; | ||
}); | ||
|
||
export default Preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.