JeffBeltran / sanctum-tokens

Simple Nova Plugin to generate a Laravel Sanctum Personal Access Token
https://novapackages.com/packages/jeffbeltran/sanctum-tokens
51 stars 25 forks source link

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

Closed webard closed 6 months ago

webard commented 7 months ago

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 commented 6 months ago

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 commented 6 months ago

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

bluec commented 6 months ago

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

JeffBeltran commented 6 months ago

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 commented 6 months ago

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

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 commented 6 months ago

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 commented 6 months ago

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.

github-actions[bot] commented 6 months ago

:tada: This issue has been resolved in version 2.1.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: