Skip to content
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

Token is not displayed correctly in Modal, copying token after click does not work #95

Closed
webard opened this issue Jan 22, 2024 · 8 comments · Fixed by #101
Closed

Token is not displayed correctly in Modal, copying token after click does not work #95

webard opened this issue Jan 22, 2024 · 8 comments · Fixed by #101
Labels

Comments

@webard
Copy link

webard commented Jan 22, 2024

Hello,

token in modal looks like this:
image

and after clicking, there is info that I can copy by click, but nothing happens after clicking.

I have newest version of Laravel and Nova, without any special Laravel Nova plugins. Bug occurs on every browser.

@bluec
Copy link

bluec commented Feb 27, 2024

Yep, the Modal component used has a default size of xl. The size can be passed in the props, e.g. CreatedTokenModal.vue could be modified as follows:

  <Modal :show="show" size="2xl">

@webard
Copy link
Author

webard commented Feb 28, 2024

Good point. What about copying token after clicking? Did you look on this?

@bluec
Copy link

bluec commented Feb 28, 2024

It's not my code, I have just been playing around with it. The copy when clicking works for me.

@JeffBeltran
Copy link
Owner

JeffBeltran commented Mar 7, 2024

looks like they changed some CSS on me (again) between version 4.24.2 => 4.32.16, i'll need to look into a fix

@webard
Copy link
Author

webard commented Mar 7, 2024

I created a fork of your repository: https://github.com/webard/sanctum-tokens because I needed it in my project. It fixes:

  • resized token modal to 4xl to fit token length
  • fixed copying
  • confirmation icon after copy
  • couple style improvements
  • integrated expiration date column from PR add new expired date column #84
  • visual fixes in dark mode

Copying feature works only in https, this should be noted in README.md, I thought it was an error, but it is limitation of browsers.

@JeffBeltran
Copy link
Owner

thanks @webard

With the copy issue, It's more a security issue than a browser issue, but no harm getting a note added there... eventually lol

@webard
Copy link
Author

webard commented Mar 7, 2024

Yeah, I forgot that ClipboardAPI is available only on secured domain 😅. Just in case that other people wille report similar problems it is worth make note in readme.

Copy link

github-actions bot commented Mar 8, 2024

🎉 This issue has been resolved in version 2.1.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants