Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/files_sharing/lib/Controller/ShareController.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public function showShare($path = ''): TemplateResponse {
$shareTmpl['protected'] = $share->getPassword() !== null ? 'true' : 'false';
$shareTmpl['dir'] = '';
$shareTmpl['nonHumanFileSize'] = $shareNode->getSize();
$shareTmpl['fileSize'] = \OCP\Util::humanFileSize($shareNode->getSize());
$shareTmpl['fileSize'] = str_replace(' ', ' ', \OCP\Util::humanFileSize($shareNode->getSize()));
$shareTmpl['hideDownload'] = $share->getHideDownload();

$hideFileList = false;
Expand Down
4 changes: 2 additions & 2 deletions apps/files_sharing/templates/public.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<?php if (isset($_['mimetype']) && strpos($_['mimetype'], 'image') === 0) { ?>
<div class="directDownload">
<div>
<?php p($_['filename'])?> (<?php p($_['fileSize']) ?>)
<?php p($_['filename'])?> (<?php echo($_['fileSize']) ?>)
</div>
<a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
<span class="icon icon-download"></span>
Expand All @@ -87,7 +87,7 @@
<?php if ($_['previewURL'] === $_['downloadURL'] && !$_['hideDownload']): ?>
<div class="directDownload">
<div>
<?php p($_['filename'])?> (<?php p($_['fileSize']) ?>)
<?php p($_['filename'])?> (<?php echo($_['fileSize']) ?>)
</div>
<a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
<span class="icon icon-download"></span>
Expand Down
8 changes: 4 additions & 4 deletions apps/files_sharing/tests/Controller/ShareControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function testShowShare() {
'protected' => 'true',
'dir' => '',
'downloadURL' => 'downloadURL',
'fileSize' => '33 B',
'fileSize' => '33&nbsp;B',
'nonHumanFileSize' => 33,
'maxSizeAnimateGif' => 10,
'previewSupported' => true,
Expand Down Expand Up @@ -480,7 +480,7 @@ public function testShowShareWithPrivateName() {
'protected' => 'true',
'dir' => '',
'downloadURL' => 'downloadURL',
'fileSize' => '33 B',
'fileSize' => '33&nbsp;B',
'nonHumanFileSize' => 33,
'maxSizeAnimateGif' => 10,
'previewSupported' => true,
Expand Down Expand Up @@ -631,7 +631,7 @@ public function testShowShareHideDownload() {
'protected' => 'true',
'dir' => '',
'downloadURL' => 'downloadURL',
'fileSize' => '33 B',
'fileSize' => '33&nbsp;B',
'nonHumanFileSize' => 33,
'maxSizeAnimateGif' => 10,
'previewSupported' => true,
Expand Down Expand Up @@ -756,7 +756,7 @@ public function testShareFileDrop() {
'protected' => 'false',
'dir' => null,
'downloadURL' => '',
'fileSize' => '1 KB',
'fileSize' => '1&nbsp;KB',
'nonHumanFileSize' => 1337,
'maxSizeAnimateGif' => null,
'previewSupported' => null,
Expand Down
31 changes: 21 additions & 10 deletions core/css/public.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
$footer-height: 65px;

#body-public {
.header-right {
min-height: 100vh;
display: flex;
flex-direction: column;

#content {
flex-grow: 2;
min-height: initial;

/** Center the shared content inside the page */
&.app-files_sharing {
justify-content: center;
align-items: center;
#app-content {
min-height: inherit;
padding-left: 1rem;
padding-right: 1rem;
}
}
}

.header-right {
#header-primary-action a {
color: var(--color-primary-text);
}
Expand Down Expand Up @@ -35,12 +52,6 @@ $footer-height: 65px;
}
}

#content {
// 100% - footer
min-height: calc(100% - #{$footer-height});

}

/** don't apply content header padding on the base layout */
&.layout-base #content {
padding-top: 0;
Expand Down Expand Up @@ -72,8 +83,8 @@ $footer-height: 65px;
display: flex;
align-items: center;
justify-content: center;
height: $footer-height;
flex-direction: column;
padding: 0.5rem;
p {
text-align: center;
color: var(--color-text-lighter);
Expand Down