Page MenuHomePhabricator

D10095.id.diff
No OneTemporary

D10095.id.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -67,7 +67,7 @@
'rsrc/css/application/feed/feed.css' => '4e544db4',
'rsrc/css/application/files/global-drag-and-drop.css' => '697324ad',
'rsrc/css/application/flag/flag.css' => '5337623f',
- 'rsrc/css/application/harbormaster/harbormaster.css' => '49d64eb4',
+ 'rsrc/css/application/harbormaster/harbormaster.css' => 'c2b80d69',
'rsrc/css/application/herald/herald-test.css' => '778b008e',
'rsrc/css/application/herald/herald.css' => 'c544dd1c',
'rsrc/css/application/maniphest/batch-editor.css' => '8f380ebc',
@@ -539,7 +539,7 @@
'font-fontawesome' => '73d075c3',
'font-source-sans-pro' => '91d53463',
'global-drag-and-drop-css' => '697324ad',
- 'harbormaster-css' => '49d64eb4',
+ 'harbormaster-css' => 'c2b80d69',
'herald-css' => 'c544dd1c',
'herald-rule-editor' => '3fc2c8f2',
'herald-test-css' => '778b008e',
diff --git a/src/applications/harbormaster/controller/HarbormasterBuildViewController.php b/src/applications/harbormaster/controller/HarbormasterBuildViewController.php
--- a/src/applications/harbormaster/controller/HarbormasterBuildViewController.php
+++ b/src/applications/harbormaster/controller/HarbormasterBuildViewController.php
@@ -39,7 +39,9 @@
}
$box = id(new PHUIObjectBoxView())
- ->setHeader($header);
+ ->setHeader($header)
+ ->setHeaderColor($this->getStatusColor($build))
+ ->setNoGradient(true);
$actions = $this->buildActionList($build);
$this->buildPropertyLists($box, $build, $actions);
@@ -91,6 +93,10 @@
$item->setIcon($icon, $color);
$status_view->addItem($item);
+ $target_box
+ ->setHeaderColor($color)
+ ->setNoGradient(true);
+
$properties->addProperty(pht('Name'), $build_target->getName());
$properties->addProperty(pht('Status'), $status_view);
@@ -437,6 +443,15 @@
return $status_view;
}
+ private function getStatusColor(HarbormasterBuild $build) {
+ if ($build->isStopping()) {
+ return 'dark';
+ } else {
+ $status = $build->getBuildStatus();
+ return HarbormasterBuild::getBuildStatusColor($status);
+ }
+ }
+
private function buildMessages(array $messages) {
$viewer = $this->getRequest()->getUser();
diff --git a/src/view/phui/PHUIHeaderView.php b/src/view/phui/PHUIHeaderView.php
--- a/src/view/phui/PHUIHeaderView.php
+++ b/src/view/phui/PHUIHeaderView.php
@@ -17,6 +17,7 @@
private $actionLinks = array();
private $buttonBar = null;
private $policyObject;
+ private $noGradient = false;
public function setHeader($header) {
$this->header = $header;
@@ -63,6 +64,11 @@
return $this;
}
+ public function setNoGradient($no_gradient) {
+ $this->noGradient = $no_gradient;
+ return $this;
+ }
+
public function setPolicyObject(PhabricatorPolicyInterface $object) {
$this->policyObject = $object;
return $this;
@@ -123,7 +129,11 @@
if ($this->headerColor) {
$classes[] = 'sprite-gradient';
- $classes[] = 'gradient-'.$this->headerColor.'-header';
+ if ($this->noGradient) {
+ $classes[] = $this->headerColor.'-header';
+ } else {
+ $classes[] = 'gradient-'.$this->headerColor.'-header';
+ }
}
if ($this->properties || $this->policyObject || $this->subheader) {
diff --git a/src/view/phui/PHUIObjectBoxView.php b/src/view/phui/PHUIObjectBoxView.php
--- a/src/view/phui/PHUIObjectBoxView.php
+++ b/src/view/phui/PHUIObjectBoxView.php
@@ -14,6 +14,7 @@
private $id;
private $sigils = array();
private $metadata;
+ private $noGradient = false;
private $tabs = array();
private $propertyLists = array();
@@ -84,6 +85,11 @@
return $this;
}
+ public function setNoGradient($no_gradient) {
+ $this->noGradient = $no_gradient;
+ return $this;
+ }
+
public function setFormErrors(array $errors, $title = null) {
if (nonempty($errors)) {
$this->formErrors = id(new AphrontErrorView())
@@ -149,11 +155,14 @@
if ($this->header) {
$header = $this->header;
- $header->setHeaderColor($header_color);
+ $header
+ ->setHeaderColor($header_color)
+ ->setNoGradient($this->noGradient);
} else {
$header = id(new PHUIHeaderView())
->setHeader($this->headerText)
- ->setHeaderColor($header_color);
+ ->setHeaderColor($header_color)
+ ->setNoGradient($this->noGradient);
}
$ex = $this->validationException;
diff --git a/webroot/rsrc/css/application/harbormaster/harbormaster.css b/webroot/rsrc/css/application/harbormaster/harbormaster.css
--- a/webroot/rsrc/css/application/harbormaster/harbormaster.css
+++ b/webroot/rsrc/css/application/harbormaster/harbormaster.css
@@ -25,3 +25,50 @@
padding: 12px;
color: {$darkgreytext};
}
+
+.phui-header-shell.dark-header {
+ background: {$darkgreytext};
+}
+.phui-header-shell.bluedark-header {
+ background: {$bluetext};
+}
+.phui-header-shell.white-header {
+ background: #fff;
+}
+.phui-header-shell.red-header {
+ background: {$red};
+}
+.phui-header-shell.orange-header {
+ background: {$orange};
+}
+.phui-header-shell.yellow-header {
+ background: {$yellow};
+}
+.phui-header-shell.green-header {
+ background: {$green};
+}
+.phui-header-shell.blue-header {
+ background: {$blue};
+}
+.phui-header-shell.sky-header {
+ background: {$sky};
+}
+.phui-header-shell.indigo-header {
+ background: {$indigo};
+}
+.phui-header-shell.violet-header {
+ background: {$violet};
+}
+
+.phui-header-shell.dark-header *,
+.phui-header-shell.bluedark-header *,
+.phui-header-shell.red-header *,
+.phui-header-shell.orange-header *,
+.phui-header-shell.green-header *,
+.phui-header-shell.blue-header *,
+.phui-header-shell.sky-header *,
+.phui-header-shell.indigo-header *,
+.phui-header-shell.violet-header * {
+ color: white !important;
+ text-shadow: none !important;
+}

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 22, 8:04 AM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6722966
Default Alt Text
D10095.id.diff (5 KB)

Event Timeline