@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use proper file icons in lightbox

Summary: Ref T3612. Passes in file size and file icon for non-images.

Test Plan: Review a PDF and PSD in a lightbox.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3612

Differential Revision: https://secure.phabricator.com/D16957

+21 -18
+12 -12
resources/celerity/map.php
··· 10 10 'conpherence.pkg.css' => '0b64e988', 11 11 'conpherence.pkg.js' => '6249a1cf', 12 12 'core.pkg.css' => '4107e0f7', 13 - 'core.pkg.js' => '11c6a1ec', 13 + 'core.pkg.js' => '1602cd3d', 14 14 'darkconsole.pkg.js' => 'e7393ebb', 15 15 'differential.pkg.css' => 'a4ba74b5', 16 16 'differential.pkg.js' => '634399e9', ··· 505 505 'rsrc/js/core/behavior-hovercard.js' => 'bcaccd64', 506 506 'rsrc/js/core/behavior-keyboard-pager.js' => 'a8da01f0', 507 507 'rsrc/js/core/behavior-keyboard-shortcuts.js' => '01fca1f0', 508 - 'rsrc/js/core/behavior-lightbox-attachments.js' => '0b4ac79f', 508 + 'rsrc/js/core/behavior-lightbox-attachments.js' => 'e62f3c48', 509 509 'rsrc/js/core/behavior-line-linker.js' => '1499a8cb', 510 510 'rsrc/js/core/behavior-more.js' => 'a80d0378', 511 511 'rsrc/js/core/behavior-object-selector.js' => 'e0ec7f2f', ··· 651 651 'javelin-behavior-history-install' => '7ee2b591', 652 652 'javelin-behavior-icon-composer' => '8499b6ab', 653 653 'javelin-behavior-launch-icon-composer' => '48086888', 654 - 'javelin-behavior-lightbox-attachments' => '0b4ac79f', 654 + 'javelin-behavior-lightbox-attachments' => 'e62f3c48', 655 655 'javelin-behavior-line-chart' => 'e4232876', 656 656 'javelin-behavior-load-blame' => '42126667', 657 657 'javelin-behavior-maniphest-batch-editor' => '782ab6e7', ··· 990 990 'javelin-workflow', 991 991 'javelin-dom', 992 992 'javelin-router', 993 - ), 994 - '0b4ac79f' => array( 995 - 'javelin-behavior', 996 - 'javelin-stratcom', 997 - 'javelin-dom', 998 - 'javelin-mask', 999 - 'javelin-util', 1000 - 'phuix-icon-view', 1001 - 'phabricator-busy', 1002 993 ), 1003 994 '0f764c35' => array( 1004 995 'javelin-install', ··· 2128 2119 'javelin-json', 2129 2120 'javelin-workflow', 2130 2121 'javelin-magical-init', 2122 + ), 2123 + 'e62f3c48' => array( 2124 + 'javelin-behavior', 2125 + 'javelin-stratcom', 2126 + 'javelin-dom', 2127 + 'javelin-mask', 2128 + 'javelin-util', 2129 + 'phuix-icon-view', 2130 + 'phabricator-busy', 2131 2131 ), 2132 2132 'e9581f08' => array( 2133 2133 'javelin-behavior',
+8 -5
src/view/layout/PhabricatorFileLinkView.php
··· 83 83 return $this->fileSize; 84 84 } 85 85 86 + private function getFileIcon() { 87 + return FileTypeIcon::getFileIcon($this->getFileName()); 88 + } 89 + 86 90 public function getMetadata() { 87 91 return array( 88 92 'phid' => $this->getFilePHID(), ··· 91 95 'dUri' => $this->getFileDownloadURI(), 92 96 'name' => $this->getFileName(), 93 97 'monogram' => $this->getFileMonogram(), 98 + 'icon' => $this->getFileIcon(), 99 + 'size' => $this->getFileSize(), 94 100 ); 95 101 } 96 102 ··· 107 113 $class = $this->getCustomClass(); 108 114 } 109 115 110 - $filename = $this->getFileName(); 111 - $type_icon = FileTypeIcon::getFileIcon($filename); 112 - 113 116 $icon = id(new PHUIIconView()) 114 - ->setIcon($type_icon); 117 + ->setIcon($this->getFileIcon()); 115 118 116 119 $info = phutil_tag( 117 120 'span', ··· 125 128 array( 126 129 'class' => 'phabricator-remarkup-embed-layout-name', 127 130 ), 128 - $filename); 131 + $this->getFileName()); 129 132 130 133 $inner = phutil_tag( 131 134 'span',
+1 -1
webroot/rsrc/js/core/behavior-lightbox-attachments.js
··· 99 99 ); 100 100 } else { 101 101 var imgIcon = new JX.PHUIXIconView() 102 - .setIcon('fa-file-text-o phui-lightbox-file-icon') 102 + .setIcon(target_data.icon + ' phui-lightbox-file-icon') 103 103 .getNode(); 104 104 var nameElement = 105 105 JX.$N('div',