Page MenuHomePhabricator

D15550.diff
No OneTemporary

D15550.diff

diff --git a/src/applications/auth/controller/PhabricatorAuthConfirmLinkController.php b/src/applications/auth/controller/PhabricatorAuthConfirmLinkController.php
--- a/src/applications/auth/controller/PhabricatorAuthConfirmLinkController.php
+++ b/src/applications/auth/controller/PhabricatorAuthConfirmLinkController.php
@@ -66,15 +66,12 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Confirm Link'), $panel_uri);
$crumbs->addTextCrumb($provider->getProviderName());
+ $crumbs->setBorder(true);
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $dialog,
- ),
- array(
- 'title' => pht('Confirm External Account Link'),
- ));
+ return $this->newPage()
+ ->setTitle(pht('Confirm External Account Link'))
+ ->setCrumbs($crumbs)
+ ->appendChild($dialog);
}
diff --git a/src/applications/auth/controller/PhabricatorAuthController.php b/src/applications/auth/controller/PhabricatorAuthController.php
--- a/src/applications/auth/controller/PhabricatorAuthController.php
+++ b/src/applications/auth/controller/PhabricatorAuthController.php
@@ -7,11 +7,9 @@
$view->setTitle($title);
$view->setErrors($messages);
- return $this->buildApplicationPage(
- $view,
- array(
- 'title' => $title,
- ));
+ return $this->newPage()
+ ->setTitle($title)
+ ->appendChild($view);
}
diff --git a/src/applications/auth/controller/PhabricatorAuthLinkController.php b/src/applications/auth/controller/PhabricatorAuthLinkController.php
--- a/src/applications/auth/controller/PhabricatorAuthLinkController.php
+++ b/src/applications/auth/controller/PhabricatorAuthLinkController.php
@@ -116,15 +116,12 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Link Account'), $panel_uri);
$crumbs->addTextCrumb($provider->getProviderName($name));
+ $crumbs->setBorder(true);
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $form,
- ),
- array(
- 'title' => $title,
- ));
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($form);
}
}
diff --git a/src/applications/auth/controller/PhabricatorAuthLoginController.php b/src/applications/auth/controller/PhabricatorAuthLoginController.php
--- a/src/applications/auth/controller/PhabricatorAuthLoginController.php
+++ b/src/applications/auth/controller/PhabricatorAuthLoginController.php
@@ -236,7 +236,6 @@
$content) {
$crumbs = $this->buildApplicationCrumbs();
- $crumbs->setBorder(true);
if ($this->getRequest()->getUser()->isLoggedIn()) {
$crumbs->addTextCrumb(pht('Link Account'), $provider->getSettingsURI());
@@ -245,15 +244,12 @@
}
$crumbs->addTextCrumb($provider->getProviderName());
+ $crumbs->setBorder(true);
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $content,
- ),
- array(
- 'title' => pht('Login'),
- ));
+ return $this->newPage()
+ ->setTitle(pht('Login'))
+ ->setCrumbs($crumbs)
+ ->appendChild($content);
}
public function buildProviderErrorResponse(
diff --git a/src/applications/auth/controller/PhabricatorAuthNeedsApprovalController.php b/src/applications/auth/controller/PhabricatorAuthNeedsApprovalController.php
--- a/src/applications/auth/controller/PhabricatorAuthNeedsApprovalController.php
+++ b/src/applications/auth/controller/PhabricatorAuthNeedsApprovalController.php
@@ -28,11 +28,10 @@
->appendChild($wait_for_approval)
->addCancelButton('/', pht('Wait Patiently'));
- return $this->buildApplicationPage(
- $dialog,
- array(
- 'title' => pht('Wait For Approval'),
- ));
+ return $this->newPage()
+ ->setTitle(pht('Wait For Approval'))
+ ->appendChild($dialog);
+
}
}
diff --git a/src/applications/auth/controller/PhabricatorAuthNeedsMultiFactorController.php b/src/applications/auth/controller/PhabricatorAuthNeedsMultiFactorController.php
--- a/src/applications/auth/controller/PhabricatorAuthNeedsMultiFactorController.php
+++ b/src/applications/auth/controller/PhabricatorAuthNeedsMultiFactorController.php
@@ -76,15 +76,16 @@
));
}
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $help,
- $panel,
- ),
- array(
- 'title' => pht('Add Multi-Factor Authentication'),
- ));
+ $view = array(
+ $help,
+ $panel,
+ );
+
+ return $this->newPage()
+ ->setTitle(pht('Add Multi-Factor Authentication'))
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
+
}
}
diff --git a/src/applications/auth/controller/PhabricatorAuthRegisterController.php b/src/applications/auth/controller/PhabricatorAuthRegisterController.php
--- a/src/applications/auth/controller/PhabricatorAuthRegisterController.php
+++ b/src/applications/auth/controller/PhabricatorAuthRegisterController.php
@@ -497,6 +497,7 @@
$crumbs->addTextCrumb($provider->getProviderName());
$title = pht('Phabricator Registration');
}
+ $crumbs->setBorder(true);
$welcome_view = null;
if ($is_setup) {
@@ -511,7 +512,6 @@
}
$object_box = id(new PHUIObjectBoxView())
- ->setHeaderText($title)
->setForm($form)
->setFormErrors($errors);
@@ -520,16 +520,21 @@
$invite_header = $this->renderInviteHeader($invite);
}
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $welcome_view,
- $invite_header,
- $object_box,
- ),
- array(
- 'title' => $title,
- ));
+ $header = id(new PHUIHeaderView())
+ ->setHeader($title);
+
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setFooter(array(
+ $welcome_view,
+ $invite_header,
+ $object_box,
+ ));
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
}
private function loadDefaultAccount() {
diff --git a/src/applications/auth/controller/PhabricatorAuthStartController.php b/src/applications/auth/controller/PhabricatorAuthStartController.php
--- a/src/applications/auth/controller/PhabricatorAuthStartController.php
+++ b/src/applications/auth/controller/PhabricatorAuthStartController.php
@@ -189,16 +189,17 @@
$crumbs->addTextCrumb(pht('Login'));
$crumbs->setBorder(true);
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $header,
- $invite_message,
- $out,
- ),
- array(
- 'title' => pht('Login to Phabricator'),
- ));
+ $title = pht('Login to Phabricator');
+ $view = array(
+ $header,
+ $invite_message,
+ $out,
+ );
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
}
diff --git a/src/applications/auth/controller/PhabricatorDisabledUserController.php b/src/applications/auth/controller/PhabricatorDisabledUserController.php
--- a/src/applications/auth/controller/PhabricatorDisabledUserController.php
+++ b/src/applications/auth/controller/PhabricatorDisabledUserController.php
@@ -15,8 +15,7 @@
return new Aphront404Response();
}
- return id(new AphrontDialogView())
- ->setUser($viewer)
+ return $this->newDialog()
->setTitle(pht('Account Disabled'))
->addCancelButton('/logout/', pht('Okay'))
->appendParagraph(pht('Your account has been disabled.'));
diff --git a/src/applications/auth/controller/PhabricatorEmailLoginController.php b/src/applications/auth/controller/PhabricatorEmailLoginController.php
--- a/src/applications/auth/controller/PhabricatorEmailLoginController.php
+++ b/src/applications/auth/controller/PhabricatorEmailLoginController.php
@@ -144,6 +144,7 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Reset Password'));
+ $crumbs->setBorder(true);
$dialog = new AphrontDialogView();
$dialog->setUser($request->getUser());
@@ -152,14 +153,11 @@
$dialog->addSubmitButton(pht('Send Email'));
$dialog->setSubmitURI('/login/email/');
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $dialog,
- ),
- array(
- 'title' => pht('Forgot Password'),
- ));
+ return $this->newPage()
+ ->setTitle(pht('Forgot Password'))
+ ->setCrumbs($crumbs)
+ ->appendChild($dialog);
+
}
}
diff --git a/src/applications/auth/controller/PhabricatorEmailVerificationController.php b/src/applications/auth/controller/PhabricatorEmailVerificationController.php
--- a/src/applications/auth/controller/PhabricatorEmailVerificationController.php
+++ b/src/applications/auth/controller/PhabricatorEmailVerificationController.php
@@ -77,15 +77,13 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Verify Email'));
+ $crumbs->setBorder(true);
+
+ return $this->newPage()
+ ->setTitle(pht('Verify Email'))
+ ->setCrumbs($crumbs)
+ ->appendChild($dialog);
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $dialog,
- ),
- array(
- 'title' => pht('Verify Email'),
- ));
}
}
diff --git a/src/applications/auth/controller/PhabricatorLogoutController.php b/src/applications/auth/controller/PhabricatorLogoutController.php
--- a/src/applications/auth/controller/PhabricatorLogoutController.php
+++ b/src/applications/auth/controller/PhabricatorLogoutController.php
@@ -56,14 +56,11 @@
}
if ($viewer->getPHID()) {
- $dialog = id(new AphrontDialogView())
- ->setUser($viewer)
+ return $this->newDialog()
->setTitle(pht('Log out of Phabricator?'))
->appendChild(pht('Are you sure you want to log out?'))
->addSubmitButton(pht('Logout'))
->addCancelButton('/');
-
- return id(new AphrontDialogResponse())->setDialog($dialog);
}
return id(new AphrontRedirectResponse())->setURI('/');
diff --git a/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php b/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php
--- a/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php
+++ b/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php
@@ -53,14 +53,15 @@
->appendParagraph($send_again)
->addSubmitButton(pht('Send Another Email'));
- return $this->buildApplicationPage(
- array(
- $sent,
- $dialog,
- ),
- array(
- 'title' => pht('Must Verify Email'),
- ));
+ $view = array(
+ $sent,
+ $dialog,
+ );
+
+ return $this->newPage()
+ ->setTitle(pht('Must Verify Email'))
+ ->appendChild($view);
+
}
}
diff --git a/src/applications/auth/controller/config/PhabricatorAuthEditController.php b/src/applications/auth/controller/config/PhabricatorAuthEditController.php
--- a/src/applications/auth/controller/config/PhabricatorAuthEditController.php
+++ b/src/applications/auth/controller/config/PhabricatorAuthEditController.php
@@ -176,15 +176,33 @@
$button = pht('Add Provider');
}
$crumb = pht('Add Provider');
- $title = pht('Add Authentication Provider');
+ $title = pht('Add Auth Provider');
+ $header_icon = 'fa-plus-square';
$cancel_uri = $this->getApplicationURI('/config/new/');
} else {
$button = pht('Save');
$crumb = pht('Edit Provider');
- $title = pht('Edit Authentication Provider');
+ $title = pht('Edit Auth Provider');
+ $header_icon = 'fa-pencil';
$cancel_uri = $this->getApplicationURI();
}
+ $header = id(new PHUIHeaderView())
+ ->setHeader(pht('%s: %s', $title, $provider->getProviderName()))
+ ->setHeaderIcon($header_icon);
+
+ if ($config->getIsEnabled()) {
+ $status_name = pht('Enabled');
+ $status_color = 'green';
+ $status_icon = 'fa-check';
+ $header->setStatus($status_icon, $status_color, $status_name);
+ } else if (!$is_new) {
+ $status_name = pht('Disabled');
+ $status_color = 'indigo';
+ $status_icon = 'fa-ban';
+ $header->setStatus($status_icon, $status_color, $status_name);
+ }
+
$config_name = 'auth.email-domains';
$config_href = '/config/edit/'.$config_name.'/';
@@ -253,33 +271,9 @@
'Phabricator will automatically login with this provider if it is '.
'the only available provider.'));
- $status_tag = id(new PHUITagView())
- ->setType(PHUITagView::TYPE_STATE);
- if ($is_new) {
- $status_tag
- ->setName(pht('New Provider'))
- ->setBackgroundColor('blue');
- } else if ($config->getIsEnabled()) {
- $status_tag
- ->setName(pht('Enabled'))
- ->setBackgroundColor('green');
- } else {
- $status_tag
- ->setName(pht('Disabled'))
- ->setBackgroundColor('red');
- }
-
$form = id(new AphrontFormView())
->setUser($viewer)
->appendChild(
- id(new AphrontFormStaticControl())
- ->setLabel(pht('Provider'))
- ->setValue($provider->getProviderName()))
- ->appendChild(
- id(new AphrontFormStaticControl())
- ->setLabel(pht('Status'))
- ->setValue($status_tag))
- ->appendChild(
id(new AphrontFormCheckboxControl())
->setLabel(pht('Allow'))
->addCheckbox(
@@ -348,6 +342,7 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb($crumb);
+ $crumbs->setBorder(true);
$timeline = null;
if (!$is_new) {
@@ -358,23 +353,28 @@
foreach ($xactions as $xaction) {
$xaction->setProvider($provider);
}
+ $timeline->setShouldTerminate(true);
}
$form_box = id(new PHUIObjectBoxView())
- ->setHeaderText($title)
+ ->setHeaderText(pht('Provider'))
->setFormErrors($errors)
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setForm($form);
- return $this->buildApplicationPage(
- array(
- $crumbs,
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setFooter(array(
$form_box,
$footer,
$timeline,
- ),
- array(
- 'title' => $title,
));
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
+
}
}
diff --git a/src/applications/auth/controller/config/PhabricatorAuthListController.php b/src/applications/auth/controller/config/PhabricatorAuthListController.php
--- a/src/applications/auth/controller/config/PhabricatorAuthListController.php
+++ b/src/applications/auth/controller/config/PhabricatorAuthListController.php
@@ -3,9 +3,8 @@
final class PhabricatorAuthListController
extends PhabricatorAuthProviderConfigController {
- public function processRequest() {
- $request = $this->getRequest();
- $viewer = $request->getUser();
+ public function handleRequest(AphrontRequest $request) {
+ $viewer = $this->getViewer();
$configs = id(new PhabricatorAuthProviderConfigQuery())
->setViewer($viewer)
@@ -93,6 +92,7 @@
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Auth Providers'));
+ $crumbs->setBorder(true);
$domains_key = 'auth.email-domains';
$domains_link = $this->renderConfigLink($domains_key);
@@ -155,24 +155,29 @@
->setDisabled(!$can_manage)
->setText(pht('Add Provider'));
- $header = id(new PHUIHeaderView())
- ->setHeader(pht('Authentication Providers'))
- ->addActionLink($button);
-
$list->setFlush(true);
$list = id(new PHUIObjectBoxView())
- ->setHeader($header)
- ->setInfoView($warning)
+ ->setHeaderText(pht('Providers'))
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->appendChild($list);
- return $this->buildApplicationPage(
- array(
- $crumbs,
+ $title = pht('Auth Providers');
+ $header = id(new PHUIHeaderView())
+ ->setHeader($title)
+ ->setHeaderIcon('fa-key')
+ ->addActionLink($button);
+
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setFooter(array(
+ $warning,
$list,
- ),
- array(
- 'title' => pht('Authentication Providers'),
));
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
}
private function renderConfigLink($key) {
diff --git a/src/applications/auth/controller/config/PhabricatorAuthNewController.php b/src/applications/auth/controller/config/PhabricatorAuthNewController.php
--- a/src/applications/auth/controller/config/PhabricatorAuthNewController.php
+++ b/src/applications/auth/controller/config/PhabricatorAuthNewController.php
@@ -80,21 +80,32 @@
->setValue(pht('Continue')));
$form_box = id(new PHUIObjectBoxView())
- ->setHeaderText(pht('Add Authentication Provider'))
+ ->setHeaderText(pht('Provider'))
->setFormErrors($errors)
+ ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setForm($form);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Add Provider'));
+ $crumbs->setBorder(true);
- return $this->buildApplicationPage(
- array(
- $crumbs,
+ $title = pht('Add Auth Provider');
+
+ $header = id(new PHUIHeaderView())
+ ->setHeader($title)
+ ->setHeaderIcon('fa-plus-square');
+
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setFooter(array(
$form_box,
- ),
- array(
- 'title' => pht('Add Authentication Provider'),
));
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->appendChild($view);
+
}
}
diff --git a/src/applications/auth/storage/PhabricatorAuthProviderConfigTransaction.php b/src/applications/auth/storage/PhabricatorAuthProviderConfigTransaction.php
--- a/src/applications/auth/storage/PhabricatorAuthProviderConfigTransaction.php
+++ b/src/applications/auth/storage/PhabricatorAuthProviderConfigTransaction.php
@@ -44,9 +44,9 @@
switch ($this->getTransactionType()) {
case self::TYPE_ENABLE:
if ($new) {
- return 'fa-play';
+ return 'fa-check';
} else {
- return 'fa-pause';
+ return 'fa-ban';
}
}
@@ -62,7 +62,7 @@
if ($new) {
return 'green';
} else {
- return 'red';
+ return 'indigo';
}
}

File Metadata

Mime Type
text/plain
Expires
Sat, May 18, 2:42 PM (2 w, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6276353
Default Alt Text
D15550.diff (18 KB)

Event Timeline