Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-05-22 16:52:17 +0300
committerGitHub <noreply@github.com>2020-05-22 16:52:17 +0300
commitc24bc4dc2567564682bf798b12cff1a5494e211b (patch)
treeb20ec9baf6ff9693a58a4987a436c51eab73fd4c /src
parent52f1ae35eae954cce4efe9650885d09c45dd8e83 (diff)
parentbe7cb4c48493e5e8747f4243c567ff78d478f1e4 (diff)
Merge pull request #978 from mrkara/master
Diffstat (limited to 'src')
-rw-r--r--src/components/AdminSettings.vue21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/components/AdminSettings.vue b/src/components/AdminSettings.vue
index c8f74f27..bac31560 100644
--- a/src/components/AdminSettings.vue
+++ b/src/components/AdminSettings.vue
@@ -68,6 +68,18 @@
</div>
</div>
<div>
+ <input id="builtinserver" v-model="serverMode" type="radio"
+ name="serverMode" value="builtin" class="radio"
+ :disabled="updating || !CODEInstalled" @click="setBuiltinServer">
+ <label for="builtinserver">{{ t('richdocuments', 'Use the built-in testing server') }}</label><br>
+ <p v-if="CODEInstalled" class="option-inline">
+ <em>{{ t('richdocuments', 'This installation has a built-in Collabora Online with limited capabilities for testing') }}</em>
+ </p>
+ <p v-else class="option-inline">
+ <em>{{ t('richdocuments', 'This installation does not have a built-in Collabora Online test server') }}</em>
+ </p>
+ </div>
+ <div>
<input id="demoserver" v-model="serverMode" type="radio"
name="serverMode" value="demo" class="radio"
:disabled="updating || hasHostErrors" @input="fetchDemoServers">
@@ -251,6 +263,7 @@ export default {
serverError: Object.values(OC.getCapabilities()['richdocuments'].collabora).length > 0 ? SERVER_STATE_OK : SERVER_STATE_CONNECTION_ERROR,
hostErrors: [window.location.host === 'localhost' || window.location.host === '127.0.0.1', window.location.protocol !== 'https:', false],
demoServers: null,
+ CODEInstalled: 'richdocumentscode' in OC.appswebroots,
approvedDemoModal: false,
updating: false,
groups: [],
@@ -415,12 +428,15 @@ export default {
},
checkIfDemoServerIsActive() {
this.settings.demoUrl = this.demoServers ? this.demoServers.find((server) => server.demo_url === this.settings.wopi_url) : null
+ this.settings.CODEUrl = this.CODEInstalled ? window.location.protocol + '//' + window.location.host + OC.filePath('richdocumentscode', '', '') + 'proxy.php?req=' : null
if (this.settings.wopi_url && this.settings.wopi_url !== '') {
this.serverMode = 'custom'
}
if (this.settings.demoUrl) {
this.serverMode = 'demo'
this.approvedDemoModal = true
+ } else if (this.settings.CODEUrl && this.settings.CODEUrl === this.settings.wopi_url) {
+ this.serverMode = 'builtin'
}
},
demoServerLabel(server) {
@@ -430,6 +446,11 @@ export default {
this.settings.wopi_url = server.demo_url
this.settings.disable_certificate_verification = false
await this.updateServer()
+ },
+ async setBuiltinServer() {
+ this.settings.wopi_url = this.settings.CODEUrl
+ this.settings.disable_certificate_verification = false
+ await this.updateServer()
}
}
}