Compare commits

...

2 Commits

Author SHA1 Message Date
Julius Härtl 7229f0c706
fixup! Merge pull request #16107 from nextcloud/local-check-path 2019-06-27 20:35:13 +02:00
Julius Härtl 86e3a31bee
WIP: Open in app
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-06-27 19:52:36 +02:00
3 changed files with 16 additions and 0 deletions

View File

@ -161,6 +161,12 @@ thead {
margin-right: 7px;
}
.openInApp {
margin: 10px;
display: block;
text-align: center;
}
.disclaimer,
.note {
margin: 0 auto 30px;

View File

@ -324,6 +324,12 @@ class ShareController extends AuthPublicShareController {
$shareTmpl['fileSize'] = \OCP\Util::humanFileSize($shareNode->getSize());
$shareTmpl['hideDownload'] = $share->getHideDownload();
if ($this->request->isUserAgent([
'/Android/'
])) {
$shareTmpl['openInApp'] = 'nc://shownode/server:' . $this->request->getServerHost() . '&fileId:' . $share->getNodeId();
}
$hideFileList = false;
if ($shareNode instanceof \OCP\Files\Folder) {

View File

@ -7,6 +7,10 @@
<link rel="image_src" href="<?php p($_['previewImage']); ?>" />
<?php endif; ?>
<?php if (isset($_['openInApp'])): ?>
<a href="<?php p($_['openInApp']); ?>" class="openInApp button primary">Open in the Android app</a>
<?php endif; ?>
<input type="hidden" id="sharingUserId" value="<?php p($_['owner']) ?>">
<input type="hidden" id="filesApp" name="filesApp" value="1">
<input type="hidden" id="isPublic" name="isPublic" value="1">