1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 01:10:58 +01:00

Add UI for choosing header color

Summary: See D7731. Fixes T4194.

Test Plan: {F88020}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran, mbishopim3

Maniphest Tasks: T4194

Differential Revision: https://secure.phabricator.com/D7740
This commit is contained in:
epriestley 2013-12-07 10:46:09 -08:00
parent 25e7b7d53c
commit 99ad978e90
4 changed files with 49 additions and 2 deletions

View file

@ -1790,6 +1790,20 @@ celerity_register_resource_map(array(
),
'disk' => '/rsrc/js/core/behavior-global-drag-and-drop.js',
),
'javelin-behavior-harbormaster-reorder-steps' =>
array(
'uri' => '/res/035fe63d/rsrc/js/application/harbormaster/behavior-reorder-steps.js',
'type' => 'js',
'requires' =>
array(
0 => 'javelin-behavior',
1 => 'javelin-stratcom',
2 => 'javelin-workflow',
3 => 'javelin-dom',
4 => 'phabricator-draggable-list',
),
'disk' => '/rsrc/js/application/harbormaster/behavior-reorder-steps.js',
),
'javelin-behavior-herald-rule-editor' =>
array(
'uri' => '/res/77a0c945/rsrc/js/application/herald/herald-rule-editor.js',

View file

@ -1984,6 +1984,7 @@ phutil_register_library_map(array(
'PhabricatorTypeaheadCommonDatasourceController' => 'applications/typeahead/controller/PhabricatorTypeaheadCommonDatasourceController.php',
'PhabricatorTypeaheadDatasourceController' => 'applications/typeahead/controller/PhabricatorTypeaheadDatasourceController.php',
'PhabricatorTypeaheadResult' => 'applications/typeahead/storage/PhabricatorTypeaheadResult.php',
'PhabricatorUIConfigOptions' => 'applications/config/option/PhabricatorUIConfigOptions.php',
'PhabricatorUIExample' => 'applications/uiexample/examples/PhabricatorUIExample.php',
'PhabricatorUIExampleRenderController' => 'applications/uiexample/controller/PhabricatorUIExampleRenderController.php',
'PhabricatorUIListFilterExample' => 'applications/uiexample/examples/PhabricatorUIListFilterExample.php',
@ -4527,6 +4528,7 @@ phutil_register_library_map(array(
'PhabricatorTwoColumnExample' => 'PhabricatorUIExample',
'PhabricatorTypeaheadCommonDatasourceController' => 'PhabricatorTypeaheadDatasourceController',
'PhabricatorTypeaheadDatasourceController' => 'PhabricatorController',
'PhabricatorUIConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorUIExampleRenderController' => 'PhabricatorController',
'PhabricatorUIListFilterExample' => 'PhabricatorUIExample',
'PhabricatorUINotificationExample' => 'PhabricatorUIExample',

View file

@ -0,0 +1,32 @@
<?php
final class PhabricatorUIConfigOptions
extends PhabricatorApplicationConfigOptions {
public function getName() {
return pht("User Interface");
}
public function getDescription() {
return pht("Configure the Phabricator UI, including colors.");
}
public function getOptions() {
$manifest = PHUIIconView::getSheetManifest('main-header');
$options = array();
foreach (array_keys($manifest) as $sprite_name) {
$key = substr($sprite_name, strlen('main-header-'));
$options[$key] = $key;
}
return array(
$this->newOption('ui.header-color', 'enum', 'dark')
->setDescription(
pht(
'Sets the color of the main header.'))
->setEnumOptions($options),
);
}
}

View file

@ -68,8 +68,7 @@ final class PhabricatorMainMenuView extends AphrontView {
$classes = array();
$classes[] = 'phabricator-main-menu';
$classes[] = 'sprite-main-header';
// TODO: Let admins or users set header
$classes[] = 'main-header-dark';
$classes[] = 'main-header-'.PhabricatorEnv::getEnvConfig('ui.header-color');
return phutil_tag(
'div',