mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 18:52:42 +01:00
fe33041681
Summary: Ref T12174. - Go back to the old mobile behavior (full-screen menu by default, click to see content). - Hide crumbs from all Home content UIs. I left them on the edit/configure UIs since they feel a little less out-of-place there and some have multiple levels. Test Plan: Viewed Home on mobile, viewed `/home/` on mobile. Also, saw no crumbs. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12174 Differential Revision: https://secure.phabricator.com/D17290
42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?php
|
|
|
|
final class PhabricatorHomeMenuItemController
|
|
extends PhabricatorHomeController {
|
|
|
|
public function shouldAllowPublic() {
|
|
return true;
|
|
}
|
|
|
|
public function isGlobalDragAndDropUploadEnabled() {
|
|
return true;
|
|
}
|
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
$viewer = $this->getViewer();
|
|
|
|
// Test if we should show mobile users the menu or the page content:
|
|
// if you visit "/", you just get the menu. If you visit "/home/", you
|
|
// get the content.
|
|
$is_content = $request->getURIData('content');
|
|
|
|
$application = 'PhabricatorHomeApplication';
|
|
$home_app = id(new PhabricatorApplicationQuery())
|
|
->setViewer($viewer)
|
|
->withClasses(array($application))
|
|
->withInstalled(true)
|
|
->executeOne();
|
|
|
|
$engine = id(new PhabricatorHomeProfileMenuEngine())
|
|
->setProfileObject($home_app)
|
|
->setCustomPHID($viewer->getPHID())
|
|
->setController($this)
|
|
->setShowContentCrumbs(false);
|
|
|
|
if (!$is_content) {
|
|
$engine->addContentPageClass('phabricator-home');
|
|
}
|
|
|
|
return $engine->buildResponse();
|
|
}
|
|
|
|
}
|