@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.

Update Passphrase Edit/Create UI

Summary: Updates pages to modern UI, newPage

Test Plan: Create Crediential, Edit Credential

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15612

+36 -27
+15 -9
src/applications/passphrase/controller/PassphraseCredentialCreateController.php
··· 49 49 50 50 $crumbs = $this->buildApplicationCrumbs(); 51 51 $crumbs->addTextCrumb(pht('Create')); 52 + $crumbs->setBorder(true); 52 53 53 54 $box = id(new PHUIObjectBoxView()) 54 - ->setHeaderText(pht('Create New Credential')) 55 + ->setHeaderText(pht('Credential')) 55 56 ->setFormErrors($errors) 57 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 56 58 ->setForm($form); 57 59 58 - return $this->buildApplicationPage( 59 - array( 60 - $crumbs, 61 - $box, 62 - ), 63 - array( 64 - 'title' => $title, 65 - )); 60 + $header = id(new PHUIHeaderView()) 61 + ->setHeader($title) 62 + ->setHeaderIcon('fa-plus-square'); 63 + 64 + $view = id(new PHUITwoColumnView()) 65 + ->setHeader($header) 66 + ->setFooter($box); 67 + 68 + return $this->newPage() 69 + ->setTitle($title) 70 + ->setCrumbs($crumbs) 71 + ->appendChild($view); 66 72 } 67 73 68 74 }
+20 -15
src/applications/passphrase/controller/PassphraseCredentialEditController.php
··· 311 311 } 312 312 313 313 $crumbs = $this->buildApplicationCrumbs(); 314 + $crumbs->setBorder(true); 314 315 315 316 if ($is_new) { 316 - $title = pht('Create Credential'); 317 - $header = pht('Create New Credential'); 317 + $title = pht('Create New Credential'); 318 318 $crumbs->addTextCrumb(pht('Create')); 319 319 $cancel_uri = $this->getApplicationURI(); 320 + $header_icon = 'fa-plus-square'; 320 321 } else { 321 - $title = pht('Edit Credential'); 322 - $header = pht('Edit Credential %s', 'K'.$credential->getID()); 322 + $title = pht('Edit Credential: %s', $credential->getName()); 323 323 $crumbs->addTextCrumb( 324 324 'K'.$credential->getID(), 325 325 '/K'.$credential->getID()); 326 326 $crumbs->addTextCrumb(pht('Edit')); 327 327 $cancel_uri = '/K'.$credential->getID(); 328 + $header_icon = 'fa-pencil'; 328 329 } 329 330 330 331 if ($request->isAjax()) { ··· 332 333 $errors = id(new PHUIInfoView())->setErrors($errors); 333 334 } 334 335 335 - $dialog = id(new AphrontDialogView()) 336 - ->setUser($viewer) 336 + return $this->newDialog() 337 337 ->setWidth(AphrontDialogView::WIDTH_FORM) 338 338 ->setTitle($title) 339 339 ->appendChild($errors) 340 340 ->appendChild($form->buildLayoutView()) 341 341 ->addSubmitButton(pht('Create Credential')) 342 342 ->addCancelButton($cancel_uri); 343 - 344 - return id(new AphrontDialogResponse())->setDialog($dialog); 345 343 } 346 344 347 345 $form->appendChild( ··· 350 348 ->addCancelButton($cancel_uri)); 351 349 352 350 $box = id(new PHUIObjectBoxView()) 353 - ->setHeaderText($header) 351 + ->setHeaderText(pht('Credential')) 354 352 ->setFormErrors($errors) 355 353 ->setValidationException($validation_exception) 354 + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 356 355 ->setForm($form); 357 356 358 - return $this->buildApplicationPage( 359 - array( 360 - $crumbs, 357 + $header = id(new PHUIHeaderView()) 358 + ->setHeader($title) 359 + ->setHeaderIcon($header_icon); 360 + 361 + $view = id(new PHUITwoColumnView()) 362 + ->setHeader($header) 363 + ->setFooter(array( 361 364 $box, 362 - ), 363 - array( 364 - 'title' => $title, 365 365 )); 366 + 367 + return $this->newPage() 368 + ->setTitle($title) 369 + ->setCrumbs($crumbs) 370 + ->appendChild($view); 366 371 } 367 372 368 373 private function getCredentialType($type_const) {
+1 -3
src/applications/passphrase/controller/PassphraseCredentialPublicController.php
··· 40 40 ->setReadOnly(true) 41 41 ->setValue($public_key)); 42 42 43 - $dialog = id(new AphrontDialogView()) 44 - ->setUser($viewer) 43 + return $this->newDialog() 45 44 ->setWidth(AphrontDialogView::WIDTH_FORM) 46 45 ->setTitle(pht('Public Key (%s)', $credential->getMonogram())) 47 46 ->appendChild($body) 48 47 ->addCancelButton($view_uri, pht('Done')); 49 48 50 - return id(new AphrontDialogResponse())->setDialog($dialog); 51 49 } 52 50 53 51 }