chore: clarify token is required for non-local users

This commit is contained in:
kolaente 2021-12-12 18:39:17 +01:00
parent 7bdefd9a3e
commit 6b899be202
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 12 additions and 2 deletions

View file

@ -110,7 +110,9 @@
"tokensHowTo": "You can use a caldav token to use instead of a password to log in the above endpoint.", "tokensHowTo": "You can use a caldav token to use instead of a password to log in the above endpoint.",
"createToken": "Create a token", "createToken": "Create a token",
"tokenCreated": "Here is your token: {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": { "avatar": {
"title": "Avatar", "title": "Avatar",

View file

@ -22,7 +22,13 @@
</p> </p>
<p> <p>
{{ $t('user.settings.caldav.tokensHowTo') }} {{ isLocalUser ? $t('user.settings.caldav.tokensHowTo') : $t('user.settings.caldav.mustUseToken') }}
<template v-if="!isLocalUser">
<br/>
<i18n-t keypath="user.settings.caldav.usernameIs">
<strong>{{ username }}</strong>
</i18n-t>
</template>
</p> </p>
<table class="table" v-if="tokens.length > 0"> <table class="table" v-if="tokens.length > 0">
@ -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 caldavUrl = computed(() => `${store.getters['config/apiBase']}/dav/principals/${store.state.auth.info.username}/`)
const caldavEnabled = computed(() => store.state.config.caldavEnabled) 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 service = new CaldavTokenService()
const tokens = ref([]) const tokens = ref([])