Merge pull request #23647 from nextcloud/backport/23627/stable19

[stable19] Fix sharing input placeholder for emails
This commit is contained in:
Morris Jobke 2020-10-25 21:59:13 +01:00 committed by GitHub
commit 236ed11b6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 12 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -117,22 +117,16 @@ export default {
},
inputPlaceholder() {
const allowRemoteSharing = this.config.isRemoteShareAllowed
const allowMailSharing = this.config.isMailShareAllowed
if (!this.canReshare) {
return t('files_sharing', 'Resharing is not allowed')
}
if (!allowRemoteSharing && allowMailSharing) {
return t('files_sharing', 'Name or email address …')
}
if (allowRemoteSharing && !allowMailSharing) {
return t('files_sharing', 'Name or federated cloud ID …')
}
if (allowRemoteSharing && allowMailSharing) {
return t('files_sharing', 'Name, federated cloud ID or email address …')
// We can always search with email addresses for users too
if (!allowRemoteSharing) {
return t('files_sharing', 'Name or email …')
}
return t('files_sharing', 'Name …')
return t('files_sharing', 'Name, email, or federated cloud ID …')
},
isValidQuery() {