mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Add ObjectBox around Diffusion Binary Files
Summary: Add in more ObjectBoxes Test Plan: Test aphlict.swf, see new menu and button to download. Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D8305
This commit is contained in:
parent
8662b27f89
commit
a4d4bf8196
1 changed files with 15 additions and 7 deletions
|
@ -871,15 +871,23 @@ final class DiffusionBrowseFileController extends DiffusionBrowseController {
|
|||
}
|
||||
|
||||
private function buildBinaryCorpus($file_uri, $data) {
|
||||
$properties = new PHUIPropertyListView();
|
||||
|
||||
$size = strlen($data);
|
||||
$properties->addTextContent(
|
||||
pht(
|
||||
'This is a binary file. It is %s byte(s) in length.',
|
||||
new PhutilNumber($size)));
|
||||
$size = new PhutilNumber(strlen($data));
|
||||
$text = pht('This is a binary file. It is %s byte(s) in length.', $size);
|
||||
$text = id(new PHUIBoxView())
|
||||
->addPadding(PHUI::PADDING_LARGE)
|
||||
->appendChild($text);
|
||||
|
||||
return $properties;
|
||||
$file = $this->renderFileButton($file_uri);
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Details'))
|
||||
->addActionLink($file);
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->appendChild($text);
|
||||
|
||||
return $box;
|
||||
}
|
||||
|
||||
private function buildBeforeResponse($before) {
|
||||
|
|
Loading…
Reference in a new issue