Port manual Save Image action to current image controls#1286
Open
Reaper176 wants to merge 1 commit intomcmonkeyprojects:masterfrom
Open
Port manual Save Image action to current image controls#1286Reaper176 wants to merge 1 commit intomcmonkeyprojects:masterfrom
Reaper176 wants to merge 1 commit intomcmonkeyprojects:masterfrom
Conversation
| buttonsChoice = defaultButtonChoices; | ||
| } | ||
| else if (buttonsChoice.toLowerCase().replaceAll(' ', '') == 'useasinit,editimage,star,reuseparameters') { | ||
| buttonsChoice = `${buttonsChoice},Save Image`; |
Member
There was a problem hiding this comment.
this is ... weird. Overriding user preference like this should not happen
| }, (metaParsed.is_starred ? ' star-button button-starred-image' : ' star-button'), 'Toggles this image as starred - starred images get moved to a separate folder and highlighted'); | ||
| } | ||
| includeButton('Reuse Parameters', copy_current_image_params, '', 'Copies the parameters used to generate this image to the current generation settings'); | ||
| if (!isVideo && !isAudio) { |
Member
There was a problem hiding this comment.
this should only apply when isDataImage is true
| showError('Manual save is only supported for images.'); | ||
| return; | ||
| } | ||
| if (button?.dataset.saving == 'true') { |
Member
There was a problem hiding this comment.
redundant, disabled has it covered
| requestData.image = imageData; | ||
| genericRequest('AddImageToHistory', requestData, res => { | ||
| releaseButton(); | ||
| if (!res || res.error) { |
| imageFullView.showImage(saved.image, savedMetadata, imageFullView.currentBatchId); | ||
| imageFullView.pasteState(state); | ||
| } | ||
| if (typeof imageHistoryBrowser !== 'undefined' && imageHistoryBrowser?.lightRefresh) { |
Member
There was a problem hiding this comment.
this if check will never be false
| finish(img.src); | ||
| } | ||
| else { | ||
| toDataURL(img.src, finish); |
Member
There was a problem hiding this comment.
this is only applicable to data url images, so the check is not needed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.