tiny-pilot / tinypilot

Use your Raspberry Pi as a browser-based KVM.
https://tinypilotkvm.com
MIT License
3k stars 252 forks source link

Convert paste-overlay to paste-dialog #1603

Closed jdeanwallace closed 1 year ago

jdeanwallace commented 1 year ago

Resolves https://github.com/tiny-pilot/tinypilot/issues/1137

This PR completely removes the old "Paste" frontend code and replaces it with a custom <paste-dialog> element.

https://github.com/tiny-pilot/tinypilot/assets/6730025/880e650f-b938-4fd6-8417-55c806cd6301

Notes:

  1. Once the paste-dialog is open, you can just press the "Enter" key to actually paste it to the target machine. This is in accordance to our style guide: https://github.com/tiny-pilot/tinypilot/blob/273b200d9c49c453e753538393a4712f4755dd44/app/templates/styleguide.html#L260-L262 However, this behavior might be unexpected especially if you're manually typing text into the textarea and want to add a newline character. With this in mind, I made sure that you can still add a newline character using Shift+Enter.

Review on CodeApprove

jdeanwallace commented 1 year ago
Automated comment from CodeApprove ➜

⏳ @mtlynch please review this Pull Request