WIP: Open in app
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
5312a07f55
commit
86e3a31bee
|
@ -161,6 +161,12 @@ thead {
|
|||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.openInApp {
|
||||
margin: 10px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.disclaimer,
|
||||
.note {
|
||||
margin: 0 auto 30px;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue