WIP: Open in app

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-06-27 19:49:58 +02:00
parent 5312a07f55
commit 86e3a31bee
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
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([
IRequest::USER_AGENT_CLIENT_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">