mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-28 00:10:57 +01:00
Add a visual divider element to profile menus
Summary: Ref T10054. Test Plan: {F1061529} Reviewers: chad Reviewed By: chad Maniphest Tasks: T10054 Differential Revision: https://secure.phabricator.com/D15024
This commit is contained in:
parent
f4c8cdb39a
commit
22aebab1c1
4 changed files with 59 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => '2a7bdb75',
|
||||
'core.pkg.css' => '30316566',
|
||||
'core.pkg.js' => '1f5f365a',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => '2de124c9',
|
||||
|
@ -143,7 +143,7 @@ return array(
|
|||
'rsrc/css/phui/phui-object-item-list-view.css' => '26c30d3f',
|
||||
'rsrc/css/phui/phui-pager.css' => 'bea33d23',
|
||||
'rsrc/css/phui/phui-pinboard-view.css' => '2495140e',
|
||||
'rsrc/css/phui/phui-profile-menu.css' => '6123de4e',
|
||||
'rsrc/css/phui/phui-profile-menu.css' => '05546270',
|
||||
'rsrc/css/phui/phui-property-list-view.css' => '27b2849e',
|
||||
'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591',
|
||||
'rsrc/css/phui/phui-spacing.css' => '042804d6',
|
||||
|
@ -822,7 +822,7 @@ return array(
|
|||
'phui-object-item-list-view-css' => '26c30d3f',
|
||||
'phui-pager-css' => 'bea33d23',
|
||||
'phui-pinboard-view-css' => '2495140e',
|
||||
'phui-profile-menu-css' => '6123de4e',
|
||||
'phui-profile-menu-css' => '05546270',
|
||||
'phui-property-list-view-css' => '27b2849e',
|
||||
'phui-remarkup-preview-css' => '1a8f2591',
|
||||
'phui-spacing-css' => '042804d6',
|
||||
|
|
|
@ -2154,6 +2154,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorDisabledUserController' => 'applications/auth/controller/PhabricatorDisabledUserController.php',
|
||||
'PhabricatorDisplayPreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorDisplayPreferencesSettingsPanel.php',
|
||||
'PhabricatorDisqusAuthProvider' => 'applications/auth/provider/PhabricatorDisqusAuthProvider.php',
|
||||
'PhabricatorDividerProfilePanel' => 'applications/search/profilepanel/PhabricatorDividerProfilePanel.php',
|
||||
'PhabricatorDivinerApplication' => 'applications/diviner/application/PhabricatorDivinerApplication.php',
|
||||
'PhabricatorDoorkeeperApplication' => 'applications/doorkeeper/application/PhabricatorDoorkeeperApplication.php',
|
||||
'PhabricatorDraft' => 'applications/draft/storage/PhabricatorDraft.php',
|
||||
|
@ -6412,6 +6413,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorDisabledUserController' => 'PhabricatorAuthController',
|
||||
'PhabricatorDisplayPreferencesSettingsPanel' => 'PhabricatorSettingsPanel',
|
||||
'PhabricatorDisqusAuthProvider' => 'PhabricatorOAuth2AuthProvider',
|
||||
'PhabricatorDividerProfilePanel' => 'PhabricatorProfilePanel',
|
||||
'PhabricatorDivinerApplication' => 'PhabricatorApplication',
|
||||
'PhabricatorDoorkeeperApplication' => 'PhabricatorApplication',
|
||||
'PhabricatorDraft' => 'PhabricatorDraftDAO',
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorDividerProfilePanel
|
||||
extends PhabricatorProfilePanel {
|
||||
|
||||
const PANELKEY = 'divider';
|
||||
|
||||
public function getPanelTypeIcon() {
|
||||
return 'fa-minus';
|
||||
}
|
||||
|
||||
public function getPanelTypeName() {
|
||||
return pht('Divider');
|
||||
}
|
||||
|
||||
public function canAddToObject($object) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getDisplayName(
|
||||
PhabricatorProfilePanelConfiguration $config) {
|
||||
return pht("\xE2\x80\x94");
|
||||
}
|
||||
|
||||
public function buildEditEngineFields(
|
||||
PhabricatorProfilePanelConfiguration $config) {
|
||||
return array(
|
||||
id(new PhabricatorInstructionsEditField())
|
||||
->setValue(
|
||||
pht(
|
||||
'This is a visual divider which you can use to separate '.
|
||||
'sections in the menu. It does not have any configurable '.
|
||||
'options.')),
|
||||
);
|
||||
}
|
||||
|
||||
protected function newNavigationMenuItems(
|
||||
PhabricatorProfilePanelConfiguration $config) {
|
||||
|
||||
$item = $this->newItem()
|
||||
->addClass('phui-divider');
|
||||
|
||||
return array(
|
||||
$item,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -85,3 +85,9 @@
|
|||
background-color: rgba(0, 0, 0, 0.150);
|
||||
color: {$menu.profile.text.selected};
|
||||
}
|
||||
|
||||
|
||||
.phui-profile-menu .phabricator-side-menu .phui-divider {
|
||||
margin: 4px 0;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.200);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue