mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Implement very basic uberhome
Summary: No fancy-pants smarty stuff yet, but merges /applications/ and the awful application buttons into the dark navigation. Hover state is maybe a little weird. Test Plan: {F29324} Reviewers: chad, btrahan Reviewed By: btrahan CC: aran, btrahan, codeblock Differential Revision: https://secure.phabricator.com/D4431
This commit is contained in:
parent
55072a2640
commit
c506cfe8d9
21 changed files with 246 additions and 595 deletions
|
@ -31,7 +31,8 @@ $sheets = array(
|
|||
'menu' => $generator->buildMenuSheet(),
|
||||
'apps' => $generator->buildAppsSheet(),
|
||||
'apps-large' => $generator->buildAppsLargeSheet(),
|
||||
'apps-xlarge' => $generator->buildAppsXLargeSheet(),
|
||||
// TODO: @chad: should we actually remove this?
|
||||
// 'apps-xlarge' => $generator->buildAppsXLargeSheet(),
|
||||
'gradient' => $generator->buildGradientSheet(),
|
||||
);
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ $package_spec = array(
|
|||
|
||||
'phabricator-directory-css',
|
||||
'phabricator-jump-nav',
|
||||
'phabricator-app-buttons-css',
|
||||
|
||||
'phabricator-remarkup-css',
|
||||
'syntax-highlighting-css',
|
||||
|
|
|
@ -7,41 +7,6 @@
|
|||
*/
|
||||
|
||||
celerity_register_resource_map(array(
|
||||
'/rsrc/image/apps.png' =>
|
||||
array(
|
||||
'hash' => 'f7cb4abeb73245fea4098a02fd784653',
|
||||
'uri' => '/res/f7cb4abe/rsrc/image/apps.png',
|
||||
'disk' => '/rsrc/image/apps.png',
|
||||
'type' => 'png',
|
||||
),
|
||||
'/rsrc/image/appstatus_empty.png' =>
|
||||
array(
|
||||
'hash' => '2f8102e0a0f5a0980d87d4ab4ba8c8fd',
|
||||
'uri' => '/res/2f8102e0/rsrc/image/appstatus_empty.png',
|
||||
'disk' => '/rsrc/image/appstatus_empty.png',
|
||||
'type' => 'png',
|
||||
),
|
||||
'/rsrc/image/appstatus_info.png' =>
|
||||
array(
|
||||
'hash' => '407de6daf2edc4a8b68e2e369f4fc8cb',
|
||||
'uri' => '/res/407de6da/rsrc/image/appstatus_info.png',
|
||||
'disk' => '/rsrc/image/appstatus_info.png',
|
||||
'type' => 'png',
|
||||
),
|
||||
'/rsrc/image/appstatus_needs.png' =>
|
||||
array(
|
||||
'hash' => '2c1e193bc786ca4fca0b851ed9cd3d92',
|
||||
'uri' => '/res/2c1e193b/rsrc/image/appstatus_needs.png',
|
||||
'disk' => '/rsrc/image/appstatus_needs.png',
|
||||
'type' => 'png',
|
||||
),
|
||||
'/rsrc/image/appstatus_okay.png' =>
|
||||
array(
|
||||
'hash' => 'd00e683ee1c61d0ccced1200775cdbb5',
|
||||
'uri' => '/res/d00e683e/rsrc/image/appstatus_okay.png',
|
||||
'disk' => '/rsrc/image/appstatus_okay.png',
|
||||
'type' => 'png',
|
||||
),
|
||||
'/rsrc/image/avatar.png' =>
|
||||
array(
|
||||
'hash' => '1c5f255071537f05406adee86717ff27',
|
||||
|
@ -653,7 +618,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'aphront-form-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/bdc0b393/rsrc/css/aphront/form-view.css',
|
||||
'uri' => '/res/ff83e503/rsrc/css/aphront/form-view.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -680,7 +645,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'aphront-list-filter-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/f6d419df/rsrc/css/aphront/list-filter-view.css',
|
||||
'uri' => '/res/0f5ddaba/rsrc/css/aphront/list-filter-view.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -849,7 +814,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'differential-revision-list-css' =>
|
||||
array(
|
||||
'uri' => '/res/fe6c4721/rsrc/css/application/differential/revision-list.css',
|
||||
'uri' => '/res/7659ad8d/rsrc/css/application/differential/revision-list.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -2428,18 +2393,9 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'disk' => '/rsrc/css/layout/phabricator-action-list-view.css',
|
||||
),
|
||||
'phabricator-app-buttons-css' =>
|
||||
array(
|
||||
'uri' => '/res/1a1f926e/rsrc/css/application/directory/phabricator-app-buttons.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/css/application/directory/phabricator-app-buttons.css',
|
||||
),
|
||||
'phabricator-application-launch-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/464720b1/rsrc/css/application/base/phabricator-application-launch-view.css',
|
||||
'uri' => '/res/ddfc3af4/rsrc/css/application/base/phabricator-application-launch-view.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -2664,7 +2620,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'phabricator-nav-view-css' =>
|
||||
array(
|
||||
'uri' => '/res/00ba5b11/rsrc/css/aphront/phabricator-nav-view.css',
|
||||
'uri' => '/res/44a2e453/rsrc/css/aphront/phabricator-nav-view.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -3078,7 +3034,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'phabricator-zindex-css' =>
|
||||
array(
|
||||
'uri' => '/res/99eb34fd/rsrc/css/core/z-index.css',
|
||||
'uri' => '/res/81ca67ef/rsrc/css/core/z-index.css',
|
||||
'type' => 'css',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -3268,7 +3224,7 @@ celerity_register_resource_map(array(
|
|||
), array(
|
||||
'packages' =>
|
||||
array(
|
||||
'6d57aed2' =>
|
||||
'38f5403c' =>
|
||||
array(
|
||||
'name' => 'core.pkg.css',
|
||||
'symbols' =>
|
||||
|
@ -3287,33 +3243,32 @@ celerity_register_resource_map(array(
|
|||
11 => 'aphront-list-filter-view-css',
|
||||
12 => 'phabricator-directory-css',
|
||||
13 => 'phabricator-jump-nav',
|
||||
14 => 'phabricator-app-buttons-css',
|
||||
15 => 'phabricator-remarkup-css',
|
||||
16 => 'syntax-highlighting-css',
|
||||
17 => 'aphront-pager-view-css',
|
||||
18 => 'phabricator-transaction-view-css',
|
||||
19 => 'aphront-tooltip-css',
|
||||
20 => 'aphront-headsup-view-css',
|
||||
21 => 'phabricator-flag-css',
|
||||
22 => 'aphront-error-view-css',
|
||||
23 => 'sprite-icon-css',
|
||||
24 => 'sprite-gradient-css',
|
||||
25 => 'sprite-menu-css',
|
||||
26 => 'sprite-apps-large-css',
|
||||
27 => 'phabricator-main-menu-view',
|
||||
28 => 'phabricator-notification-css',
|
||||
29 => 'phabricator-notification-menu-css',
|
||||
30 => 'lightbox-attachment-css',
|
||||
31 => 'phabricator-header-view-css',
|
||||
32 => 'phabricator-form-view-css',
|
||||
33 => 'phabricator-filetree-view-css',
|
||||
34 => 'phabricator-nav-view-css',
|
||||
35 => 'phabricator-side-menu-view-css',
|
||||
36 => 'phabricator-crumbs-view-css',
|
||||
37 => 'phabricator-object-item-list-view-css',
|
||||
38 => 'global-drag-and-drop-css',
|
||||
14 => 'phabricator-remarkup-css',
|
||||
15 => 'syntax-highlighting-css',
|
||||
16 => 'aphront-pager-view-css',
|
||||
17 => 'phabricator-transaction-view-css',
|
||||
18 => 'aphront-tooltip-css',
|
||||
19 => 'aphront-headsup-view-css',
|
||||
20 => 'phabricator-flag-css',
|
||||
21 => 'aphront-error-view-css',
|
||||
22 => 'sprite-icon-css',
|
||||
23 => 'sprite-gradient-css',
|
||||
24 => 'sprite-menu-css',
|
||||
25 => 'sprite-apps-large-css',
|
||||
26 => 'phabricator-main-menu-view',
|
||||
27 => 'phabricator-notification-css',
|
||||
28 => 'phabricator-notification-menu-css',
|
||||
29 => 'lightbox-attachment-css',
|
||||
30 => 'phabricator-header-view-css',
|
||||
31 => 'phabricator-form-view-css',
|
||||
32 => 'phabricator-filetree-view-css',
|
||||
33 => 'phabricator-nav-view-css',
|
||||
34 => 'phabricator-side-menu-view-css',
|
||||
35 => 'phabricator-crumbs-view-css',
|
||||
36 => 'phabricator-object-item-list-view-css',
|
||||
37 => 'global-drag-and-drop-css',
|
||||
),
|
||||
'uri' => '/res/pkg/6d57aed2/core.pkg.css',
|
||||
'uri' => '/res/pkg/38f5403c/core.pkg.css',
|
||||
'type' => 'css',
|
||||
),
|
||||
'b239ff06' =>
|
||||
|
@ -3369,7 +3324,7 @@ celerity_register_resource_map(array(
|
|||
'uri' => '/res/pkg/8edbada5/darkconsole.pkg.js',
|
||||
'type' => 'js',
|
||||
),
|
||||
'ec01d039' =>
|
||||
'20933a11' =>
|
||||
array(
|
||||
'name' => 'differential.pkg.css',
|
||||
'symbols' =>
|
||||
|
@ -3389,7 +3344,7 @@ celerity_register_resource_map(array(
|
|||
12 => 'differential-local-commits-view-css',
|
||||
13 => 'inline-comment-summary-css',
|
||||
),
|
||||
'uri' => '/res/pkg/ec01d039/differential.pkg.css',
|
||||
'uri' => '/res/pkg/20933a11/differential.pkg.css',
|
||||
'type' => 'css',
|
||||
),
|
||||
'bbd79ca2' =>
|
||||
|
@ -3502,34 +3457,34 @@ celerity_register_resource_map(array(
|
|||
'reverse' =>
|
||||
array(
|
||||
'aphront-attached-file-view-css' => 'ac211174',
|
||||
'aphront-crumbs-view-css' => '6d57aed2',
|
||||
'aphront-dialog-view-css' => '6d57aed2',
|
||||
'aphront-error-view-css' => '6d57aed2',
|
||||
'aphront-form-view-css' => '6d57aed2',
|
||||
'aphront-headsup-action-list-view-css' => 'ec01d039',
|
||||
'aphront-headsup-view-css' => '6d57aed2',
|
||||
'aphront-list-filter-view-css' => '6d57aed2',
|
||||
'aphront-pager-view-css' => '6d57aed2',
|
||||
'aphront-panel-view-css' => '6d57aed2',
|
||||
'aphront-table-view-css' => '6d57aed2',
|
||||
'aphront-tokenizer-control-css' => '6d57aed2',
|
||||
'aphront-tooltip-css' => '6d57aed2',
|
||||
'aphront-typeahead-control-css' => '6d57aed2',
|
||||
'differential-changeset-view-css' => 'ec01d039',
|
||||
'differential-core-view-css' => 'ec01d039',
|
||||
'aphront-crumbs-view-css' => '38f5403c',
|
||||
'aphront-dialog-view-css' => '38f5403c',
|
||||
'aphront-error-view-css' => '38f5403c',
|
||||
'aphront-form-view-css' => '38f5403c',
|
||||
'aphront-headsup-action-list-view-css' => '20933a11',
|
||||
'aphront-headsup-view-css' => '38f5403c',
|
||||
'aphront-list-filter-view-css' => '38f5403c',
|
||||
'aphront-pager-view-css' => '38f5403c',
|
||||
'aphront-panel-view-css' => '38f5403c',
|
||||
'aphront-table-view-css' => '38f5403c',
|
||||
'aphront-tokenizer-control-css' => '38f5403c',
|
||||
'aphront-tooltip-css' => '38f5403c',
|
||||
'aphront-typeahead-control-css' => '38f5403c',
|
||||
'differential-changeset-view-css' => '20933a11',
|
||||
'differential-core-view-css' => '20933a11',
|
||||
'differential-inline-comment-editor' => 'bbd79ca2',
|
||||
'differential-local-commits-view-css' => 'ec01d039',
|
||||
'differential-results-table-css' => 'ec01d039',
|
||||
'differential-revision-add-comment-css' => 'ec01d039',
|
||||
'differential-revision-comment-css' => 'ec01d039',
|
||||
'differential-revision-comment-list-css' => 'ec01d039',
|
||||
'differential-revision-history-css' => 'ec01d039',
|
||||
'differential-revision-list-css' => 'ec01d039',
|
||||
'differential-table-of-contents-css' => 'ec01d039',
|
||||
'differential-local-commits-view-css' => '20933a11',
|
||||
'differential-results-table-css' => '20933a11',
|
||||
'differential-revision-add-comment-css' => '20933a11',
|
||||
'differential-revision-comment-css' => '20933a11',
|
||||
'differential-revision-comment-list-css' => '20933a11',
|
||||
'differential-revision-history-css' => '20933a11',
|
||||
'differential-revision-list-css' => '20933a11',
|
||||
'differential-table-of-contents-css' => '20933a11',
|
||||
'diffusion-commit-view-css' => 'c8ce2d88',
|
||||
'diffusion-icons-css' => 'c8ce2d88',
|
||||
'global-drag-and-drop-css' => '6d57aed2',
|
||||
'inline-comment-summary-css' => 'ec01d039',
|
||||
'global-drag-and-drop-css' => '38f5403c',
|
||||
'inline-comment-summary-css' => '20933a11',
|
||||
'javelin-aphlict' => 'b239ff06',
|
||||
'javelin-behavior' => 'fbeded59',
|
||||
'javelin-behavior-aphlict-dropdown' => 'b239ff06',
|
||||
|
@ -3597,49 +3552,48 @@ celerity_register_resource_map(array(
|
|||
'javelin-util' => 'fbeded59',
|
||||
'javelin-vector' => 'fbeded59',
|
||||
'javelin-workflow' => 'fbeded59',
|
||||
'lightbox-attachment-css' => '6d57aed2',
|
||||
'lightbox-attachment-css' => '38f5403c',
|
||||
'maniphest-task-summary-css' => 'ac211174',
|
||||
'maniphest-transaction-detail-css' => 'ac211174',
|
||||
'phabricator-app-buttons-css' => '6d57aed2',
|
||||
'phabricator-busy' => 'b239ff06',
|
||||
'phabricator-content-source-view-css' => 'ec01d039',
|
||||
'phabricator-core-buttons-css' => '6d57aed2',
|
||||
'phabricator-core-css' => '6d57aed2',
|
||||
'phabricator-crumbs-view-css' => '6d57aed2',
|
||||
'phabricator-directory-css' => '6d57aed2',
|
||||
'phabricator-content-source-view-css' => '20933a11',
|
||||
'phabricator-core-buttons-css' => '38f5403c',
|
||||
'phabricator-core-css' => '38f5403c',
|
||||
'phabricator-crumbs-view-css' => '38f5403c',
|
||||
'phabricator-directory-css' => '38f5403c',
|
||||
'phabricator-drag-and-drop-file-upload' => 'bbd79ca2',
|
||||
'phabricator-dropdown-menu' => 'b239ff06',
|
||||
'phabricator-file-upload' => 'b239ff06',
|
||||
'phabricator-filetree-view-css' => '6d57aed2',
|
||||
'phabricator-flag-css' => '6d57aed2',
|
||||
'phabricator-form-view-css' => '6d57aed2',
|
||||
'phabricator-header-view-css' => '6d57aed2',
|
||||
'phabricator-jump-nav' => '6d57aed2',
|
||||
'phabricator-filetree-view-css' => '38f5403c',
|
||||
'phabricator-flag-css' => '38f5403c',
|
||||
'phabricator-form-view-css' => '38f5403c',
|
||||
'phabricator-header-view-css' => '38f5403c',
|
||||
'phabricator-jump-nav' => '38f5403c',
|
||||
'phabricator-keyboard-shortcut' => 'b239ff06',
|
||||
'phabricator-keyboard-shortcut-manager' => 'b239ff06',
|
||||
'phabricator-main-menu-view' => '6d57aed2',
|
||||
'phabricator-main-menu-view' => '38f5403c',
|
||||
'phabricator-menu-item' => 'b239ff06',
|
||||
'phabricator-nav-view-css' => '6d57aed2',
|
||||
'phabricator-nav-view-css' => '38f5403c',
|
||||
'phabricator-notification' => 'b239ff06',
|
||||
'phabricator-notification-css' => '6d57aed2',
|
||||
'phabricator-notification-menu-css' => '6d57aed2',
|
||||
'phabricator-object-item-list-view-css' => '6d57aed2',
|
||||
'phabricator-object-selector-css' => 'ec01d039',
|
||||
'phabricator-notification-css' => '38f5403c',
|
||||
'phabricator-notification-menu-css' => '38f5403c',
|
||||
'phabricator-object-item-list-view-css' => '38f5403c',
|
||||
'phabricator-object-selector-css' => '20933a11',
|
||||
'phabricator-paste-file-upload' => 'b239ff06',
|
||||
'phabricator-prefab' => 'b239ff06',
|
||||
'phabricator-project-tag-css' => 'ac211174',
|
||||
'phabricator-remarkup-css' => '6d57aed2',
|
||||
'phabricator-remarkup-css' => '38f5403c',
|
||||
'phabricator-shaped-request' => 'bbd79ca2',
|
||||
'phabricator-side-menu-view-css' => '6d57aed2',
|
||||
'phabricator-standard-page-view' => '6d57aed2',
|
||||
'phabricator-side-menu-view-css' => '38f5403c',
|
||||
'phabricator-standard-page-view' => '38f5403c',
|
||||
'phabricator-textareautils' => 'b239ff06',
|
||||
'phabricator-tooltip' => 'b239ff06',
|
||||
'phabricator-transaction-view-css' => '6d57aed2',
|
||||
'phabricator-zindex-css' => '6d57aed2',
|
||||
'sprite-apps-large-css' => '6d57aed2',
|
||||
'sprite-gradient-css' => '6d57aed2',
|
||||
'sprite-icon-css' => '6d57aed2',
|
||||
'sprite-menu-css' => '6d57aed2',
|
||||
'syntax-highlighting-css' => '6d57aed2',
|
||||
'phabricator-transaction-view-css' => '38f5403c',
|
||||
'phabricator-zindex-css' => '38f5403c',
|
||||
'sprite-apps-large-css' => '38f5403c',
|
||||
'sprite-gradient-css' => '38f5403c',
|
||||
'sprite-icon-css' => '38f5403c',
|
||||
'sprite-menu-css' => '38f5403c',
|
||||
'syntax-highlighting-css' => '38f5403c',
|
||||
),
|
||||
));
|
||||
|
|
|
@ -648,7 +648,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorApplicationTransactionView' => 'applications/transactions/view/PhabricatorApplicationTransactionView.php',
|
||||
'PhabricatorApplicationTransactions' => 'applications/transactions/application/PhabricatorApplicationTransactions.php',
|
||||
'PhabricatorApplicationUIExamples' => 'applications/uiexample/application/PhabricatorApplicationUIExamples.php',
|
||||
'PhabricatorApplicationsListController' => 'applications/meta/controller/PhabricatorApplicationsListController.php',
|
||||
'PhabricatorAuditActionConstants' => 'applications/audit/constants/PhabricatorAuditActionConstants.php',
|
||||
'PhabricatorAuditAddCommentController' => 'applications/audit/controller/PhabricatorAuditAddCommentController.php',
|
||||
'PhabricatorAuditComment' => 'applications/audit/storage/PhabricatorAuditComment.php',
|
||||
|
@ -2022,7 +2021,6 @@ phutil_register_library_map(array(
|
|||
'PhabricatorApplicationTransactionView' => 'AphrontView',
|
||||
'PhabricatorApplicationTransactions' => 'PhabricatorApplication',
|
||||
'PhabricatorApplicationUIExamples' => 'PhabricatorApplication',
|
||||
'PhabricatorApplicationsListController' => 'PhabricatorController',
|
||||
'PhabricatorAuditAddCommentController' => 'PhabricatorAuditController',
|
||||
'PhabricatorAuditComment' =>
|
||||
array(
|
||||
|
|
|
@ -20,6 +20,10 @@ final class PhabricatorApplicationCalendar extends PhabricatorApplication {
|
|||
return "\xE2\x8C\xA8";
|
||||
}
|
||||
|
||||
public function getApplicationGroup() {
|
||||
return self::GROUP_COMMUNICATION;
|
||||
}
|
||||
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/calendar/' => array(
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
final class PhabricatorApplicationDaemons extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return 'Daemon Console';
|
||||
return 'Daemons';
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
|
|
|
@ -21,11 +21,51 @@ abstract class PhabricatorDirectoryController extends PhabricatorController {
|
|||
$nav = new AphrontSideNavFilterView();
|
||||
$nav->setBaseURI(new PhutilURI('/'));
|
||||
|
||||
$nav->addLabel('Phabricator');
|
||||
$nav->addFilter('home', 'Tactical Command', '/');
|
||||
$nav->addFilter('jump', 'Jump Nav');
|
||||
$nav->addFilter('feed', 'Feed');
|
||||
$nav->addFilter('applications', 'More Stuff');
|
||||
$applications = PhabricatorApplication::getAllInstalledApplications();
|
||||
|
||||
foreach ($applications as $key => $application) {
|
||||
if (!$application->shouldAppearInLaunchView()) {
|
||||
unset($applications[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
$groups = PhabricatorApplication::getApplicationGroups();
|
||||
|
||||
$applications = msort($applications, 'getApplicationOrder');
|
||||
$applications = mgroup($applications, 'getApplicationGroup');
|
||||
$applications = array_select_keys($applications, array_keys($groups));
|
||||
|
||||
$view = array();
|
||||
foreach ($applications as $group => $application_list) {
|
||||
$status = array();
|
||||
foreach ($application_list as $key => $application) {
|
||||
$status[$key] = $application->loadStatus($user);
|
||||
}
|
||||
|
||||
$views = array();
|
||||
foreach ($application_list as $key => $application) {
|
||||
$views[] = id(new PhabricatorApplicationLaunchView())
|
||||
->setApplication($application)
|
||||
->setApplicationStatus(idx($status, $key, array()))
|
||||
->setUser($user);
|
||||
}
|
||||
|
||||
while (count($views) % 4) {
|
||||
$views[] = id(new PhabricatorApplicationLaunchView());
|
||||
}
|
||||
|
||||
$nav->addLabel($groups[$group]);
|
||||
$nav->addCustomBlock(
|
||||
phutil_render_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'application-tile-group',
|
||||
),
|
||||
id(new AphrontNullView())->appendChild($views)->render()));
|
||||
}
|
||||
|
||||
$nav->addClass('phabricator-side-menu-home');
|
||||
$nav->selectFilter(null);
|
||||
|
||||
return $nav;
|
||||
}
|
||||
|
|
|
@ -4,41 +4,28 @@ final class PhabricatorDirectoryMainController
|
|||
extends PhabricatorDirectoryController {
|
||||
|
||||
private $filter;
|
||||
private $subfilter;
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->filter = idx($data, 'filter');
|
||||
$this->subfilter = idx($data, 'subfilter');
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
$user = $this->getRequest()->getUser();
|
||||
|
||||
$nav = $this->buildNav();
|
||||
$this->filter = $nav->selectFilter($this->filter, 'home');
|
||||
if ($this->filter == 'jump') {
|
||||
return $this->buildJumpResponse();
|
||||
}
|
||||
|
||||
$nav = $this->buildNav();
|
||||
|
||||
switch ($this->filter) {
|
||||
case 'jump':
|
||||
break;
|
||||
case 'home':
|
||||
$project_query = new PhabricatorProjectQuery();
|
||||
$project_query->setViewer($user);
|
||||
$project_query->withMemberPHIDs(array($user->getPHID()));
|
||||
$projects = $project_query->execute();
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Unknown filter '{$this->filter}'!");
|
||||
}
|
||||
|
||||
switch ($this->filter) {
|
||||
case 'jump':
|
||||
return $this->buildJumpResponse($nav);
|
||||
default:
|
||||
return $this->buildMainResponse($nav, $projects);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function buildMainResponse($nav, array $projects) {
|
||||
assert_instances_of($projects, 'PhabricatorProject');
|
||||
|
||||
|
@ -56,12 +43,10 @@ final class PhabricatorDirectoryMainController
|
|||
|
||||
$jump_panel = $this->buildJumpPanel();
|
||||
$revision_panel = $this->buildRevisionPanel();
|
||||
$app_panel = $this->buildAppPanel();
|
||||
$audit_panel = $this->buildAuditPanel();
|
||||
$commit_panel = $this->buildCommitPanel();
|
||||
|
||||
$content = array(
|
||||
$app_panel,
|
||||
$jump_panel,
|
||||
$unbreak_panel,
|
||||
$triage_panel,
|
||||
|
@ -82,7 +67,7 @@ final class PhabricatorDirectoryMainController
|
|||
));
|
||||
}
|
||||
|
||||
private function buildJumpResponse($nav) {
|
||||
private function buildJumpResponse() {
|
||||
$request = $this->getRequest();
|
||||
|
||||
$jump = $request->getStr('jump');
|
||||
|
@ -97,15 +82,9 @@ final class PhabricatorDirectoryMainController
|
|||
|
||||
return id(new AphrontRedirectResponse())
|
||||
->setURI('/search/'.$query->getQueryKey().'/');
|
||||
} else {
|
||||
return id(new AphrontRedirectResponse())->setURI('/');
|
||||
}
|
||||
|
||||
|
||||
$nav->appendChild($this->buildJumpPanel($jump));
|
||||
return $this->buildStandardPageResponse(
|
||||
$nav,
|
||||
array(
|
||||
'title' => 'Jump Nav',
|
||||
));
|
||||
}
|
||||
|
||||
private function buildUnbreakNowPanel() {
|
||||
|
@ -389,105 +368,6 @@ final class PhabricatorDirectoryMainController
|
|||
return $panel;
|
||||
}
|
||||
|
||||
private function buildAppPanel() {
|
||||
require_celerity_resource('phabricator-app-buttons-css');
|
||||
|
||||
$nav_buttons = array();
|
||||
|
||||
$nav_buttons[] = array(
|
||||
'Differential',
|
||||
'/differential/',
|
||||
'differential',
|
||||
'Code Reviews');
|
||||
|
||||
if (PhabricatorEnv::getEnvConfig('maniphest.enabled')) {
|
||||
$nav_buttons[] = array(
|
||||
'Maniphest',
|
||||
'/maniphest/',
|
||||
'maniphest',
|
||||
'Tasks');
|
||||
$nav_buttons[] = array(
|
||||
'Create Task',
|
||||
'/maniphest/task/create/',
|
||||
'create-task');
|
||||
}
|
||||
|
||||
$nav_buttons[] = array(
|
||||
'Upload File',
|
||||
'/file/upload/',
|
||||
'upload-file',
|
||||
'Share Files');
|
||||
$nav_buttons[] = array(
|
||||
'Create Paste',
|
||||
'/paste/create/',
|
||||
'create-paste',
|
||||
'Share Text');
|
||||
|
||||
|
||||
if (PhabricatorEnv::getEnvConfig('phriction.enabled')) {
|
||||
$nav_buttons[] = array(
|
||||
'Phriction',
|
||||
'/w/',
|
||||
'phriction',
|
||||
'Browse Wiki');
|
||||
}
|
||||
|
||||
$nav_buttons[] = array(
|
||||
'Diffusion',
|
||||
'/diffusion/',
|
||||
'diffusion',
|
||||
'Browse Code');
|
||||
|
||||
$nav_buttons[] = array(
|
||||
'Audit',
|
||||
'/audit/',
|
||||
'audit',
|
||||
'Audit Code');
|
||||
|
||||
$view = new AphrontNullView();
|
||||
$view->appendChild('<div class="phabricator-app-buttons">');
|
||||
foreach ($nav_buttons as $info) {
|
||||
// Subtitle is optional.
|
||||
list($name, $uri, $icon, $subtitle) = array_merge($info, array(null));
|
||||
|
||||
if ($subtitle) {
|
||||
$subtitle =
|
||||
'<div class="phabricator-app-subtitle">'.
|
||||
phutil_escape_html($subtitle).
|
||||
'</div>';
|
||||
}
|
||||
|
||||
$button = phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $uri,
|
||||
'class' => 'app-button icon-'.$icon,
|
||||
),
|
||||
phutil_render_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'app-icon icon-'.$icon,
|
||||
),
|
||||
''));
|
||||
$caption = phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $uri,
|
||||
'class' => 'phabricator-button-caption',
|
||||
),
|
||||
phutil_escape_html($name).$subtitle);
|
||||
|
||||
$view->appendChild(
|
||||
'<div class="phabricator-app-button">'.
|
||||
$button.
|
||||
$caption.
|
||||
'</div>');
|
||||
}
|
||||
$view->appendChild('<div style="clear: both;"></div></div>');
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
private function renderMiniPanel($title, $body) {
|
||||
$panel = new AphrontMiniPanelView();
|
||||
$panel->appendChild(
|
||||
|
|
|
@ -15,11 +15,7 @@ final class PhabricatorApplicationApplications extends PhabricatorApplication {
|
|||
}
|
||||
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/applications/' => array(
|
||||
'' => 'PhabricatorApplicationsListController'
|
||||
),
|
||||
);
|
||||
return array();
|
||||
}
|
||||
|
||||
public function getTitleGlyph() {
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorApplicationsListController
|
||||
extends PhabricatorController {
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
|
||||
$applications = PhabricatorApplication::getAllInstalledApplications();
|
||||
|
||||
foreach ($applications as $key => $application) {
|
||||
if (!$application->shouldAppearInLaunchView()) {
|
||||
unset($applications[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
$groups = PhabricatorApplication::getApplicationGroups();
|
||||
|
||||
$applications = msort($applications, 'getApplicationOrder');
|
||||
$applications = mgroup($applications, 'getApplicationGroup');
|
||||
$applications = array_select_keys($applications, array_keys($groups));
|
||||
|
||||
$view = array();
|
||||
foreach ($applications as $group => $application_list) {
|
||||
$status = array();
|
||||
foreach ($application_list as $key => $application) {
|
||||
$status[$key] = $application->loadStatus($user);
|
||||
}
|
||||
|
||||
$views = array();
|
||||
foreach ($application_list as $key => $application) {
|
||||
$views[] = id(new PhabricatorApplicationLaunchView())
|
||||
->setApplication($application)
|
||||
->setApplicationStatus(idx($status, $key, array()))
|
||||
->setUser($user);
|
||||
}
|
||||
|
||||
$view[] = id(new PhabricatorHeaderView())
|
||||
->setHeader($groups[$group]);
|
||||
|
||||
$view[] = phutil_render_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phabricator-application-list',
|
||||
),
|
||||
id(new AphrontNullView())->appendChild($views)->render());
|
||||
}
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
$view,
|
||||
array(
|
||||
'title' => 'Applications',
|
||||
'device' => true,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -19,45 +19,25 @@ final class PhabricatorApplicationLaunchView extends AphrontView {
|
|||
$application = $this->application;
|
||||
|
||||
require_celerity_resource('phabricator-application-launch-view-css');
|
||||
require_celerity_resource('sprite-apps-xlarge-css');
|
||||
require_celerity_resource('sprite-apps-large-css');
|
||||
|
||||
$content = array();
|
||||
$icon = null;
|
||||
if ($application) {
|
||||
$content[] = phutil_render_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phabricator-application-launch-name',
|
||||
),
|
||||
phutil_escape_html($application->getName()));
|
||||
$content[] = phutil_render_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phabricator-application-launch-description',
|
||||
),
|
||||
phutil_escape_html($application->getShortDescription()));
|
||||
|
||||
|
||||
$count = 0;
|
||||
$content[] = '<span class="phabricator-application-status-block">';
|
||||
|
||||
if ($this->status) {
|
||||
foreach ($this->status as $status) {
|
||||
$count += $status->getCount();
|
||||
$content[] = $status;
|
||||
}
|
||||
} else {
|
||||
$flavor = $application->getFlavorText();
|
||||
if ($flavor !== null) {
|
||||
$content[] = phutil_render_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phabricator-application-flavor-text',
|
||||
),
|
||||
phutil_escape_html($flavor));
|
||||
}
|
||||
}
|
||||
|
||||
$content[] = '</span>';
|
||||
|
||||
if ($count) {
|
||||
$content[] = phutil_render_tag(
|
||||
'span',
|
||||
|
@ -75,8 +55,8 @@ final class PhabricatorApplicationLaunchView extends AphrontView {
|
|||
$styles[] = 'background-image: url('.$application->getIconURI().')';
|
||||
} else {
|
||||
$icon = $application->getIconName();
|
||||
$classes[] = 'sprite-apps-xlarge';
|
||||
$classes[] = 'app-'.$icon.'-dark-xlarge';
|
||||
$classes[] = 'sprite-apps-large';
|
||||
$classes[] = 'app-'.$icon.'-light-large';
|
||||
}
|
||||
|
||||
$icon = phutil_render_tag(
|
||||
|
@ -86,12 +66,13 @@ final class PhabricatorApplicationLaunchView extends AphrontView {
|
|||
'style' => nonempty(implode('; ', $styles), null),
|
||||
),
|
||||
'');
|
||||
}
|
||||
|
||||
return phutil_render_tag(
|
||||
'a',
|
||||
$application ? 'a' : 'div',
|
||||
array(
|
||||
'class' => 'phabricator-application-launch-container',
|
||||
'href' => $application->getBaseURI(),
|
||||
'href' => $application ? $application->getBaseURI() : null,
|
||||
),
|
||||
$icon.
|
||||
$this->renderSingleView($content));
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
final class PhabricatorApplicationPHID extends PhabricatorApplication {
|
||||
|
||||
public function getName() {
|
||||
return 'PHID Manager';
|
||||
return 'PHIDs';
|
||||
}
|
||||
|
||||
public function getBaseURI() {
|
||||
|
|
|
@ -24,6 +24,12 @@ final class AphrontSideNavFilterView extends AphrontView {
|
|||
private $active;
|
||||
private $menu;
|
||||
private $crumbs;
|
||||
private $classes = array();
|
||||
|
||||
public function addClass($class) {
|
||||
$this->classes[] = $class;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
$this->menu = new PhabricatorMenuView();
|
||||
|
@ -230,6 +236,8 @@ final class AphrontSideNavFilterView extends AphrontView {
|
|||
}
|
||||
}
|
||||
|
||||
$nav_classes = array_merge($nav_classes, $this->classes);
|
||||
|
||||
return phutil_render_tag(
|
||||
'div',
|
||||
array(
|
||||
|
|
|
@ -6,13 +6,21 @@
|
|||
cursor: col-resize;
|
||||
}
|
||||
|
||||
.phabricator-nav {
|
||||
/* Force top margins in page content not to collapse with the top margin of
|
||||
the navigation container by giving it padding. Then put it in the right
|
||||
position by undoing the padding with a margin. */
|
||||
padding-top: 1px;
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.phabricator-nav-column-background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 205px;
|
||||
background: #ececec;
|
||||
background: #252b2d;
|
||||
box-shadow: inset -3px 0 4px rgba(0, 0, 0, 0.05);
|
||||
background-image: url(/rsrc/image/menu_texture.png);
|
||||
}
|
||||
|
@ -66,3 +74,12 @@
|
|||
.device-desktop .has-local-nav .phabricator-nav-content {
|
||||
margin-left: 205px;
|
||||
}
|
||||
|
||||
.phabricator-side-menu-home .phabricator-nav-column-background,
|
||||
.phabricator-side-menu-home .phabricator-nav-local {
|
||||
width: 320px;
|
||||
}
|
||||
|
||||
.device-desktop .phabricator-side-menu-home .phabricator-nav-content {
|
||||
margin-left: 320px;
|
||||
}
|
||||
|
|
|
@ -9,16 +9,9 @@
|
|||
|
||||
*/
|
||||
|
||||
/* On desktops, put some space around the whole grid. */
|
||||
.device-desktop .phabricator-application-list {
|
||||
padding: 0 0 20px 20px;
|
||||
}
|
||||
|
||||
/* On tablets, show two columns in the center. */
|
||||
.device-tablet .phabricator-application-list {
|
||||
width: 660px;
|
||||
margin: auto;
|
||||
padding: .5em 0;
|
||||
.application-tile-group {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,31 +21,25 @@
|
|||
|
||||
*/
|
||||
|
||||
a.phabricator-application-launch-container {
|
||||
display: inline-block;
|
||||
width: 220px;
|
||||
min-height: 90px;
|
||||
padding: 12px 15px 10px 75px;
|
||||
margin: 3px 6px;
|
||||
a.phabricator-application-launch-container,
|
||||
div.phabricator-application-launch-container {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 78px;
|
||||
height: 78px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
text-decoration: none;
|
||||
border: 1px solid #a7a8aa;
|
||||
background-color: #f3f3f3;
|
||||
|
||||
border-radius: 3px;
|
||||
box-shadow: 0px 1px 2px #ccc;
|
||||
border: 1px solid #080909;
|
||||
|
||||
}
|
||||
|
||||
a.phabricator-application-launch-container:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.phabricator-application-launch-container:active {
|
||||
box-shadow: inset 0 0px 3px rgba(0, 0, 0, 0.9);
|
||||
}
|
||||
|
||||
/* The hover effect looks awful on phones/tablets when scrolling. */
|
||||
.device-desktop a.phabricator-application-launch-container:hover {
|
||||
background-color: #638ed3;
|
||||
|
@ -60,92 +47,34 @@ a.phabricator-application-launch-container:active {
|
|||
color: #fff;
|
||||
}
|
||||
|
||||
.phabricator-application-launch-name,
|
||||
.phabricator-application-launch-description,
|
||||
.phabricator-application-launch-status {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.phabricator-application-launch-icon {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
top: 10px;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
background-repeat: no-repeat;
|
||||
left: 25px;
|
||||
top: 15px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.phabricator-application-launch-name {
|
||||
display: block;
|
||||
margin-top: 50px;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
padding-bottom: 2px
|
||||
}
|
||||
|
||||
.phabricator-application-launch-description {
|
||||
color: #888;
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.device-desktop a.phabricator-application-launch-container:hover
|
||||
.phabricator-application-launch-description {
|
||||
color: #dddddd;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
text-shadow: 0px 1px 1px #000000;
|
||||
}
|
||||
|
||||
.phabricator-application-launch-attention {
|
||||
position: absolute;
|
||||
left: 45px;
|
||||
top: 10px;
|
||||
right: 4px;
|
||||
top: 4px;
|
||||
background: #ff0000;
|
||||
border-radius: 10px;
|
||||
color: white;
|
||||
font-weight: normal;
|
||||
padding: 2px 6px;
|
||||
font-weight: bold;
|
||||
padding: 1px 6px 2px;
|
||||
border: 1px solid #aa0000;
|
||||
box-shadow: 0px 0px 3px rgba(255, 255, 255, 0.5),
|
||||
inset 0 0 3px #aa0000;
|
||||
}
|
||||
|
||||
.phabricator-application-status-block {
|
||||
margin-top: 0.5em;
|
||||
padding-top: 0.5em;
|
||||
border-top: 1px solid #dfdfdf;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.phabricator-application-flavor-text,
|
||||
.phabricator-application-status {
|
||||
float: left;
|
||||
display: block;
|
||||
position: relative;
|
||||
font-size: 11px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.phabricator-application-status {
|
||||
height: 20px;
|
||||
padding-left: 22px;
|
||||
|
||||
background-repeat: no-repeat;
|
||||
background-size: 16px auto;
|
||||
padding-top: 1px;
|
||||
}
|
||||
|
||||
.device-desktop a.phabricator-application-launch-container:hover
|
||||
.phabricator-application-status,
|
||||
.device-desktop a.phabricator-application-launch-container:hover
|
||||
.phabricator-application-flavor-text {
|
||||
color: #eeeeee;
|
||||
}
|
||||
|
||||
.phabricator-application-status-type-needs {
|
||||
background-image: url(/rsrc/image/appstatus_needs.png);
|
||||
}
|
||||
|
||||
.phabricator-application-status-type-empty {
|
||||
background-image: url(/rsrc/image/appstatus_empty.png);
|
||||
}
|
||||
|
||||
.phabricator-application-status-type-info {
|
||||
background-image: url(/rsrc/image/appstatus_info.png);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
/**
|
||||
* @provides phabricator-app-buttons-css
|
||||
*/
|
||||
|
||||
.phabricator-app-buttons {
|
||||
padding: 2em 3em 0em;
|
||||
}
|
||||
|
||||
.phabricator-app-button {
|
||||
display: block;
|
||||
float: left;
|
||||
margin-right: 8px;
|
||||
margin-bottom: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.phabricator-app-button .app-button {
|
||||
display: block;
|
||||
margin: 0px 10px 4px;
|
||||
|
||||
background: #5e77aa;
|
||||
cursor: pointer;
|
||||
|
||||
background-color: #e9ecec;
|
||||
border: 1px solid #999;
|
||||
border-bottom-color: #888;
|
||||
|
||||
box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.07),
|
||||
inset 1px 1px 2px rgba(255, 255, 255, 0.80),
|
||||
inset -1px -1px 3px rgba(0, 0, 0, 0.20);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.phabricator-app-button .app-button:active {
|
||||
background-color: #dddddd;
|
||||
background-image: none;
|
||||
border-bottom-color: #999;
|
||||
}
|
||||
|
||||
a.phabricator-button-caption,
|
||||
a.phabricator-button-caption:link,
|
||||
a.phabricator-button-caption:active,
|
||||
a.phabricator-button-caption:hover,
|
||||
a.phabricator-button-caption:visited {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
padding: 3px 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.phabricator-app-subtitle {
|
||||
color: #888888;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
.app-icon {
|
||||
position: relative;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin: 5px;
|
||||
background: url('/rsrc/image/apps.png') 0 0 no-repeat;
|
||||
}
|
||||
|
||||
.icon-differential {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.icon-maniphest {
|
||||
background-position: 0 -50px;
|
||||
}
|
||||
|
||||
.icon-create-task {
|
||||
background-position: 0 -100px;
|
||||
}
|
||||
|
||||
.icon-upload-file {
|
||||
background-position: 0 -150px;
|
||||
}
|
||||
|
||||
.icon-create-paste {
|
||||
background-position: 0 -200px;
|
||||
}
|
||||
|
||||
.icon-phriction {
|
||||
background-position: 0 -250px;
|
||||
}
|
||||
|
||||
.icon-diffusion {
|
||||
background-position: 0 -300px;
|
||||
}
|
||||
|
||||
.icon-audit {
|
||||
background-position: 0 -350px;
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 774 B |
Binary file not shown.
Before Width: | Height: | Size: 690 B |
Binary file not shown.
Before Width: | Height: | Size: 719 B |
Binary file not shown.
Before Width: | Height: | Size: 476 B |
Loading…
Reference in a new issue