diff --git a/resources/celerity/map.php b/resources/celerity/map.php --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ 'names' => array( 'conpherence.pkg.css' => 'e25569a9', 'conpherence.pkg.js' => '6249a1cf', - 'core.pkg.css' => 'ea0e9c0c', + 'core.pkg.css' => 'b5a5c7f9', 'core.pkg.js' => '2291d3b2', 'darkconsole.pkg.js' => 'e7393ebb', 'differential.pkg.css' => '4815647b', @@ -34,10 +34,9 @@ 'rsrc/css/aphront/typeahead.css' => 'd4f16145', 'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af', 'rsrc/css/application/auth/auth.css' => '0877ed6e', - 'rsrc/css/application/base/main-menu-view.css' => '8eac4166', + 'rsrc/css/application/base/main-menu-view.css' => '93519cb0', 'rsrc/css/application/base/notification-menu.css' => '6a697e43', - 'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601', - 'rsrc/css/application/base/phui-theme.css' => '798c69b8', + 'rsrc/css/application/base/phui-theme.css' => '9f261c6b', 'rsrc/css/application/base/standard-page-view.css' => '894d8a25', 'rsrc/css/application/chatlog/chatlog.css' => 'd295b020', 'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4', @@ -131,9 +130,9 @@ 'rsrc/css/phui/phui-action-list.css' => '5679229f', 'rsrc/css/phui/phui-action-panel.css' => '91c7b835', 'rsrc/css/phui/phui-badge.css' => '3baef8db', - 'rsrc/css/phui/phui-basic-nav-view.css' => '7093573b', + 'rsrc/css/phui/phui-basic-nav-view.css' => '58b3d117', 'rsrc/css/phui/phui-big-info-view.css' => 'bd903741', - 'rsrc/css/phui/phui-box.css' => '33b629f8', + 'rsrc/css/phui/phui-box.css' => '3df736e5', 'rsrc/css/phui/phui-button.css' => '00ddac15', 'rsrc/css/phui/phui-chart.css' => '6bf6f78e', 'rsrc/css/phui/phui-cms.css' => 'be43c8a8', @@ -162,7 +161,7 @@ 'rsrc/css/phui/phui-object-box.css' => '8b289e3d', 'rsrc/css/phui/phui-pager.css' => 'bea33d23', 'rsrc/css/phui/phui-pinboard-view.css' => '2495140e', - 'rsrc/css/phui/phui-profile-menu.css' => 'c71ecdcd', + 'rsrc/css/phui/phui-profile-menu.css' => '12aafe66', 'rsrc/css/phui/phui-property-list-view.css' => '6d8e58ac', 'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591', 'rsrc/css/phui/phui-segment-bar-view.css' => '46342871', @@ -172,7 +171,7 @@ 'rsrc/css/phui/phui-timeline-view.css' => 'bc523970', 'rsrc/css/phui/phui-two-column-view.css' => 'f63cad3c', 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'b60ef38a', - 'rsrc/css/phui/workboards/phui-workboard.css' => 'c88912ee', + 'rsrc/css/phui/workboards/phui-workboard.css' => '3bc85455', 'rsrc/css/phui/workboards/phui-workcard.css' => 'cca5fa92', 'rsrc/css/phui/workboards/phui-workpanel.css' => 'a3a63478', 'rsrc/css/sprite-login.css' => '587d92d7', @@ -781,7 +780,6 @@ 'path-typeahead' => 'f7fc67ec', 'people-profile-css' => '2473d929', 'phabricator-action-list-view-css' => '5679229f', - 'phabricator-application-launch-view-css' => '95351601', 'phabricator-busy' => '59a7976a', 'phabricator-chatlog-css' => 'd295b020', 'phabricator-content-source-view-css' => '4b8b05d4', @@ -798,7 +796,7 @@ 'phabricator-flag-css' => 'bba8f811', 'phabricator-keyboard-shortcut' => '1ae869f2', 'phabricator-keyboard-shortcut-manager' => '4a021c10', - 'phabricator-main-menu-view' => '8eac4166', + 'phabricator-main-menu-view' => '93519cb0', 'phabricator-nav-view-css' => 'b29426e9', 'phabricator-notification' => 'ccf1cbf8', 'phabricator-notification-css' => '3f6c89c9', @@ -839,9 +837,9 @@ 'phriction-document-css' => '4282e4ad', 'phui-action-panel-css' => '91c7b835', 'phui-badge-view-css' => '3baef8db', - 'phui-basic-nav-view-css' => '7093573b', + 'phui-basic-nav-view-css' => '58b3d117', 'phui-big-info-view-css' => 'bd903741', - 'phui-box-css' => '33b629f8', + 'phui-box-css' => '3df736e5', 'phui-button-css' => '00ddac15', 'phui-calendar-css' => '477acfaa', 'phui-calendar-day-css' => '572b1893', @@ -883,18 +881,18 @@ 'phui-oi-simple-ui-css' => 'a8beebea', 'phui-pager-css' => 'bea33d23', 'phui-pinboard-view-css' => '2495140e', - 'phui-profile-menu-css' => 'c71ecdcd', + 'phui-profile-menu-css' => '12aafe66', 'phui-property-list-view-css' => '6d8e58ac', 'phui-remarkup-preview-css' => '1a8f2591', 'phui-segment-bar-view-css' => '46342871', 'phui-spacing-css' => '042804d6', 'phui-status-list-view-css' => 'd5263e49', 'phui-tag-view-css' => '84d65f26', - 'phui-theme-css' => '798c69b8', + 'phui-theme-css' => '9f261c6b', 'phui-timeline-view-css' => 'bc523970', 'phui-two-column-view-css' => 'f63cad3c', 'phui-workboard-color-css' => 'b60ef38a', - 'phui-workboard-view-css' => 'c88912ee', + 'phui-workboard-view-css' => '3bc85455', 'phui-workcard-view-css' => 'cca5fa92', 'phui-workpanel-view-css' => 'a3a63478', 'phuix-action-list-view' => 'b5c256b8', @@ -1612,9 +1610,6 @@ 'javelin-stratcom', 'javelin-util', ), - '8eac4166' => array( - 'phui-theme-css', - ), '8ff5e24c' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1636,6 +1631,9 @@ 'javelin-stratcom', 'javelin-dom', ), + '93519cb0' => array( + 'phui-theme-css', + ), '93ae974f' => array( 'javelin-behavior', 'javelin-dom', @@ -2319,7 +2317,6 @@ 'phui-form-css', 'phui-icon-view-css', 'phui-profile-menu-css', - 'phabricator-application-launch-view-css', 'phabricator-action-list-view-css', 'phui-property-list-view-css', 'phui-tag-view-css', diff --git a/resources/celerity/packages.php b/resources/celerity/packages.php --- a/resources/celerity/packages.php +++ b/resources/celerity/packages.php @@ -132,7 +132,6 @@ 'phui-icon-view-css', 'phui-profile-menu-css', - 'phabricator-application-launch-view-css', 'phabricator-action-list-view-css', 'phui-property-list-view-css', 'phui-tag-view-css', diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1824,7 +1824,6 @@ 'PhabricatorApplicationEditController' => 'applications/meta/controller/PhabricatorApplicationEditController.php', 'PhabricatorApplicationEditHTTPParameterHelpView' => 'applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php', 'PhabricatorApplicationEmailCommandsController' => 'applications/meta/controller/PhabricatorApplicationEmailCommandsController.php', - 'PhabricatorApplicationLaunchView' => 'applications/meta/view/PhabricatorApplicationLaunchView.php', 'PhabricatorApplicationPanelController' => 'applications/meta/controller/PhabricatorApplicationPanelController.php', 'PhabricatorApplicationProfileMenuItem' => 'applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php', 'PhabricatorApplicationQuery' => 'applications/meta/query/PhabricatorApplicationQuery.php', @@ -2839,7 +2838,6 @@ 'PhabricatorHomeManageProfileMenuItem' => 'applications/home/menuitem/PhabricatorHomeManageProfileMenuItem.php', 'PhabricatorHomeMenuController' => 'applications/home/controller/PhabricatorHomeMenuController.php', 'PhabricatorHomeMenuItemController' => 'applications/home/controller/PhabricatorHomeMenuItemController.php', - 'PhabricatorHomePreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php', 'PhabricatorHomeProfileMenuEngine' => 'applications/home/engine/PhabricatorHomeProfileMenuEngine.php', 'PhabricatorHovercardEngineExtension' => 'applications/search/engineextension/PhabricatorHovercardEngineExtension.php', 'PhabricatorHovercardEngineExtensionModule' => 'applications/search/engineextension/PhabricatorHovercardEngineExtensionModule.php', @@ -6708,7 +6706,6 @@ 'PhabricatorApplicationEditController' => 'PhabricatorApplicationsController', 'PhabricatorApplicationEditHTTPParameterHelpView' => 'AphrontView', 'PhabricatorApplicationEmailCommandsController' => 'PhabricatorApplicationsController', - 'PhabricatorApplicationLaunchView' => 'AphrontTagView', 'PhabricatorApplicationPanelController' => 'PhabricatorApplicationsController', 'PhabricatorApplicationProfileMenuItem' => 'PhabricatorProfileMenuItem', 'PhabricatorApplicationQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', @@ -7893,7 +7890,6 @@ 'PhabricatorHomeManageProfileMenuItem' => 'PhabricatorProfileMenuItem', 'PhabricatorHomeMenuController' => 'PhabricatorHomeController', 'PhabricatorHomeMenuItemController' => 'PhabricatorHomeController', - 'PhabricatorHomePreferencesSettingsPanel' => 'PhabricatorSettingsPanel', 'PhabricatorHomeProfileMenuEngine' => 'PhabricatorProfileMenuEngine', 'PhabricatorHovercardEngineExtension' => 'Phobject', 'PhabricatorHovercardEngineExtensionModule' => 'PhabricatorConfigModule', diff --git a/src/applications/home/controller/PhabricatorHomeController.php b/src/applications/home/controller/PhabricatorHomeController.php --- a/src/applications/home/controller/PhabricatorHomeController.php +++ b/src/applications/home/controller/PhabricatorHomeController.php @@ -2,69 +2,48 @@ abstract class PhabricatorHomeController extends PhabricatorController { - public function buildNav() { - $user = $this->getRequest()->getUser(); + private $home; + private $profileMenu; - $nav = new AphrontSideNavFilterView(); - $nav->setBaseURI(new PhutilURI('/')); + public function buildApplicationMenu() { + $menu = $this->newApplicationMenu(); - $applications = id(new PhabricatorApplicationQuery()) - ->setViewer($user) - ->withInstalled(true) - ->withUnlisted(false) - ->withLaunchable(true) - ->execute(); - - $pinned = $user->getUserSetting( - PhabricatorPinnedApplicationsSetting::SETTINGKEY); - - // Force "Applications" to appear at the bottom. - $meta_app = 'PhabricatorApplicationsApplication'; - $pinned = array_fuse($pinned); - unset($pinned[$meta_app]); - $pinned[$meta_app] = $meta_app; - $applications[$meta_app] = PhabricatorApplication::getByClass($meta_app); - - $tiles = array(); - - $home_app = new PhabricatorHomeApplication(); + $profile_menu = $this->getProfileMenu(); + if ($profile_menu) { + $menu->setProfileMenu($profile_menu); + } - $tiles[] = id(new PhabricatorApplicationLaunchView()) - ->setApplication($home_app) - ->addClass('phabricator-application-launch-phone-only') - ->setUser($user); + return $menu; + } - foreach ($pinned as $pinned_application) { - if (empty($applications[$pinned_application])) { - continue; + protected function getProfileMenu() { + if (!$this->profileMenu) { + $viewer = $this->getViewer(); + $applications = id(new PhabricatorApplicationQuery()) + ->setViewer($viewer) + ->withClasses(array('PhabricatorHomeApplication')) + ->withInstalled(true) + ->execute(); + $home = head($applications); + if (!$home) { + return null; } - $application = $applications[$pinned_application]; + $engine = id(new PhabricatorHomeProfileMenuEngine()) + ->setViewer($viewer) + ->setProfileObject($home); - $tile = id(new PhabricatorApplicationLaunchView()) - ->setApplication($application) - ->setUser($user); + if ($viewer->getPHID()) { + $engine->setCustomPHID($viewer->getPHID()) + ->setMenuType(PhabricatorProfileMenuEngine::MENU_COMBINED); + } else { + $engine->setMenuType(PhabricatorProfileMenuEngine::MENU_GLOBAL); + } - $tiles[] = $tile; + $this->profileMenu = $engine->buildNavigation(); } - $nav->addCustomBlock( - phutil_tag( - 'div', - array( - 'class' => 'application-tile-group', - ), - $tiles)); - - $nav->addFilter( - '', - pht('Customize Menu...'), - '/settings/panel/home/'); - - $nav->addClass('phabricator-side-menu-home'); - $nav->selectFilter(null); - - return $nav; + return $this->profileMenu; } } diff --git a/src/applications/home/controller/PhabricatorHomeMainController.php b/src/applications/home/controller/PhabricatorHomeMainController.php --- a/src/applications/home/controller/PhabricatorHomeMainController.php +++ b/src/applications/home/controller/PhabricatorHomeMainController.php @@ -34,19 +34,20 @@ $content = $this->buildMainResponse(); } + // TODO... ??? if (!$request->getURIData('only')) { - $nav = $this->buildNav(); - $nav->appendChild( + $nav = $this->getProfileMenu(); + $content = array( $content, id(new PhabricatorGlobalUploadTargetView())->setUser($viewer), - )); - $content = $nav; + ); } return $this->newPage() ->setTitle('Phabricator') ->addClass('phabricator-home') + ->setNavigation($nav) ->appendChild($content); } diff --git a/src/applications/home/menuitem/PhabricatorHomeManageProfileMenuItem.php b/src/applications/home/menuitem/PhabricatorHomeManageProfileMenuItem.php --- a/src/applications/home/menuitem/PhabricatorHomeManageProfileMenuItem.php +++ b/src/applications/home/menuitem/PhabricatorHomeManageProfileMenuItem.php @@ -10,7 +10,7 @@ } private function getDefaultName() { - return pht('Manage'); + return pht('Edit Menu'); } public function canHideMenuItem( @@ -50,13 +50,10 @@ $viewer = $this->getViewer(); if ($viewer->isLoggedIn()) { - $admin = $viewer->getIsAdmin(); $name = $this->getDisplayName($config); $icon = 'fa-pencil'; $href = '/home/menu/personal/item/configure/'; - if ($admin) { - $href = '/home/menu/'; - } + $href = '/home/menu/'; $item = $this->newItem() ->setHref($href) diff --git a/src/applications/meta/view/PhabricatorApplicationLaunchView.php b/src/applications/meta/view/PhabricatorApplicationLaunchView.php deleted file mode 100644 --- a/src/applications/meta/view/PhabricatorApplicationLaunchView.php +++ /dev/null @@ -1,69 +0,0 @@ -application = $application; - return $this; - } - - protected function getTagName() { - return $this->application ? 'a' : 'div'; - } - - protected function getTagAttributes() { - $application = $this->application; - return array( - 'class' => array('phabricator-application-launch-container'), - 'href' => $application ? $application->getBaseURI() : null, - ); - } - - protected function getTagContent() { - $application = $this->application; - - require_celerity_resource('phabricator-application-launch-view-css'); - - $content = array(); - $icon = null; - if ($application) { - $content[] = phutil_tag( - 'span', - array( - 'class' => 'phabricator-application-launch-name', - ), - $application->getName()); - - $content[] = phutil_tag( - 'span', - array( - 'class' => 'phabricator-application-launch-description', - ), - $application->getShortDescription()); - - $classes = array(); - $classes[] = 'phabricator-application-launch-icon'; - - $styles = array(); - $classes[] = $application->getIcon(); - $classes[] = 'phui-icon-view'; - $classes[] = 'phui-font-fa'; - - $icon = phutil_tag( - 'span', - array( - 'class' => implode(' ', $classes), - 'style' => nonempty(implode('; ', $styles), null), - ), - ''); - } - - return array( - $icon, - $content, - ); - } - -} diff --git a/src/applications/people/controller/PhabricatorPeopleProfileManageController.php b/src/applications/people/controller/PhabricatorPeopleProfileManageController.php --- a/src/applications/people/controller/PhabricatorPeopleProfileManageController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileManageController.php @@ -28,16 +28,27 @@ $picture = $user->getProfileImageURI(); $profile_icon = PhabricatorPeopleIconSet::getIconIcon($profile->getIcon()); - $profile_icon = id(new PHUIIconView()) - ->setIcon($profile_icon); $profile_title = $profile->getDisplayTitle(); + $tag = null; + if ($user->getIsAdmin()) { + $tag = id(new PHUITagView()) + ->setName(pht('Administrator')) + ->addClass('project-view-header-tag') + ->setType(PHUITagView::TYPE_SHADE); + } + $header = id(new PHUIHeaderView()) - ->setHeader($user->getFullName()) - ->setSubheader(array($profile_icon, $profile_title)) + ->setHeader(array($user->getFullName(), $tag)) ->setImage($picture) ->setProfileHeader(true); + if ($user->getIsDisabled()) { + $header->setStatus('fa-ban', 'red', pht('Disabled')); + } else { + $header->setStatus($profile_icon, 'bluegrey', $profile_title); + } + $curtain = $this->buildCurtain($user); $properties = $this->buildPropertyView($user); $name = $user->getUsername(); @@ -51,8 +62,10 @@ $manage = id(new PHUITwoColumnView()) ->setHeader($header) + ->addClass('project-view-home') ->setCurtain($curtain) ->addPropertySection(pht('Details'), $properties); + require_celerity_resource('project-view-css'); return $this->newPage() ->setTitle( diff --git a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php --- a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php @@ -28,16 +28,27 @@ $picture = $user->getProfileImageURI(); $profile_icon = PhabricatorPeopleIconSet::getIconIcon($profile->getIcon()); - $profile_icon = id(new PHUIIconView()) - ->setIcon($profile_icon); $profile_title = $profile->getDisplayTitle(); + $tag = null; + if ($user->getIsAdmin()) { + $tag = id(new PHUITagView()) + ->setName(pht('Administrator')) + ->addClass('project-view-header-tag') + ->setType(PHUITagView::TYPE_SHADE); + } + $header = id(new PHUIHeaderView()) - ->setHeader($user->getFullName()) - ->setSubheader(array($profile_icon, $profile_title)) + ->setHeader(array($user->getFullName(), $tag)) ->setImage($picture) ->setProfileHeader(true); + if ($user->getIsDisabled()) { + $header->setStatus('fa-ban', 'red', pht('Disabled')); + } else { + $header->setStatus($profile_icon, 'bluegrey', $profile_title); + } + $can_edit = PhabricatorPolicyFilter::hasCapability( $viewer, $user, diff --git a/src/applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php b/src/applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php --- a/src/applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php +++ b/src/applications/people/menuitem/PhabricatorPeopleDetailsProfileMenuItem.php @@ -49,7 +49,7 @@ $item = $this->newItem() ->setHref($href) ->setName($name) - ->setProfileImage($picture); + ->setIcon('fa-home'); return array( $item, diff --git a/src/applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php b/src/applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php deleted file mode 100644 --- a/src/applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php +++ /dev/null @@ -1,223 +0,0 @@ -getViewer(); - $preferences = $this->getPreferences(); - - $pinned_key = PhabricatorPinnedApplicationsSetting::SETTINGKEY; - $pinned = $preferences->getSettingValue($pinned_key); - - $apps = id(new PhabricatorApplicationQuery()) - ->setViewer($viewer) - ->withInstalled(true) - ->withUnlisted(false) - ->withLaunchable(true) - ->execute(); - - $app_list = array(); - foreach ($pinned as $app) { - if (isset($apps[$app])) { - $app_list[$app] = $apps[$app]; - } - } - - if ($request->getBool('reset')) { - if ($request->isFormPost()) { - $this->writePinnedApplications($preferences, null); - return id(new AphrontRedirectResponse()) - ->setURI($this->getPanelURI()); - } - - return $this->newDialog() - ->setTitle(pht('Reset Applications')) - ->addHiddenInput('reset', 'true') - ->appendParagraph( - pht('Reset pinned applications to their defaults?')) - ->addSubmitButton(pht('Reset Applications')) - ->addCancelButton($this->getPanelURI()); - } - - - if ($request->getBool('add')) { - $options = array(); - foreach ($apps as $app) { - $options[get_class($app)] = $app->getName(); - } - asort($options); - - unset($options['PhabricatorApplicationsApplication']); - - if ($request->isFormPost()) { - $pins = $request->getArr('pin'); - $phid = head($pins); - $app = id(new PhabricatorApplicationQuery()) - ->setViewer($viewer) - ->withPHIDs(array($phid)) - ->executeOne(); - if ($app) { - $pin = get_class($app); - } else { - // This likely means the user submitted an empty form - // which will cause nothing to happen. - $pin = ''; - } - if (isset($options[$pin]) && !in_array($pin, $pinned)) { - $pinned[] = $pin; - - $this->writePinnedApplications($preferences, $pinned); - - return id(new AphrontRedirectResponse()) - ->setURI($this->getPanelURI()); - } - } - - $options_control = id(new AphrontFormTokenizerControl()) - ->setName('pin') - ->setLabel(pht('Application')) - ->setDatasource(new PhabricatorApplicationDatasource()) - ->setLimit(1); - - $form = id(new AphrontFormView()) - ->setViewer($viewer) - ->addHiddenInput('add', 'true') - ->appendRemarkupInstructions( - pht('Choose an application to pin to your home page.')) - ->appendControl($options_control); - - return $this->newDialog() - ->setWidth(AphrontDialogView::WIDTH_FORM) - ->setTitle(pht('Pin Application')) - ->appendChild($form->buildLayoutView()) - ->addSubmitButton(pht('Pin Application')) - ->addCancelButton($this->getPanelURI()); - } - - $unpin = $request->getStr('unpin'); - if ($unpin) { - $app = idx($apps, $unpin); - if ($app) { - if ($request->isFormPost()) { - $pinned = array_diff($pinned, array($unpin)); - - $this->writePinnedApplications($preferences, $pinned); - - return id(new AphrontRedirectResponse()) - ->setURI($this->getPanelURI()); - } - - return $this->newDialog() - ->setTitle(pht('Unpin Application')) - ->addHiddenInput('unpin', $unpin) - ->appendParagraph( - pht( - 'Unpin the %s application from your home page?', - phutil_tag('strong', array(), $app->getName()))) - ->addSubmitButton(pht('Unpin Application')) - ->addCancelButton($this->getPanelURI()); - } - } - - $order = $request->getStrList('order'); - if ($order && $request->validateCSRF()) { - $this->writePinnedApplications($preferences, $order); - - return id(new AphrontRedirectResponse()) - ->setURI($this->getPanelURI()); - } - - $list_id = celerity_generate_unique_node_id(); - - $list = id(new PHUIObjectItemListView()) - ->setViewer($viewer) - ->setID($list_id) - ->setDrag(true); - - Javelin::initBehavior( - 'reorder-applications', - array( - 'listID' => $list_id, - 'panelURI' => $this->getPanelURI(), - )); - - foreach ($app_list as $key => $application) { - if ($key == 'PhabricatorApplicationsApplication') { - continue; - } - - $icon = $application->getIcon(); - if (!$icon) { - $icon = 'fa-globe'; - } - - $item = id(new PHUIObjectItemView()) - ->setHeader($application->getName()) - ->setImageIcon($icon) - ->setGrippable(true); - - $item->addAction( - id(new PHUIListItemView()) - ->setIcon('fa-times') - ->setHref($this->getPanelURI().'?unpin='.$key) - ->setWorkflow(true)); - - $item->addSigil('pinned-application'); - $item->setMetadata( - array( - 'applicationClass' => $key, - )); - - $list->addItem($item); - } - - $header = id(new PHUIHeaderView()) - ->setHeader(pht('Pinned Applications')) - ->addActionLink( - id(new PHUIButtonView()) - ->setTag('a') - ->setText(pht('Pin Application')) - ->setHref($this->getPanelURI().'?add=true') - ->setWorkflow(true) - ->setIcon('fa-thumb-tack')) - ->addActionLink( - id(new PHUIButtonView()) - ->setTag('a') - ->setText(pht('Reset to Defaults')) - ->setHref($this->getPanelURI().'?reset=true') - ->setWorkflow(true) - ->setIcon('fa-recycle')); - - $box = id(new PHUIObjectBoxView()) - ->setHeader($header) - ->setObjectList($list); - - return $box; - } - - private function writePinnedApplications( - PhabricatorUserPreferences $preferences, - $pinned) { - - $pinned_key = PhabricatorPinnedApplicationsSetting::SETTINGKEY; - $this->writeSetting($preferences, $pinned_key, $pinned); - } - -} diff --git a/src/view/layout/AphrontSideNavFilterView.php b/src/view/layout/AphrontSideNavFilterView.php --- a/src/view/layout/AphrontSideNavFilterView.php +++ b/src/view/layout/AphrontSideNavFilterView.php @@ -204,7 +204,7 @@ private function renderFlexNav() { require_celerity_resource('phabricator-nav-view-css'); - require_celerity_resource('phui-profile-menu-css'); + // require_celerity_resource('phui-profile-menu-css'); $nav_classes = array(); $nav_classes[] = 'phabricator-nav'; @@ -310,7 +310,7 @@ $classes[] = 'phui-navigation-shell'; if ($this->getIsProfileMenu()) { - $classes[] = 'phui-profile-menu'; + $classes[] = 'phui-profile-menu phui-basic-nav'; } else { $classes[] = 'phui-basic-nav'; } diff --git a/webroot/rsrc/css/application/base/main-menu-view.css b/webroot/rsrc/css/application/base/main-menu-view.css --- a/webroot/rsrc/css/application/base/main-menu-view.css +++ b/webroot/rsrc/css/application/base/main-menu-view.css @@ -164,10 +164,7 @@ right: 0; position: absolute; font-size: {$normalfontsize}; - border-width: 1px; - border-color: {$lightblueborder}; - border-radius: 3px; - border-style: solid; + border: none; background-color: #fff; height: 28px; padding: 3px 28px 3px 52px; @@ -186,7 +183,6 @@ background: #fff; opacity: 1; color: {$darkbluetext}; - border-color: {$sky}; box-shadow: none; } diff --git a/webroot/rsrc/css/application/base/phabricator-application-launch-view.css b/webroot/rsrc/css/application/base/phabricator-application-launch-view.css deleted file mode 100644 --- a/webroot/rsrc/css/application/base/phabricator-application-launch-view.css +++ /dev/null @@ -1,103 +0,0 @@ -/** - * @provides phabricator-application-launch-view-css - */ - - -/* - Application List ---------------------------------------------------------- - - Spacing container for the list of large application buttons. - -*/ - - -.application-tile-group { - overflow: hidden; -} - - -/* - Application Launch Button ------------------------------------------------- - - Spacing container for the list of large application buttons. - -*/ - -a.phabricator-application-launch-container, -div.phabricator-application-launch-container { - display: block; - float: left; - overflow: hidden; - position: relative; - text-decoration: none; - width: 100%; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - padding: 4px 0; -} - -.device-phone div.phabricator-application-launch-container { - display: none; -} - -.phabricator-application-launch-icon { - position: absolute; - width: 38px; - height: 18px; - top: 6px; - left: 0; - font-size: 18px; - text-align: center; - vertical-align: bottom; - color: {$darkbluetext}; - text-shadow: {$whitetextshadow}; -} - -.device-desktop a.phabricator-application-launch-container:hover { - background-color: rgba({$alphablack},.07); - text-decoration: none; -} - -.device-desktop a.phabricator-application-launch-container:hover - .phabricator-application-launch-icon { - color: {$sky}; -} - -.phabricator-application-launch-name { - display: block; - font-weight: bold; - color: {$darkbluetext}; - font-size: {$normalfontsize}; - margin-left: 36px; -} - -.phabricator-application-launch-description { - color: {$bluetext}; - font-size: {$smallestfontsize}; - margin-left: 36px; - text-overflow: ellipsis; - width: 150px; - overflow: hidden; - white-space: nowrap; - display: inline-block; - padding: 2px 0 0 0; -} - -.phabricator-application-launch-attention { - position: absolute; - top: 8px; - right: 8px; - color: {$darkbluetext}; - font-weight: bold; - font-size: {$smallerfontsize}; -} - -.phabricator-application-attention-count { - color: {$fire}; -} - -a.phabricator-application-launch-phone-only { - display: none; -} - -.device-phone a.phabricator-application-launch-phone-only { - display: block; -} diff --git a/webroot/rsrc/css/application/base/phui-theme.css b/webroot/rsrc/css/application/base/phui-theme.css --- a/webroot/rsrc/css/application/base/phui-theme.css +++ b/webroot/rsrc/css/application/base/phui-theme.css @@ -5,7 +5,7 @@ /*--- Header Colors ----------------------------------------------------------*/ .phui-theme-blindigo .phabricator-main-menu-background { - background: #41506e; + background: #4a5f88; } .phui-theme-dark .phabricator-main-menu-background { diff --git a/webroot/rsrc/css/phui/phui-basic-nav-view.css b/webroot/rsrc/css/phui/phui-basic-nav-view.css --- a/webroot/rsrc/css/phui/phui-basic-nav-view.css +++ b/webroot/rsrc/css/phui/phui-basic-nav-view.css @@ -25,16 +25,16 @@ overflow: hidden; } +.phabricator-home.device-phone .phabricator-nav-content { + display: none; +} + .phui-basic-nav.phui-navigation-shell .phabricator-nav-local { width: 205px; - padding-top: 4px; + padding-top: 12px; padding-right: 8px; } -.phui-basic-nav .phabricator-side-menu { - background-color: {$page.sidenav}; -} - .phui-two-column-view .phui-basic-nav.phui-navigation-shell .phabricator-nav-local { width: {$menu.profile.width}; @@ -55,13 +55,13 @@ display: block; white-space: nowrap; text-decoration: none; - font-size: 13px; + font-size: {$biggerfontsize}; -webkit-font-smoothing: antialiased; } .phui-basic-nav .phabricator-side-menu .phui-list-item-href { display: block; - padding: 6px 8px 6px 24px; + padding: 6px 8px 6px 12px; color: {$darkbluetext}; border-top-right-radius: 3px; border-bottom-right-radius: 3px; @@ -70,9 +70,24 @@ } .phui-basic-nav .phabricator-side-menu .phui-list-item-icon { - margin-left: -12px; + margin-left: -4px; text-align: center; - width: 24px; + width: 30px; +} + +.phui-basic-nav .phabricator-side-menu .phui-divider { + border-bottom: 1px solid rgba({$alphablack},.08); + margin: 0 0 8px 8px; + padding: 8px 0 0 0; +} + +.phui-basic-nav .phabricator-side-menu .phui-list-item-icon.phuihead-small { + display: inline-block; + height: 16px; + width: 16px; + border-radius: 3px; + background-size: 100%; + margin: -2px 7px -2px 3px; } .phui-basic-nav .phabricator-side-menu .phui-list-item-selected { @@ -91,7 +106,7 @@ .phui-basic-nav .phabricator-side-menu .phui-list-item-selected .phui-list-item-href { - padding-left: 20px; + padding: 6px 8px 6px 7px; } .phui-basic-nav .phabricator-side-menu .phui-list-item-type-label { @@ -108,3 +123,8 @@ text-decoration: none; background-color: rgba({$alphablack},.07); } + +.phui-basic-nav .phabricator-side-menu .phui-list-item-type-link + + .phui-list-item-type-label { + margin-top: 12px; + } diff --git a/webroot/rsrc/css/phui/phui-box.css b/webroot/rsrc/css/phui/phui-box.css --- a/webroot/rsrc/css/phui/phui-box.css +++ b/webroot/rsrc/css/phui/phui-box.css @@ -49,10 +49,11 @@ .phui-object-box.phui-box-blue div.phui-info-severity-nodata, .phui-object-box.phui-box-grey div.phui-info-severity-nodata { - background: transparent; - padding: 20px 4px 24px; + background: #fff; + padding: 32px 0 20px; text-align: center; border: none; + margin: 0; color: {$greytext}; } diff --git a/webroot/rsrc/css/phui/phui-profile-menu.css b/webroot/rsrc/css/phui/phui-profile-menu.css --- a/webroot/rsrc/css/phui/phui-profile-menu.css +++ b/webroot/rsrc/css/phui/phui-profile-menu.css @@ -2,161 +2,4 @@ * @provides phui-profile-menu-css */ -.device-desktop .phui-profile-menu .phabricator-nav-local { - width: {$menu.profile.width.collapsed}; - max-width: {$menu.profile.width.collapsed}; -} -.device-desktop .phui-profile-menu .phabricator-nav-content { - display: table-cell; - margin-left: 0; -} - -.phui-profile-menu .phui-basic-nav { - width: 205px; -} - -.phui-profile-menu .phabricator-side-menu { - background: #dee0e7; - width: 240px; -} - -.phabricator-side-menu .phui-profile-menu-footer-1 { - background: #dee0e7; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-view { - position: relative; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-href { - display: block; - text-decoration: none; - padding: 0 8px 0 48px; - height: 48px; - font-size: {$biggerfontsize}; - -webkit-font-smoothing: antialiased; - line-height: 22px; - overflow: hidden; - color: {$darkbluetext}; - text-overflow: ellipsis; - line-height: 48px; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-icon, -.phui-profile-menu .phabricator-side-menu - .phui-list-item-href .phui-list-item-icon { - position: absolute; - top: 12px; - left: 13px; - font-size: 24px; - width: 24px; - height: 24px; - line-height: 24px; - text-align: center; - color: {$darkbluetext}; - background-size: 100%; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-href { - text-align: center; - padding: 42px 4px 14px; - line-height: 14px; - height: auto; - font-size: {$smallerfontsize}; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-name { - display: block; - overflow: hidden; - text-overflow: ellipsis; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-icon, -.phui-profile-menu .phabricator-side-menu .phui-list-item-href - .phui-list-item-icon { - top: 14px; - left: 32px; -} - -.phui-profile-menu .phabricator-side-menu - .phui-list-item-disabled - .phui-list-item-icon { - color: {$lightgreytext}; -} - -.phui-profile-menu .phabricator-side-menu .phui-icon-view { - border-radius: 3px; -} - -.device-desktop .phui-profile-menu .phabricator-side-menu - .phui-list-item-href:hover { - background-color: rgba({$alphablack},0.05); -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-selected - .phui-list-item-href { - background-color: rgba({$alphablack},0.1); -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-selected - .phui-list-item-href:hover { - background-color: rgba({$alphablack},0.15); -} - -.phui-profile-menu .phabricator-side-menu .phui-divider { - margin: 4px 0; - border-bottom: 1px solid rgba({$alphablack}, 0.2); -} - -.phui-profile-menu .phabricator-side-menu .phui-motivator { - white-space: normal; - padding: 18px 15px; - font-size: 12px; - color: {$darkbluetext}; -} - -.phui-profile-menu .phabricator-side-menu .phui-motivator .phui-icon-view { - position: static; - font-size: 12px; - color: {$darkbluetext}; -} - -.phui-profile-menu .phabricator-side-menu .phui-profile-menu-error { - color: rgba({$alphawhite}, 0.5); - font-size: {$smallerfontsize}; - padding: 16px; -} - -.phui-profile-menu .phabricator-side-menu .phui-profile-menu-error { - padding: 16px 8px; - overflow: hidden; - text-overflow: ellipsis; -} - -.phui-profile-menu .phabricator-side-menu .phui-list-item-disabled - .phui-list-item-href, -.phui-profile-menu .phui-list-sidenav .phui-list-item-disabled - .phui-list-item-href { - color: rgba({$lightgreytext}); -} - -.phui-profile-menu .phabricator-side-menu .phui-profile-segment-bar { - color: {$darkbluetext}; - font-size: {$smallerfontsize}; - -webkit-font-smoothing: antialiased; - padding: 8px 12px 16px; -} - -.phui-profile-menu .phabricator-side-menu .phui-profile-segment-bar { - padding: 8px 8px 16px; -} - -.phui-profile-menu .phabricator-side-menu .phui-profile-menu-spacer { - box-sizing: border-box; - height: {$menu.profile.item.height}; -} - -!print .phui-profile-menu .phabricator-side-menu { - display: none; -} diff --git a/webroot/rsrc/css/phui/workboards/phui-workboard.css b/webroot/rsrc/css/phui/workboards/phui-workboard.css --- a/webroot/rsrc/css/phui/workboards/phui-workboard.css +++ b/webroot/rsrc/css/phui/workboards/phui-workboard.css @@ -32,7 +32,7 @@ } .device-desktop .project-board-wrapper .phui-workboard-view-shadow { - left: {$menu.profile.width.collapsed}; + left: 212px; } !print .project-board-wrapper .phui-workboard-view-shadow {