Skip to content

Commit 8db89d2

Browse files
joshtrichardsbackportbot[bot]
authored andcommitted
fix(office): show built-in CODE startup message while waiting for proxy readiness
Signed-off-by: Josh <josh.t.richards@gmail.com>
1 parent a66810b commit 8db89d2

1 file changed

Lines changed: 20 additions & 11 deletions

File tree

src/view/Office.vue

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,12 @@ import {
100100
} from '../helpers/url.js'
101101
import PostMessageService from '../services/postMessage.tsx'
102102
import FilesAppIntegration from './FilesAppIntegration.js'
103-
import { LOADING_ERROR, checkCollaboraConfiguration, checkProxyStatus } from '../services/collabora.js'
103+
import {
104+
LOADING_ERROR,
105+
checkCollaboraConfiguration,
106+
checkProxyStatus,
107+
isBuiltinCodeServerUsed,
108+
} from '../services/collabora.js'
104109
import { enableScrollLock, disableScrollLock } from '../helpers/mobileFixer.js'
105110
import axios from '@nextcloud/axios'
106111
import {
@@ -277,7 +282,11 @@ export default {
277282
})
278283
try {
279284
await checkCollaboraConfiguration()
285+
if (isBuiltinCodeServerUsed()) {
286+
this.loadingMsg = t('richdocuments', 'Starting the built-in CODE server …')
287+
}
280288
await checkProxyStatus()
289+
this.loadingMsg = null
281290
} catch (e) {
282291
this.error = e.message
283292
this.loading = LOADING_STATE.FAILED
@@ -408,16 +417,16 @@ export default {
408417
this.documentReady()
409418
410419
if (loadState('richdocuments', 'open_local_editor', true) && !this.isEmbedded) {
411-
this.sendPostMessage('Insert_Button', {
412-
id: 'Open_Local_Editor',
413-
imgurl: window.location.protocol + '//' + getNextcloudUrl() + imagePath('richdocuments', 'launch.svg'),
414-
mobile: false,
415-
label: t('richdocuments', 'Open in local editor'),
416-
hint: t('richdocuments', 'Open in local editor'),
417-
insertBefore: 'print',
418-
accessKey: '2',
419-
})
420-
}
420+
this.sendPostMessage('Insert_Button', {
421+
id: 'Open_Local_Editor',
422+
imgurl: window.location.protocol + '//' + getNextcloudUrl() + imagePath('richdocuments', 'launch.svg'),
423+
mobile: false,
424+
label: t('richdocuments', 'Open in local editor'),
425+
hint: t('richdocuments', 'Open in local editor'),
426+
insertBefore: 'print',
427+
accessKey: '2',
428+
})
429+
}
421430
422431
if (this.isEmbedded && this.hasWidgetEditingEnabled) {
423432
this.sendPostMessage('Hide_Sidebar')

0 commit comments

Comments
 (0)