Skip to content

Commit

Permalink
fix: Skip more collabora specific logic if no capabilities are there
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Nov 29, 2024
1 parent aad124c commit ef1ab86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/Service/ConnectivityService.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public function hasCapabilities() : bool {
}

public function testCapabilities(OutputInterface $output): void {
if (!$this->hasCapabilities()) {
return;
}
$this->capabilitiesService->resetCache();
$this->capabilitiesService->fetch();
$output->writeln('<info>✓ Fetched /hosting/capabilities endpoint</info>');
Expand Down
7 changes: 5 additions & 2 deletions src/view/Office.vue
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,16 @@ export default {
},
computed: {
showIframe() {
return this.loading >= LOADING_STATE.FRAME_READY || this.debug
return this.loading >= LOADING_STATE.FRAME_READY || this.debug || this.isPlainWopi
},
iframeTitle() {
return loadState('richdocuments', 'productName', 'Nextcloud Office')
},
isPlainWopi() {
return getCapabilities().collabora.length === 0
},
showLoadingIndicator() {
return this.loading < LOADING_STATE.FRAME_READY
return this.loading < LOADING_STATE.FRAME_READY && !this.isPlainWopi
},
errorMessage() {
switch (parseInt(this.error)) {
Expand Down

0 comments on commit ef1ab86

Please sign in to comment.