diff --git a/src/view/Office.vue b/src/view/Office.vue
index a097a2f4dc..176cc36b05 100644
--- a/src/view/Office.vue
+++ b/src/view/Office.vue
@@ -25,7 +25,7 @@
-
+
@@ -39,6 +39,21 @@
+
+ {{ errorMessage }}
+
+ {{ t('richdocuments', 'Please check the Collabora Online server log for more details and make sure that Nextcloud can be reached from there.') }}
+
+
+ {{ t('richdocuments', 'Socket connection closed unexpectedly. The reverse proxy might be misconfigured, please contact the administrator.') }}
+
+ {{ t('richdocuments', 'More information can be found in the reverse proxy documentation') }}
+
+
+
{{ t('richdocuments', 'Close') }}
@@ -105,6 +120,7 @@ import pickLink from '../mixins/pickLink.js'
import saveAs from '../mixins/saveAs.js'
import uiMention from '../mixins/uiMention.js'
import version from '../mixins/version.js'
+import { getCurrentUser } from '@nextcloud/auth'
const FRAME_DOCUMENT = 'FRAME_DOCUMENT'
@@ -154,6 +170,8 @@ export default {
loading: LOADING_STATE.LOADING,
loadingTimeout: null,
error: null,
+ errorType: null,
+ loadingMsg: null,
views: [],
showLinkPicker: false,
@@ -187,6 +205,13 @@ export default {
return this.error
}
},
+ loadingMessage() {
+ if (this.loadingMsg) {
+ return this.loadingMsg
+ }
+
+ return t('richdocuments', 'Loading {filename} …', { filename: basename(this.filename) }, 1, { escape: false })
+ },
debug() {
return !!window.TESTING
},
@@ -196,6 +221,12 @@ export default {
shareToken() {
return document.getElementById('sharingToken')?.value
},
+ showAdminStorageFailure() {
+ return getCurrentUser()?.isAdmin && this.errorType === 'websocketloadfailed'
+ },
+ showAdminWebsocketFailure() {
+ return getCurrentUser()?.isAdmin && this.errorType === 'websocketconnectionfailed'
+ },
},
async mounted() {
this.postMessage = new PostMessageService({
@@ -322,8 +353,14 @@ export default {
if (args.success) {
this.documentReady()
} else {
- this.error = args.errorMsg
- this.loading = LOADING_STATE.FAILED
+ if (args.errorType === 'clusterscaling') {
+ this.loadingMsg = t('richdocuments', 'Cluster is scaling …')
+ } else {
+ this.error = args.errorMsg
+ this.errorType = args.errorType
+ this.loading = LOADING_STATE.FAILED
+ clearTimeout(this.loadingTimeout)
+ }
}
break
case 'UI_Close':