- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Message alerts for image upload using image upload button and url button #4665
base: mealie-next
Are you sure you want to change the base?
fix: Message alerts for image upload using image upload button and url button #4665
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for your contribution.
I just had a quick glance at it and this looks mostly good. I just have one thing to add and a few minor code comments for my first feedback round.
The Image button is no longer properly aligned with the settings button. This would need to be updated.
// Check if the file has an acceptable extension | ||
const allowedExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix indentation
// Check if the file has an acceptable extension | |
const allowedExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp"]; | |
// Check if the file has an acceptable extension | |
const allowedExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp"]; |
// Check if the file has an acceptable extension | ||
const allowedExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are missing heic
and avif
.
What type of PR is this?
bug
What this PR does / why we need it:
This Pull request addresses the issue of issue #4494 where even if the image upload fails no message or alert was displayed.
This also covers the issue related to the URL. If URL of the image is provided, it didn't use to check if the URL is valid or not and consequently did not displayed any message. So through this PR request the following things are covered:
Before: No messages are displayed
After: Messages are displayed
Which issue(s) this PR fixes:
Fixes #4494
Testing
Since this was changes in UI, I tested with different URLs , valid and invalid to verify if the message is displayed.
I tested with different file extension to make see if there is invalid file extension the message is displayed.
Note:
Please ignore the WakelockSwitch.vue