mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-07 13:21:02 +01:00
e3f6bbfff8
Summary: As per discussion, this primes the existing mobile menu / menu button for "phabricator" and "application" menus. Design here is very rough, I'm just trying to get everything laid in functionally first. It's based on `frame_v3.png` but missing a lot of touches. Test Plan: {F26143} {F26144} Reviewers: chad Reviewed By: chad CC: aran Maniphest Tasks: T1960 Differential Revision: https://secure.phabricator.com/D4058
50 lines
1.1 KiB
PHP
50 lines
1.1 KiB
PHP
<?php
|
|
|
|
final class PhabricatorApplicationSettings extends PhabricatorApplication {
|
|
|
|
public function getBaseURI() {
|
|
return '/settings/';
|
|
}
|
|
|
|
public function getShortDescription() {
|
|
return 'User Preferences';
|
|
}
|
|
|
|
public function getAutospriteName() {
|
|
return 'settings';
|
|
}
|
|
|
|
public function getRoutes() {
|
|
return array(
|
|
'/settings/' => array(
|
|
'(?:panel/(?P<key>[^/]+)/)?' => 'PhabricatorSettingsMainController',
|
|
'adjust/' => 'PhabricatorSettingsAdjustController',
|
|
),
|
|
);
|
|
}
|
|
|
|
public function getApplicationGroup() {
|
|
return self::GROUP_UTILITIES;
|
|
}
|
|
|
|
public function buildMainMenuItems(
|
|
PhabricatorUser $user,
|
|
PhabricatorController $controller = null) {
|
|
|
|
$items = array();
|
|
|
|
if ($user->isLoggedIn()) {
|
|
$selected = ($controller instanceof PhabricatorSettingsMainController);
|
|
$item = new PhabricatorMenuItemView();
|
|
$item->setName(pht('Settings'));
|
|
$item->setIcon('settings');
|
|
$item->setSelected($selected);
|
|
$item->setHref('/settings/');
|
|
$item->setSortOrder(0.90);
|
|
$items[] = $item;
|
|
}
|
|
|
|
return $items;
|
|
}
|
|
|
|
}
|