Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #1237 from nextcloud/enh/timeout-config
Make frame loading timeout configurable
  • Loading branch information
rullzer committed Nov 9, 2020
2 parents 80e9d27 + 1b9cc21 commit ef81027
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/AppConfig.php
Expand Up @@ -18,6 +18,7 @@ class AppConfig {

private $defaults = [
'wopi_url' => '',
'timeout' => 15,
'watermark_text' => '{userId}',
'watermark_allGroupsList' => [],
'watermark_allTagsList' => [],
Expand Down
2 changes: 2 additions & 0 deletions lib/Capabilities.php
Expand Up @@ -104,6 +104,8 @@ public function getCapabilities() {
'edit_groups' => $this->config->getAppValue('edit_groups'),
'use_groups' => $this->config->getAppValue('use_groups'),
'doc_format' => $this->config->getAppValue('doc_format'),
'timeout' => $this->config->getAppValue('timeout'),

]
],
];
Expand Down
2 changes: 1 addition & 1 deletion src/files.js
Expand Up @@ -137,7 +137,7 @@ const odfViewer = {
odfViewer.onClose()
OC.Notification.showTemporary(t('richdocuments', 'Failed to load {productName} - please try again later', { productName: OC.getCapabilities().richdocuments.productName || 'Collabora Online' }))
}
}, 15000)
}, (OC.getCapabilities().richdocuments.config.timeout * 1000 || 15000))
$iframe.src = documentUrl

$('body').css('overscroll-behavior-y', 'none')
Expand Down

0 comments on commit ef81027

Please sign in to comment.