qb-phone
qb-phone copied to clipboard
Click on the phone number and Serial Number to add to clipboard in settings app
Description
Phone Number and Serial Number copied to clipboard when clicked in settings page
Checklist
- [x] I have personally loaded this code into an updated qbcore project and checked all of its functionality.
- [x] My code fits the style guidelines.
- [x] My PR fits the contribution guidelines.
Looks solid. This should be added because often, people want to send or use their in-game phone number outside of fivem or are unaware of the radial menu option. Ill test it in a few
I dont really think we should be importing yet another library just for something which can be done in 2-3 lines of standard JS, aka setting the clipboard.
QB-Phone is already bloated enough as it is...
Imo copy to clipboard should be part of core
I dont really think we should be importing yet another library just for something which can be done in 2-3 lines of standard JS, aka setting the clipboard. QB-Phone is already bloated enough as it is...
Imo copy to clipboard should be part of core
Apart of qb-core? Yeah, perhaps, would be nice when trying to set the clipboard from lua.
Wouldnt really be useable/ideal in this situation even if it was in qb-core though. As you'd have to go from the UI of qb-phone, to the clientside of qb-phone, then to the clientside of qb-core, then to the UI of qb-core.
Much better to just write those 2-3 lines of JS in qb-phone in this situation.
Absolutely 👍 didn't spend too much time with it but I would've thought i'd tried it without a library and thought it didn't work for some reason so probably did that naturally I thought I could do it with native js but not looked at this really since posting was just a quick implementation that worked
I might pull it down and have a look again and see why I didn't use the clipboard I'm sure I remember trying it, but someone could always pull it down remove the package add the 2-3 lines of js and that I maybe missed and create the pr again and comment on this to say it's outdated because of pr # I don't have or use qb-phone and am not a "qb-core developer" obviously this isn't top of list of things for me todo 😀 but I appreciate the comments and the response @Z3rio and any constructive criticism is always appreciated
I might pull it down and have a look again and see why I didn't use the clipboard I'm sure I remember trying it, but someone could always pull it down remove the package add the 2-3 lines of js and that I maybe missed and create the pr again and comment on this to say it's outdated because of pr # I don't have or use qb-phone and am not a "qb-core developer" obviously this isn't top of list of things for me todo 😀 but I appreciate the comments and the response @Z3rio and any constructive criticism is always appreciated
Yeah, well, if qb-core actually cared about PRs and merged them, I'd 110% help you fix up this PR. But I already have 6 PRs of my own waiting to be merged/reviewed lmfao
I completely get that buddy I also like to not have a load of outstanding pr's, so I keep them few and fairly minimal my argument for this way could be yeah it adds 25 lines and a libary but it is a very minimal libary and makes re-use of the copy function I implemented to be very easily re-used elsewhere, yes it may able to be done more minimally, but I honestly like this implementation,😂🤣 and I'm not flaming your comments at all @Z3rio they are obviously valid