Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUITimelineEventView.php
Show All 24 Lines | final class PHUITimelineEventView extends AphrontView { | ||||
private $isNormalComment; | private $isNormalComment; | ||||
private $quoteRef; | private $quoteRef; | ||||
private $reallyMajorEvent; | private $reallyMajorEvent; | ||||
private $hideCommentOptions = false; | private $hideCommentOptions = false; | ||||
private $authorPHID; | private $authorPHID; | ||||
private $badges = array(); | private $badges = array(); | ||||
private $pinboardItems = array(); | private $pinboardItems = array(); | ||||
private $isSilent; | private $isSilent; | ||||
private $isMFA; | |||||
public function setAuthorPHID($author_phid) { | public function setAuthorPHID($author_phid) { | ||||
$this->authorPHID = $author_phid; | $this->authorPHID = $author_phid; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getAuthorPHID() { | public function getAuthorPHID() { | ||||
return $this->authorPHID; | return $this->authorPHID; | ||||
▲ Show 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | public function setIsSilent($is_silent) { | ||||
$this->isSilent = $is_silent; | $this->isSilent = $is_silent; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getIsSilent() { | public function getIsSilent() { | ||||
return $this->isSilent; | return $this->isSilent; | ||||
} | } | ||||
public function setIsMFA($is_mfa) { | |||||
$this->isMFA = $is_mfa; | |||||
return $this; | |||||
} | |||||
public function getIsMFA() { | |||||
return $this->isMFA; | |||||
} | |||||
public function setReallyMajorEvent($me) { | public function setReallyMajorEvent($me) { | ||||
$this->reallyMajorEvent = $me; | $this->reallyMajorEvent = $me; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setHideCommentOptions($hide_comment_options) { | public function setHideCommentOptions($hide_comment_options) { | ||||
$this->hideCommentOptions = $hide_comment_options; | $this->hideCommentOptions = $hide_comment_options; | ||||
return $this; | return $this; | ||||
▲ Show 20 Lines • Show All 387 Lines • ▼ Show 20 Lines | if ($this->getIsPreview()) { | ||||
// If this edit was applied silently, give user a hint that they should | // If this edit was applied silently, give user a hint that they should | ||||
// not expect to have received any mail or notifications. | // not expect to have received any mail or notifications. | ||||
if ($this->getIsSilent()) { | if ($this->getIsSilent()) { | ||||
$extra[] = id(new PHUIIconView()) | $extra[] = id(new PHUIIconView()) | ||||
->setIcon('fa-bell-slash', 'red') | ->setIcon('fa-bell-slash', 'red') | ||||
->setTooltip(pht('Silent Edit')); | ->setTooltip(pht('Silent Edit')); | ||||
} | } | ||||
// If this edit was applied while the actor was in high-security mode, | |||||
// provide a hint that it was extra authentic. | |||||
if ($this->getIsMFA()) { | |||||
$extra[] = id(new PHUIIconView()) | |||||
->setIcon('fa-vcard', 'green') | |||||
->setTooltip(pht('MFA Authenticated')); | |||||
} | |||||
} | } | ||||
$extra = javelin_tag( | $extra = javelin_tag( | ||||
'span', | 'span', | ||||
array( | array( | ||||
'class' => 'phui-timeline-extra', | 'class' => 'phui-timeline-extra', | ||||
), | ), | ||||
phutil_implode_html( | phutil_implode_html( | ||||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |