From f7d0cab72b59e70a290b8881488043713d046108 Mon Sep 17 00:00:00 2001 From: Muhammet Kara Date: Wed, 13 May 2020 21:50:27 +0300 Subject: Towards resolving #954: Check for obvious sillies Signed-off-by: Muhammet Kara --- src/components/AdminSettings.vue | 42 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/components/AdminSettings.vue b/src/components/AdminSettings.vue index ef612e75..0ce7a9ca 100644 --- a/src/components/AdminSettings.vue +++ b/src/components/AdminSettings.vue @@ -71,11 +71,29 @@
+ :disabled="updating || hasHostErrors" @input="fetchDemoServers">

{{ t('richdocuments', 'You can use a demo server provided by Collabora and other service providers for giving Collabora Online a try.') }}

+
+

{{ t('richdocuments', 'Your NextCloud setup is not capable of connecting to the demo servers because;') }}

+
    +
  • + {{ t('richdocuments', 'it is a local setup (localhost)') }} +
  • +
  • + {{ t('richdocuments', 'it uses an insecure protocol (http)') }} +
  • +
  • + {{ t('richdocuments', 'it is unreachable from the Internet (possibly because of a firewall, or lack of port forwarding)') }} +
  • +

+

+ {{ t('richdocuments', 'For use cases like this, we offer instructions for a') }} {{ t('richdocuments', 'Quick tryout with Nextcloud docker.') }} +

+

{{ t('richdocuments', 'Loading available demo servers …') }} @@ -232,6 +250,7 @@ export default { return { serverMode: '', 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, approvedDemoModal: false, updating: false, @@ -271,6 +290,9 @@ export default { }, isOoxml() { return this.settings.doc_format === 'ooxml' + }, + hasHostErrors() { + return this.hostErrors.some(x => x) } }, beforeMount() { @@ -456,6 +478,24 @@ export default { } } + .option-inline-emphasized { + margin-left: 25px; + &:not(.multiselect) { + margin-top: 10px; + font-style: italic; + } + + ul { + margin-bottom: 15px; + } + + li { + list-style: disc; + padding: 3px; + margin-left: 20px; + } + } + .modal__content { margin: 20px; overflow: scroll; -- cgit v1.2.3