@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add a Copy button to OAuth Server Application Secret dialog

Summary:
Allow clicking once to copy an OAuth Server Application Secret to be used in some external application anyway, instead of having to click into the text field and copy its value.
Also make clicking into the text field select its value.
Also convert this from an AphrontFormTextAreaControl to an AphrontFormTextControl as this is a single line, and use the standard dialog width, for the sake of consistency.

Closes T16519

Test Plan:
1. `./bin/config set phabricator.show-prototypes true`
2. Install/enable http://phorge.localhost/applications/view/PhabricatorOAuthServerApplication/
3. Go to http://phorge.localhost/oauthserver/ and create an Auth Server
4. Go to http://phorge.localhost/oauthserver/client/view/1
5. Select "Show Application Secret"
6. Click "Show Application Secret"
7. See a Copy button next to the "Token" text field; hover over it, click it, paste, etc
8. Click into the "Token" text field, see that the value gets selected

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16519

Differential Revision: https://we.phorge.it/D26790

+4 -3
+4 -3
src/applications/oauthserver/controller/client/PhabricatorOAuthClientSecretController.php
··· 28 28 if ($request->isFormPost()) { 29 29 $secret = $client->getSecret(); 30 30 31 + Javelin::initBehavior('select-on-click'); 31 32 $body = id(new PHUIFormLayoutView()) 32 33 ->appendChild( 33 - id(new AphrontFormTextAreaControl()) 34 + id(new AphrontFormTextControl()) 34 35 ->setLabel(pht('Plaintext')) 35 36 ->setReadOnly(true) 36 - ->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_SHORT) 37 + ->setSigil('select-on-click') 38 + ->setHasCopyButton(true) 37 39 ->setValue($secret)); 38 40 39 41 return $this->newDialog() 40 - ->setWidth(AphrontDialogView::WIDTH_FORM) 41 42 ->setTitle(pht('Application Secret')) 42 43 ->appendChild($body) 43 44 ->addCancelButton($view_uri, pht('Done'));