mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 05:20:56 +01:00
Always give users "fa-user" icons in tokenizers
Summary: Fixes T10247. The flavor icons are unhelpful/confusing in these contexts; show a boringer icon instead. Test Plan: Used tokenizer to select user with custom profile icon. Reloaded page. Saw boringer icon in both cases. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10247 Differential Revision: https://secure.phabricator.com/D15154
This commit is contained in:
parent
08e7b6f79f
commit
18f34fab73
3 changed files with 19 additions and 3 deletions
|
@ -54,8 +54,10 @@ final class PhabricatorPeopleUserPHIDType extends PhabricatorPHIDType {
|
|||
$icon_icon = PhabricatorPeopleIconSet::getIconIcon($icon_key);
|
||||
$subtitle = $profile->getDisplayTitle();
|
||||
|
||||
$handle->setIcon($icon_icon);
|
||||
$handle->setSubtitle($subtitle);
|
||||
$handle
|
||||
->setIcon($icon_icon)
|
||||
->setSubtitle($subtitle)
|
||||
->setTokenIcon('fa-user');
|
||||
}
|
||||
|
||||
$availability = null;
|
||||
|
|
|
@ -28,6 +28,7 @@ final class PhabricatorObjectHandle
|
|||
private $objectName;
|
||||
private $policyFiltered;
|
||||
private $subtitle;
|
||||
private $tokenIcon;
|
||||
|
||||
public function setIcon($icon) {
|
||||
$this->icon = $icon;
|
||||
|
@ -86,6 +87,19 @@ final class PhabricatorObjectHandle
|
|||
return null;
|
||||
}
|
||||
|
||||
public function setTokenIcon($icon) {
|
||||
$this->tokenIcon = $icon;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTokenIcon() {
|
||||
if ($this->tokenIcon !== null) {
|
||||
return $this->tokenIcon;
|
||||
}
|
||||
|
||||
return $this->getIcon();
|
||||
}
|
||||
|
||||
public function getTypeIcon() {
|
||||
if ($this->getPHIDType()) {
|
||||
return $this->getPHIDType()->getTypeIcon();
|
||||
|
|
|
@ -32,7 +32,7 @@ final class PhabricatorTypeaheadTokenView
|
|||
$token = id(new PhabricatorTypeaheadTokenView())
|
||||
->setKey($handle->getPHID())
|
||||
->setValue($handle->getFullName())
|
||||
->setIcon($handle->getIcon());
|
||||
->setIcon($handle->getTokenIcon());
|
||||
|
||||
if ($handle->isDisabled() ||
|
||||
$handle->getStatus() == PhabricatorObjectHandle::STATUS_CLOSED) {
|
||||
|
|
Loading…
Reference in a new issue