1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00
phorge-phorge/externals
Benjamin Kausch 89a5d3132c Implements copy button in clone repo modal
Summary:
This diff adds a copy button to every repo uri in the clone repo modal. I have made the button to select the text to a merely structural span before the input - it just shows the type of the repository uri. When you click inside the input, the entire uri will be selected. Also I have uncluttered the HTML structure. A table is not needed here, nothing a flex block can't handle.

| Before    | After     |
|-----------|-----------|
| {F1360344} | {F1368592} |

While at it, I have extended the used javascript copy behavior. First of all: `document.execCommand('copy')` [[ https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand | could stop working every moment in every browser ]]. The [[ https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard | new clipboard API ]] is the way to go, so I have implemented it as the preferred method. The old method is kept as a fallback. And I have added a very nice feature: If defined, the behavior will now issue success or error notifications. See the changed UIExamples for that.

To support the shrinking of JS code with async functions I have patched the JsShrink source.

Test Plan: Go to a repository, hit the clone button and use the new copy button. You will see a shiny notification as a reward.

Reviewers: O1 Blessed Committers, avivey, valerio.bozzolan

Reviewed By: O1 Blessed Committers, avivey, valerio.bozzolan

Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25536
2024-02-15 19:38:39 +01:00
..
cldr Update external timezone information 2024-01-27 13:29:02 +01:00
cowsay Cleanup unused cowsay files (related to legacy Perl binary version) 2023-05-29 09:13:44 +02:00
figlet Include "Figlet" and PEAR "Text_Figlet" in externals 2015-09-13 12:30:48 -07:00
JsShrink Implements copy button in clone repo modal 2024-02-15 19:38:39 +01:00
mimemailparser Backport fix from php-mime-mail-parser to fix attachment parsing 2016-09-21 15:04:20 -07:00
octicons Add profile images to Repositories 2017-06-12 07:51:39 -07:00
pear-figlet Update Figlet implementation to be PHP8 compatible 2023-06-05 09:16:57 -04:00
phpmailer replace usage of each() with foreach() for smtp 2023-03-03 19:27:57 +01:00
phpqrcode Quickly fix phpqrcode syntax 2015-08-31 14:05:51 -07:00
porter-stemmer Update deprecated array access syntax in Porter stemmer 2020-01-14 12:11:39 -08:00
stripe-php Update Stripe PHP API 2014-07-13 09:19:07 -07:00
wordlist Add a common password blacklist 2014-01-23 14:01:18 -08:00
xhprof Fix some issues caught by HipHop, and work around some issues 2011-02-26 21:01:42 -08:00