Skip to content

Conversation

@PythonCoderAS
Copy link

@PythonCoderAS PythonCoderAS commented Jul 30, 2025

Partially fix #4873

PSA: If you want something to currently output the codes in a form that is easy to copy-paste, run this in the console:

console.log(document.querySelector("pre").innerText.trim().replaceAll(/\s{2,}/g, "\n"))

@PythonCoderAS PythonCoderAS changed the title Convert pre to div Add button to copy recovery codes Jul 30, 2025
@Roardom
Copy link
Collaborator

Roardom commented Jul 30, 2025

What happens when you paste the contents into e.g. a password manager additional field that only accepts a single line as input? Will the codes concatenate into a single long code? Can you ensure this usecase retains at least a single space between each code?

@PythonCoderAS
Copy link
Author

What happens when you paste the contents into e.g. a password manager additional field that only accepts a single line as input? Will the codes concatenate into a single long code? Can you ensure this usecase retains at least a single space between each code?

I do not have one of those password managers, but in every single input field that is single-line only, newlines get turned into spaces.

I confirmed this with this following URL in the browser: data:text/html,<input type="text" style="width: 100%">

This gives a single-line text input, and pasting anything with newlines converts them to spaces.

@HDVinnie HDVinnie changed the title Add button to copy recovery codes (Add) Button to copy 2fa recovery codes Jul 30, 2025
@HDVinnie HDVinnie changed the base branch from master to development July 30, 2025 15:54
@PythonCoderAS
Copy link
Author

PythonCoderAS commented Aug 10, 2025

Hi, I'm not sure what I need to do in order to get the PR to pass. I would greatly appreciate some assistance.

@Roardom
Copy link
Collaborator

Roardom commented Aug 10, 2025

I can't remember - can the average signed-in github user view the CI failures? Two of the CI checks are failing

@Roardom
Copy link
Collaborator

Roardom commented Aug 10, 2025

Also, I don't think @script and @endscript officially exist. You can remove that or use @section('scripts') where it will be inserted here:

@PythonCoderAS
Copy link
Author

Also, I don't think @script and @endscript officially exist. You can remove that or use @section('scripts') where it will be inserted here:

According to Livewire docs, this is apparently the correct way to execute JavaScript: https://livewire.laravel.com/docs/javascript#using-javascript-in-livewire-components

@PythonCoderAS
Copy link
Author

Hello, is there any way to disable the spell check for that line only? I would greatly appreciate it.

@HDVinnie
Copy link
Collaborator

Hello, is there any way to disable the spell check for that line only? I would greatly appreciate it.

Just get rid of the @script @endscript tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request] Allow copying all 2FA recovery codes to clipboard

4 participants