From 6b899be202783ae5d9ebf6ce4913bfbac4019a0c Mon Sep 17 00:00:00 2001
From: kolaente
Date: Sun, 12 Dec 2021 18:39:17 +0100
Subject: [PATCH] chore: clarify token is required for non-local users
---
src/i18n/lang/en.json | 4 +++-
src/views/user/settings/Caldav.vue | 10 +++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/i18n/lang/en.json b/src/i18n/lang/en.json
index b272aeaf..82ebec7b 100644
--- a/src/i18n/lang/en.json
+++ b/src/i18n/lang/en.json
@@ -110,7 +110,9 @@
"tokensHowTo": "You can use a caldav token to use instead of a password to log in the above endpoint.",
"createToken": "Create a token",
"tokenCreated": "Here is your token: {token}",
- "wontSeeItAgain": "Write it down, you won't be able to see it again."
+ "wontSeeItAgain": "Write it down, you won't be able to see it again.",
+ "mustUseToken": "You need to create a caldav token if you want to use caldav with a third party client. Use the token as the password.",
+ "usernameIs": "Your username is: {0}"
},
"avatar": {
"title": "Avatar",
diff --git a/src/views/user/settings/Caldav.vue b/src/views/user/settings/Caldav.vue
index 23a74cc3..82a5d479 100644
--- a/src/views/user/settings/Caldav.vue
+++ b/src/views/user/settings/Caldav.vue
@@ -22,7 +22,13 @@
- {{ $t('user.settings.caldav.tokensHowTo') }}
+ {{ isLocalUser ? $t('user.settings.caldav.tokensHowTo') : $t('user.settings.caldav.mustUseToken') }}
+
+
+
+ {{ username }}
+
+
@@ -78,6 +84,8 @@ useTitle(() => `${t('user.settings.caldav.title')} - ${t('user.settings.title')}
const caldavUrl = computed(() => `${store.getters['config/apiBase']}/dav/principals/${store.state.auth.info.username}/`)
const caldavEnabled = computed(() => store.state.config.caldavEnabled)
+const isLocalUser = computed(() => store.state.auth.info?.isLocalUser)
+const username = computed(() => store.state.auth.info?.username)
const service = new CaldavTokenService()
const tokens = ref([])