aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/src
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2022-03-18 17:40:36 +0100
committernextcloud-command <nextcloud-command@users.noreply.github.com>2022-03-18 16:52:30 +0000
commit9c07e47c78781a66587313e0c70d5c37cfe81703 (patch)
treed60ee14bb8aa80284bf45d3b42a69d92f5ad8c0d /apps/dav/src
parentb0fbcccfe66474d79586001ce9509d346919ae74 (diff)
downloadnextcloud-server-9c07e47c78781a66587313e0c70d5c37cfe81703.tar.gz
nextcloud-server-9c07e47c78781a66587313e0c70d5c37cfe81703.zip
Fix link to calendar user docs in groupware settings
Closes #31617 Signed-off-by: Thomas Citharel <tcit@tcit.fr> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/dav/src')
-rw-r--r--apps/dav/src/views/CalDavSettings.spec.js5
-rw-r--r--apps/dav/src/views/CalDavSettings.vue5
-rw-r--r--apps/dav/src/views/__snapshots__/CalDavSettings.spec.js.snap2
3 files changed, 10 insertions, 2 deletions
diff --git a/apps/dav/src/views/CalDavSettings.spec.js b/apps/dav/src/views/CalDavSettings.spec.js
index 0dc4c44537a..951a2802182 100644
--- a/apps/dav/src/views/CalDavSettings.spec.js
+++ b/apps/dav/src/views/CalDavSettings.spec.js
@@ -13,6 +13,11 @@ jest.mock('@nextcloud/router', () => {
},
}
})
+jest.mock('@nextcloud/initial-state', () => {
+ return {
+ loadState: jest.fn(() => 'https://docs.nextcloud.com/server/23/go.php?to=user-sync-calendars'),
+ }
+})
describe('CalDavSettings', () => {
const originalOC = global.OC
diff --git a/apps/dav/src/views/CalDavSettings.vue b/apps/dav/src/views/CalDavSettings.vue
index 06c5e9cf8fc..10af947bd3d 100644
--- a/apps/dav/src/views/CalDavSettings.vue
+++ b/apps/dav/src/views/CalDavSettings.vue
@@ -73,6 +73,9 @@
<script>
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
+import { loadState } from '@nextcloud/initial-state'
+
+const userSyncCalendarsDocUrl = loadState('dav', 'userSyncCalendarsDocUrl', '#')
export default {
name: 'CalDavSettings',
@@ -84,7 +87,7 @@ export default {
)
return translated
.replace('{calendarappstoreopen}', '<a target="_blank" href="../apps/office/calendar">')
- .replace('{calendardocopen}', '<a target="_blank" :href="userSyncCalendarsUrl" rel="noreferrer noopener">')
+ .replace('{calendardocopen}', `<a target="_blank" href="${userSyncCalendarsDocUrl}" rel="noreferrer noopener">`)
.replace(/\{linkclose\}/g, '</a>')
},
sendInvitationsHelpText() {
diff --git a/apps/dav/src/views/__snapshots__/CalDavSettings.spec.js.snap b/apps/dav/src/views/__snapshots__/CalDavSettings.spec.js.snap
index fca9ceae155..469cd2f07eb 100644
--- a/apps/dav/src/views/__snapshots__/CalDavSettings.spec.js.snap
+++ b/apps/dav/src/views/__snapshots__/CalDavSettings.spec.js.snap
@@ -21,7 +21,7 @@ exports[`CalDavSettings interactions 1`] = `
</a>
, or
<a
- :href="userSyncCalendarsUrl"
+ href="https://docs.nextcloud.com/server/23/go.php?to=user-sync-calendars"
rel="noreferrer noopener"
target="_blank"
>