@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 Settings for WHITE_CONFIG style boxes

Summary: Updates settings panel UI for new white box, cleans up other various UI nitpicks.

Test Plan: Click through each setting that had a local setting page. Edit Engine pages will follow up on another diff.

Reviewers: epriestley

Reviewed By: epriestley

Spies: Korvin

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

+107 -147
+3 -3
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => 'e68cf1fa', 11 11 'conpherence.pkg.js' => 'b5b51108', 12 - 'core.pkg.css' => 'ebbf04f7', 12 + 'core.pkg.css' => '03264689', 13 13 'core.pkg.js' => '6c085267', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => '45951e9e', ··· 157 157 'rsrc/css/phui/phui-form-view.css' => 'ae9f8d16', 158 158 'rsrc/css/phui/phui-form.css' => '7aaa04e3', 159 159 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', 160 - 'rsrc/css/phui/phui-header-view.css' => '369275d6', 160 + 'rsrc/css/phui/phui-header-view.css' => '67fab16d', 161 161 'rsrc/css/phui/phui-hovercard.css' => 'f0592bcf', 162 162 'rsrc/css/phui/phui-icon-set-selector.css' => '87db8fee', 163 163 'rsrc/css/phui/phui-icon.css' => '5c4a5de6', ··· 843 843 'phui-form-css' => '7aaa04e3', 844 844 'phui-form-view-css' => 'ae9f8d16', 845 845 'phui-head-thing-view-css' => 'fd311e5f', 846 - 'phui-header-view-css' => '369275d6', 846 + 'phui-header-view-css' => '67fab16d', 847 847 'phui-hovercard' => '1bd28176', 848 848 'phui-hovercard-view-css' => 'f0592bcf', 849 849 'phui-icon-set-selector-css' => '87db8fee',
+6 -5
src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php
··· 88 88 )); 89 89 90 90 $generate_button = id(new PHUIButtonView()) 91 - ->setText(pht('Generate API Token')) 91 + ->setText(pht('Generate Token')) 92 92 ->setHref('/conduit/token/edit/?objectPHID='.$user->getPHID()) 93 93 ->setTag('a') 94 94 ->setWorkflow(true) 95 95 ->setIcon('fa-plus'); 96 96 97 97 $terminate_button = id(new PHUIButtonView()) 98 - ->setText(pht('Terminate All Tokens')) 98 + ->setText(pht('Terminate Tokens')) 99 99 ->setHref('/conduit/token/terminate/?objectPHID='.$user->getPHID()) 100 100 ->setTag('a') 101 101 ->setWorkflow(true) 102 - ->setIcon('fa-exclamation-triangle'); 102 + ->setIcon('fa-exclamation-triangle') 103 + ->setColor(PHUIButtonView::RED); 103 104 104 105 $header = id(new PHUIHeaderView()) 105 106 ->setHeader(pht('Active API Tokens')) ··· 108 109 109 110 $panel = id(new PHUIObjectBoxView()) 110 111 ->setHeader($header) 111 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 112 - ->setTable($table); 112 + ->setBackground(PHUIObjectBoxView::WHITE_CONFIG) 113 + ->appendChild($table); 113 114 114 115 return $panel; 115 116 }
+2 -2
src/applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php
··· 134 134 135 135 $panel = id(new PHUIObjectBoxView()) 136 136 ->setHeader($header) 137 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 138 - ->setTable($table); 137 + ->setBackground(PHUIObjectBoxView::WHITE_CONFIG) 138 + ->appendChild($table); 139 139 140 140 return $panel; 141 141 }
+1 -4
src/applications/settings/panel/PhabricatorActivitySettingsPanel.php
··· 46 46 ->setLogs($logs) 47 47 ->setHandles($handles); 48 48 49 - $panel = id(new PHUIObjectBoxView()) 50 - ->setHeaderText(pht('Account Activity Logs')) 51 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 52 - ->setTable($table); 49 + $panel = $this->newBox(pht('Account Activity Logs'), $table); 53 50 54 51 $pager_box = id(new PHUIBoxView()) 55 52 ->addMargin(PHUI::MARGIN_LARGE)
+9 -15
src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php
··· 138 138 $editable, 139 139 )); 140 140 141 - $view = new PHUIObjectBoxView(); 142 - $header = new PHUIHeaderView(); 143 - $header->setHeader(pht('Email Addresses')); 144 - 141 + $button = null; 145 142 if ($editable) { 146 - $button = new PHUIButtonView(); 147 - $button->setText(pht('Add New Address')); 148 - $button->setTag('a'); 149 - $button->setHref($uri->alter('new', 'true')); 150 - $button->setIcon('fa-plus'); 151 - $button->addSigil('workflow'); 152 - $header->addActionLink($button); 143 + $button = id(new PHUIButtonView()) 144 + ->setTag('a') 145 + ->setIcon('fa-plus') 146 + ->setText(pht('Add New Address')) 147 + ->setHref($uri->alter('new', 'true')) 148 + ->addSigil('workflow') 149 + ->setColor(PHUIButtonView::GREY); 153 150 } 154 - $view->setHeader($header); 155 - $view->setTable($table); 156 - $view->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 157 151 158 - return $view; 152 + return $this->newBox(pht('Email Addresses'), $table, array($button)); 159 153 } 160 154 161 155 private function returnNewAddressResponse(
+1 -1
src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php
··· 136 136 ->setHeaderText(pht('Email Preferences')) 137 137 ->setFormSaved($request->getStr('saved')) 138 138 ->setFormErrors($errors) 139 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 139 + ->setBackground(PHUIObjectBoxView::WHITE_CONFIG) 140 140 ->setForm($form); 141 141 142 142 return $form_box;
+12 -23
src/applications/settings/panel/PhabricatorExternalAccountsSettingsPanel.php
··· 31 31 )) 32 32 ->execute(); 33 33 34 - $linked_head = id(new PHUIHeaderView()) 35 - ->setHeader(pht('Linked Accounts and Authentication')); 34 + $linked_head = pht('Linked Accounts and Authentication'); 36 35 37 36 $linked = id(new PHUIObjectItemListView()) 38 37 ->setUser($viewer) 39 - ->setFlush(true) 40 38 ->setNoDataString(pht('You have no linked accounts.')); 41 39 42 40 $login_accounts = 0; ··· 47 45 } 48 46 49 47 foreach ($accounts as $account) { 50 - $item = id(new PHUIObjectItemView()); 48 + $item = new PHUIObjectItemView(); 51 49 52 50 $provider = idx($providers, $account->getProviderKey()); 53 51 if ($provider) { ··· 94 92 $linked->addItem($item); 95 93 } 96 94 97 - $linkable_head = id(new PHUIHeaderView()) 98 - ->setHeader(pht('Add External Account')); 95 + $linkable_head = pht('Add External Account'); 99 96 100 97 $linkable = id(new PHUIObjectItemListView()) 101 98 ->setUser($viewer) 102 - ->setFlush(true) 103 99 ->setNoDataString( 104 100 pht('Your account is linked with all available providers.')); 105 101 ··· 118 114 119 115 $link_uri = '/auth/link/'.$provider->getProviderKey().'/'; 120 116 121 - $item = id(new PHUIObjectItemView()); 122 - $item->setHeader($provider->getProviderName()); 123 - $item->setHref($link_uri); 124 - $item->addAction( 125 - id(new PHUIListItemView()) 126 - ->setIcon('fa-link') 127 - ->setHref($link_uri)); 117 + $item = id(new PHUIObjectItemView()) 118 + ->setHeader($provider->getProviderName()) 119 + ->setHref($link_uri) 120 + ->addAction( 121 + id(new PHUIListItemView()) 122 + ->setIcon('fa-link') 123 + ->setHref($link_uri)); 128 124 129 125 $linkable->addItem($item); 130 126 } 131 127 132 - $linked_box = id(new PHUIObjectBoxView()) 133 - ->setHeader($linked_head) 134 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 135 - ->setObjectList($linked); 136 - 137 - $linkable_box = id(new PHUIObjectBoxView()) 138 - ->setHeader($linkable_head) 139 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 140 - ->setObjectList($linkable); 128 + $linked_box = $this->newBox($linked_head, $linked); 129 + $linkable_box = $this->newBox($linkable_head, $linkable); 141 130 142 131 return array( 143 132 $linked_box,
+13 -20
src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php
··· 101 101 true, 102 102 )); 103 103 104 - $panel = new PHUIObjectBoxView(); 105 - $header = new PHUIHeaderView(); 106 - 107 104 $help_uri = PhabricatorEnv::getDoclink( 108 105 'User Guide: Multi-Factor Authentication'); 109 106 110 - $help_button = id(new PHUIButtonView()) 111 - ->setText(pht('Help')) 112 - ->setHref($help_uri) 107 + $buttons = array(); 108 + 109 + $buttons[] = id(new PHUIButtonView()) 113 110 ->setTag('a') 114 - ->setIcon('fa-info-circle'); 115 - 116 - $create_button = id(new PHUIButtonView()) 117 - ->setText(pht('Add Authentication Factor')) 111 + ->setIcon('fa-plus') 112 + ->setText(pht('Add Auth Factor')) 118 113 ->setHref($this->getPanelURI('?new=true')) 119 - ->setTag('a') 120 114 ->setWorkflow(true) 121 - ->setIcon('fa-plus'); 115 + ->setColor(PHUIButtonView::GREY); 122 116 123 - $header->setHeader(pht('Authentication Factors')); 124 - $header->addActionLink($help_button); 125 - $header->addActionLink($create_button); 126 - 127 - $panel->setHeader($header); 128 - $panel->setTable($table); 129 - $panel->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 117 + $buttons[] = id(new PHUIButtonView()) 118 + ->setTag('a') 119 + ->setIcon('fa-book') 120 + ->setText(pht('Help')) 121 + ->setHref($help_uri) 122 + ->setColor(PHUIButtonView::GREY); 130 123 131 - return $panel; 124 + return $this->newBox(pht('Authentication Factors'), $table, $buttons); 132 125 } 133 126 134 127 private function processNew(AphrontRequest $request) {
+6 -13
src/applications/settings/panel/PhabricatorNotificationsSettingsPanel.php
··· 152 152 id(new AphrontFormSubmitControl()) 153 153 ->setValue(pht('Save Preference'))); 154 154 155 - $test_button = id(new PHUIButtonView()) 155 + $button = id(new PHUIButtonView()) 156 156 ->setTag('a') 157 + ->setIcon('fa-send-o') 157 158 ->setWorkflow(true) 158 159 ->setText(pht('Send Test Notification')) 159 160 ->setHref('/notification/test/') 160 - ->setIcon('fa-exclamation-triangle'); 161 + ->setColor(PHUIButtonView::GREY); 161 162 162 - $form_box = id(new PHUIObjectBoxView()) 163 - ->setHeader( 164 - id(new PHUIHeaderView()) 165 - ->setHeader(pht('Notifications')) 166 - ->addActionLink($test_button)) 167 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 168 - ->appendChild(array( 169 - $saved_box, 170 - $status_box, 171 - $form, 172 - )); 163 + $form_content = array($saved_box, $status_box, $form); 164 + $form_box = $this->newBox( 165 + pht('Notifications'), $form_content, array($button)); 173 166 174 167 $browser_status_box = id(new PHUIInfoView()) 175 168 ->setID($browser_status_id)
+21 -19
src/applications/settings/panel/PhabricatorPasswordSettingsPanel.php
··· 91 91 // is changed here the CSRF token check will fail. 92 92 $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); 93 93 94 - $envelope = new PhutilOpaqueEnvelope($pass); 94 + $envelope = new PhutilOpaqueEnvelope($pass); 95 95 id(new PhabricatorUserEditor()) 96 96 ->setActor($user) 97 97 ->changePassword($user, $envelope); ··· 172 172 ->setDisableAutocomplete(true) 173 173 ->setLabel(pht('New Password')) 174 174 ->setError($e_new) 175 - ->setName('new_pw')); 176 - $form 175 + ->setName('new_pw')) 177 176 ->appendChild( 178 177 id(new AphrontFormPasswordControl()) 179 178 ->setDisableAutocomplete(true) 180 179 ->setLabel(pht('Confirm Password')) 181 180 ->setCaption($len_caption) 182 181 ->setError($e_conf) 183 - ->setName('conf_pw')); 184 - $form 182 + ->setName('conf_pw')) 185 183 ->appendChild( 186 184 id(new AphrontFormSubmitControl()) 187 185 ->setValue(pht('Change Password'))); 188 186 189 - $form->appendChild( 190 - id(new AphrontFormStaticControl()) 191 - ->setLabel(pht('Current Algorithm')) 192 - ->setValue(PhabricatorPasswordHasher::getCurrentAlgorithmName( 193 - new PhutilOpaqueEnvelope($user->getPasswordHash())))); 187 + $properties = id(new PHUIPropertyListView()); 194 188 195 - $form->appendChild( 196 - id(new AphrontFormStaticControl()) 197 - ->setLabel(pht('Best Available Algorithm')) 198 - ->setValue(PhabricatorPasswordHasher::getBestAlgorithmName())); 189 + $properties->addProperty( 190 + pht('Current Algorithm'), 191 + PhabricatorPasswordHasher::getCurrentAlgorithmName( 192 + new PhutilOpaqueEnvelope($user->getPasswordHash()))); 199 193 200 - $form->appendRemarkupInstructions( 201 - pht( 202 - 'NOTE: Changing your password will terminate any other outstanding '. 203 - 'login sessions.')); 194 + $properties->addProperty( 195 + pht('Best Available Algorithm'), 196 + PhabricatorPasswordHasher::getBestAlgorithmName()); 197 + 198 + $info_view = id(new PHUIInfoView()) 199 + ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) 200 + ->appendChild( 201 + pht('Changing your password will terminate any other outstanding '. 202 + 'login sessions.')); 204 203 204 + $algo_box = $this->newBox(pht('Password Algorithms'), $properties); 205 205 $form_box = id(new PHUIObjectBoxView()) 206 206 ->setHeaderText(pht('Change Password')) 207 207 ->setFormSaved($request->getStr('saved')) 208 208 ->setFormErrors($errors) 209 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 209 + ->setBackground(PHUIObjectBoxView::WHITE_CONFIG) 210 210 ->setForm($form); 211 211 212 212 return array( 213 213 $form_box, 214 + $algo_box, 215 + $info_view, 214 216 ); 215 217 } 216 218
+1 -8
src/applications/settings/panel/PhabricatorSSHKeysSettingsPanel.php
··· 45 45 $viewer, 46 46 $user); 47 47 48 - $header->setHeader(pht('SSH Public Keys')); 49 - $header->addActionLink($ssh_actions); 50 - 51 - $panel->setHeader($header); 52 - $panel->setTable($table); 53 - $panel->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 54 - 55 - return $panel; 48 + return $this->newBox(pht('SSH Public Keys'), $table, array($ssh_actions)); 56 49 } 57 50 58 51 }
+10 -17
src/applications/settings/panel/PhabricatorSessionsSettingsPanel.php
··· 112 112 'action', 113 113 )); 114 114 115 - $terminate_button = id(new PHUIButtonView()) 115 + $buttons = array(); 116 + $buttons[] = id(new PHUIButtonView()) 117 + ->setTag('a') 118 + ->setIcon('fa-warning') 116 119 ->setText(pht('Terminate All Sessions')) 117 120 ->setHref('/auth/session/terminate/all/') 118 - ->setTag('a') 119 121 ->setWorkflow(true) 120 - ->setIcon('fa-exclamation-triangle'); 121 - 122 - $header = id(new PHUIHeaderView()) 123 - ->setHeader(pht('Active Login Sessions')) 124 - ->addActionLink($terminate_button); 122 + ->setColor(PHUIButtonView::RED); 125 123 126 124 $hisec = ($viewer->getSession()->getHighSecurityUntil() - time()); 127 125 if ($hisec > 0) { 128 - $hisec_button = id(new PHUIButtonView()) 126 + $buttons[] = id(new PHUIButtonView()) 127 + ->setTag('a') 128 + ->setIcon('fa-lock') 129 129 ->setText(pht('Leave High Security')) 130 130 ->setHref('/auth/session/downgrade/') 131 - ->setTag('a') 132 131 ->setWorkflow(true) 133 - ->setIcon('fa-lock'); 134 - $header->addActionLink($hisec_button); 132 + ->setColor(PHUIButtonView::RED); 135 133 } 136 134 137 - $panel = id(new PHUIObjectBoxView()) 138 - ->setHeader($header) 139 - ->setTable($table) 140 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY); 141 - 142 - return $panel; 135 + return $this->newBox(pht('Active Login Sessions'), $table, $buttons); 143 136 } 144 137 145 138 }
+17
src/applications/settings/panel/PhabricatorSettingsPanel.php
··· 281 281 $editor->applyTransactions($preferences, $xactions); 282 282 } 283 283 284 + 285 + public function newBox($title, $content, $actions = array()) { 286 + $header = id(new PHUIHeaderView()) 287 + ->setHeader($title); 288 + 289 + foreach ($actions as $action) { 290 + $header->addActionLink($action); 291 + } 292 + 293 + $view = id(new PHUIObjectBoxView()) 294 + ->setHeader($header) 295 + ->appendChild($content) 296 + ->setBackground(PHUIObjectBoxView::WHITE_CONFIG); 297 + 298 + return $view; 299 + } 300 + 284 301 }
+5 -13
src/applications/settings/panel/PhabricatorTokensSettingsPanel.php
··· 71 71 'action', 72 72 )); 73 73 74 - $terminate_button = id(new PHUIButtonView()) 74 + $button = id(new PHUIButtonView()) 75 + ->setTag('a') 76 + ->setIcon('fa-warning') 75 77 ->setText(pht('Revoke All')) 76 78 ->setHref('/auth/token/revoke/all/') 77 - ->setTag('a') 78 79 ->setWorkflow(true) 79 - ->setIcon('fa-exclamation-triangle'); 80 - 81 - $header = id(new PHUIHeaderView()) 82 - ->setHeader(pht('Temporary Tokens')) 83 - ->addActionLink($terminate_button); 80 + ->setColor(PHUIButtonView::RED); 84 81 85 - $panel = id(new PHUIObjectBoxView()) 86 - ->setHeader($header) 87 - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) 88 - ->setTable($table); 89 - 90 - return $panel; 82 + return $this->newBox(pht('Temporary Tokens'), $table, array($button)); 91 83 } 92 84 93 85 }
-4
webroot/rsrc/css/phui/phui-header-view.css
··· 341 341 color: {$blacktext}; 342 342 } 343 343 344 - .phui-profile-header .phui-header-col3 { 345 - vertical-align: top; 346 - } 347 - 348 344 .phui-header-view .phui-tag-indigo a { 349 345 color: {$sh-indigotext}; 350 346 }