Fixes [#9] --hide-ui-dir-config parameter not showing [Send to Photopea] buttons.

Thanks to https://github.com/Odls.
This commit is contained in:
Yanko Oliveira
2023-06-17 10:40:13 +01:00
parent 38764e65df
commit a2332f52f5

View File

@@ -32,6 +32,7 @@ function onPhotopeaLoaded(iframe) {
function createSendToPhotopeaButton(queryId, gallery) {
const existingButton = gradioApp().querySelector(`#${queryId} button`);
const newButton = existingButton.cloneNode(true);
newButton.style.display = "flex";
newButton.id = `${queryId}_open_in_photopea`;
newButton.textContent = "Send to Photopea";
newButton.addEventListener("click", () => openImageInPhotopea(gallery));