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

Use shinier menu icons

Summary:
- Use @chad's nice gradient overlay icons.
- Show selected states.
- Use profile picture for profile item (not sure about this treatment?)
- Workflow the logout link

Test Plan: Will add screenshots.

Reviewers: alanh, btrahan, chad

Reviewed By: btrahan

CC: aran

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

+100 -59
+8 -3
src/applications/auth/application/PhabricatorApplicationAuth.php
··· 28 28 29 29 $items = array(); 30 30 31 + if ($controller instanceof PhabricatorLogoutController) { 32 + $class = 'main-menu-item-icon-logout-selected'; 33 + } else { 34 + $class = 'main-menu-item-icon-logout'; 35 + } 36 + 31 37 if ($user->isLoggedIn()) { 32 - require_celerity_resource('phabricator-glyph-css'); 33 - 34 38 $item = new PhabricatorMainMenuIconView(); 35 39 $item->setName(pht('Log Out')); 36 - $item->addClass('glyph glyph-logout'); 40 + $item->addClass('main-menu-item-icon '.$class); 41 + $item->setWorkflow(true); 37 42 $item->setHref('/logout/'); 38 43 $item->setSortOrder(1.0); 39 44 $items[] = $item;
+12 -2
src/applications/people/application/PhabricatorApplicationPeople.php
··· 50 50 51 51 $items = array(); 52 52 53 + if (($controller instanceof PhabricatorPeopleProfileController) && 54 + ($controller->getProfileUser()) && 55 + ($controller->getProfileUser()->getPHID() == $user->getPHID())) { 56 + $class = 'main-menu-item-icon-profile-selected'; 57 + } else { 58 + $class = 'main-menu-item-icon-profile-not-selected'; 59 + } 60 + 53 61 if ($user->isLoggedIn()) { 54 - require_celerity_resource('phabricator-glyph-css'); 62 + $image = $user->loadProfileImageURI(); 63 + 55 64 $item = new PhabricatorMainMenuIconView(); 56 65 $item->setName($user->getUsername()); 57 - $item->addClass('glyph glyph-profile'); 66 + $item->addClass('main-menu-item-icon-profile '.$class); 67 + $item->addStyle('background-image: url('.$image.')'); 58 68 $item->setHref('/p/'.$user->getUsername().'/'); 59 69 $item->setSortOrder(0.0); 60 70 $items[] = $item;
+7 -3
src/applications/people/application/PhabricatorApplicationSettings.php
··· 44 44 45 45 $items = array(); 46 46 47 - if ($user->isLoggedIn()) { 48 - require_celerity_resource('phabricator-glyph-css'); 47 + if ($controller instanceof PhabricatorUserSettingsController) { 48 + $class = 'main-menu-item-icon-settings-selected'; 49 + } else { 50 + $class = 'main-menu-item-icon-settings'; 51 + } 49 52 53 + if ($user->isLoggedIn()) { 50 54 $item = new PhabricatorMainMenuIconView(); 51 55 $item->setName(pht('Settings')); 52 - $item->addClass('glyph glyph-settings'); 56 + $item->addClass('main-menu-item-icon '.$class); 53 57 $item->setHref('/settings/'); 54 58 $item->setSortOrder(0.90); 55 59 $items[] = $item;
+7
src/applications/people/controller/PhabricatorPeopleProfileController.php
··· 21 21 22 22 private $username; 23 23 private $page; 24 + private $profileUser; 24 25 25 26 public function willProcessRequest(array $data) { 26 27 $this->username = idx($data, 'username'); 27 28 $this->page = idx($data, 'page'); 29 + } 30 + 31 + public function getProfileUser() { 32 + return $this->profileUser; 28 33 } 29 34 30 35 public function processRequest() { ··· 37 42 if (!$user) { 38 43 return new Aphront404Response(); 39 44 } 45 + 46 + $this->profileUser = $user; 40 47 41 48 require_celerity_resource('phabricator-profile-css'); 42 49
+14
src/view/page/menu/PhabricatorMainMenuIconView.php
··· 22 22 private $href; 23 23 private $name; 24 24 private $sortOrder = 0.5; 25 + private $workflow; 26 + private $style; 25 27 26 28 public function setName($name) { 27 29 $this->name = $name; 30 + return $this; 31 + } 32 + 33 + public function setWorkflow($workflow) { 34 + $this->workflow = $workflow; 28 35 return $this; 29 36 } 30 37 ··· 43 50 44 51 public function addClass($class) { 45 52 $this->classes[] = $class; 53 + return $this; 54 + } 55 + 56 + public function addStyle($style) { 57 + $this->style = $style; 46 58 return $this; 47 59 } 48 60 ··· 82 94 array( 83 95 'href' => $href, 84 96 'class' => implode(' ', $classes), 97 + 'style' => $this->style, 98 + 'sigil' => $this->workflow ? 'workflow' : null, 85 99 ), 86 100 ''); 87 101
-50
webroot/rsrc/css/application/base/glyph.css
··· 1 - /** 2 - * @provides phabricator-glyph-css 3 - */ 4 - 5 - .glyph { 6 - background-size: 26px auto; 7 - background-image: url(/rsrc/image/glyph_sprite.png); 8 - } 9 - 10 - @media only screen and (min-device-pixel-ratio: 2.0) { 11 - .glyph { 12 - background-image: url(/rsrc/image/glyph_sprite2x.png); 13 - } 14 - } 15 - 16 - .glyph-profile { 17 - background-position: 0 0; 18 - } 19 - 20 - .glyph-profile-active { 21 - background-position: 0 -26px; 22 - } 23 - 24 - .glyph-profile:hover { 25 - background-position: 0 -130px; 26 - } 27 - 28 - .glyph-settings { 29 - background-position: 0px -26px; 30 - } 31 - 32 - .glyph-settings-active { 33 - background-position: 0 0; 34 - } 35 - 36 - .glyph-settings:hover { 37 - background-position: 0 -156px; 38 - } 39 - 40 - .glyph-logout { 41 - background-position: 0 -52px; 42 - } 43 - 44 - .glyph-logout-active { 45 - background-position: 0 -52px; 46 - } 47 - 48 - .glyph-logout:hover { 49 - background-position: 0 -182px; 50 - }
+52 -1
webroot/rsrc/css/application/base/main-menu-view.css
··· 146 146 .phabricator-main-menu-icon { 147 147 width: 26px; 148 148 height: 26px; 149 - margin: 9px 4px; 149 + margin: 9px 6px; 150 150 display: inline-block; 151 151 background-repeat: no-repeat; 152 152 } ··· 173 173 position: absolute; 174 174 } 175 175 176 + .main-menu-item-icon { 177 + background-repeat: no-repeat; 178 + background-size: 26px 26px; 179 + } 180 + 181 + .main-menu-item-icon-settings { 182 + background-image: url(/rsrc/image/menu/icon_settings.png); 183 + } 184 + 185 + .main-menu-item-icon-settings:hover { 186 + background-image: url(/rsrc/image/menu/icon_settings_hover.png); 187 + } 188 + 189 + .main-menu-item-icon-settings-selected { 190 + background-image: url(/rsrc/image/menu/icon_settings_selected.png); 191 + } 192 + 193 + .main-menu-item-icon-logout { 194 + background-image: url(/rsrc/image/menu/icon_logout.png); 195 + } 196 + 197 + .main-menu-item-icon-logout:hover { 198 + background-image: url(/rsrc/image/menu/icon_logout_hover.png); 199 + } 200 + 201 + .main-menu-item-icon-logout-selected { 202 + background-image: url(/rsrc/image/menu/icon_logout_selected.png); 203 + } 204 + 205 + .main-menu-item-icon-profile { 206 + background-repeat: no-repeat; 207 + background-size: 26px 26px; 208 + } 209 + 210 + .device-desktop .main-menu-item-icon-profile { 211 + background-position: 12px 9px; 212 + margin: 0 6px; 213 + padding: 0 12px; 214 + height: 44px; 215 + border-width: 0 1px; 216 + border-style: solid; 217 + border-color: #44494d; 218 + } 219 + 220 + .main-menu-item-icon-profile-not-selected:hover { 221 + background-color: #44494d; 222 + } 223 + 224 + .main-menu-item-icon-profile-selected { 225 + background-color: #44494d; 226 + } 176 227 177 228 /* - Search -------------------------------------------------------------------- 178 229
webroot/rsrc/image/glyph_sprite.png

This is a binary file and will not be displayed.

webroot/rsrc/image/glyph_sprite2x.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_logout.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_logout2x.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_logout2x_hover.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_logout2x_selected.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_logout_hover.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_logout_selected.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_settings.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_settings2x.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_settings2x_hover.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_settings2x_selected.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_settings_hover.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_settings_selected.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_task.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_task2x.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_task2x_hover.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_task2x_selected.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_task_hover.png

This is a binary file and will not be displayed.

webroot/rsrc/image/menu/icon_task_selected.png

This is a binary file and will not be displayed.