-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: exports qr-code as wallpaper for lock-screen #9535
base: main
Are you sure you want to change the base?
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.
Thank you for your contribution. I have left inline comments about being consistent with our coding style of async/await and try/catch
// It adds the "hidden" class back to hide the element again. | ||
elementRef.current.classList.add("hidden"); | ||
} catch (e) { | ||
console.log(e); |
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.
To be replaced with Logger
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.
Did you try from an existing example pages/account/manage/profile.js
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.
Whenever I use Logger in the file. I get logged out. I have attached the screenshot below:
Whenever I replace console
with logger
in the file, it changes Account into Login. Then when I presss the FaShare icon it throws ADMIN_USERS NOT FOUND(may be the "Account-to-Login Change" has something to do with the error")
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 tested in light mode but it seems to be working fine in my machine. The QR code is being rendered in the image. I am thinking where the error is ...🤔 Screen.Recording.-.Oct.27.2023.mp4 |
b7c5eb4
to
8b69061
Compare
@eddiejaoude I seem to be stuck with the PR😌 and would really appreciate your guidance. Could you please take a moment to review it again and provide some feedback or suggestions? I have also left some comments above |
Sure, it is on my list of things to look into @akash19coder 👍 |
I still get a blank QR code when downloading, I think we need to fix before progressing on the logging issue |
I think it would be better to move this to it's own page, rather than in the overlay |
@eddiejaoude I haven't been able to make progress to the PR because I have my end sem examination going on right now. Once it ends on December 19, I will be back. |
No problem, good luck in your exams 💪 - I have also been slow on reviewing Pull Requests recently. |
My examination got over today. I want to resume working on PR. You recommended to move this on its own page rather than in the overlay. I am confused which folder should I move it into. Should I create a component probably call it 'QRCodeWallpaper'? On 'Export as Wallpaper' click convert the component into image? |
The Pull Request is about implementing a feature where in we make it possible for BioDrop user's to download their BioDrop QR code as a lock screen wallpaper so that they can set it as a wallpaper on their smartphone.
Fixes Issue
Closes #9115
Changes proposed
Profile
page, belowDownload
button calledDownload as Wallpaper
. When the user click on the button. The following piece of code(JSX or HTML whatever we wanna call😅) will be converted to image. For more context, please refer the video attached in screenshot section below.To convert HTML into Image I have added a library called
html-to-image
. If you want to inspect the library, please Click hereOn
Download as Wallpaper
button click. The follwing functon will execute to convert above mentioned HTML code into image;Check List (Check all the applicable boxes)
Screenshots
Screen.Recording.-.Oct.8.2023.mp4
Lockscreen wallpaper
Note to reviewers
ADMIN_USERS NOT FOUND
error upon using Logger in the code. For the time being, I have addedconsole(in the line no 56)