1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-09 16:32:39 +01:00
phorge-phorge/webroot/rsrc/css
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
..
aphront When users submit "editing" inlines, warn them that their inlines will be saved 2020-05-04 13:13:15 -07:00
application Implements copy button in clone repo modal 2024-02-15 19:38:39 +01:00
core Add flexible line height to remarkup headers 2024-01-28 12:45:04 +01:00
diviner Lots of little fixes for Dark Mode (Experimental) 2017-07-19 14:41:23 -07:00
font Show change information in file icons in the filetree 2020-04-22 08:38:29 -07:00
fuel Improve handle/status list display on devices in commit graph lists 2020-08-12 09:04:08 -07:00
layout Fix source code viewer background color when using Dark Mode in Diffusion 2023-08-17 10:31:51 +02:00
phui Remove bottom margin from embedded remarkup images 2024-01-22 17:06:16 +01:00
syntax Generate syntax highlighting CSS from a reusable map 2016-05-05 02:50:48 -07:00
sprite-login.css Correct Phorge icon on Auth Provider page 2023-06-15 12:02:57 +02:00
sprite-tokens.css More tokens 2016-07-03 18:32:40 -07:00