mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #33035 from nextcloud/backport/31345/stable23
This commit is contained in:
commit
2397ce22c4
4 changed files with 14 additions and 10 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -54,7 +54,6 @@
|
|||
<Actions
|
||||
class="email__actions"
|
||||
:aria-label="t('settings', 'Email options')"
|
||||
:disabled="deleteDisabled"
|
||||
:force-menu="true">
|
||||
<ActionButton
|
||||
:aria-label="deleteEmailLabel"
|
||||
|
|
|
|||
|
|
@ -48,8 +48,9 @@
|
|||
|
||||
<template v-if="additionalEmails.length">
|
||||
<em class="additional-emails-label">{{ t('settings', 'Additional emails') }}</em>
|
||||
<!-- TODO use unique key for additional email when uniqueness can be guaranteed, see https://github.com/nextcloud/server/issues/26866 -->
|
||||
<Email v-for="(additionalEmail, index) in additionalEmails"
|
||||
:key="index"
|
||||
:key="additionalEmail.key"
|
||||
:index="index"
|
||||
:scope.sync="additionalEmail.scope"
|
||||
:email.sync="additionalEmail.value"
|
||||
|
|
@ -87,7 +88,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
accountProperty: ACCOUNT_PROPERTY_READABLE_ENUM.EMAIL,
|
||||
additionalEmails,
|
||||
additionalEmails: additionalEmails.map(properties => ({ ...properties, key: this.generateUniqueKey() })),
|
||||
displayNameChangeSupported,
|
||||
primaryEmail,
|
||||
savePrimaryEmailScope,
|
||||
|
|
@ -121,7 +122,7 @@ export default {
|
|||
methods: {
|
||||
onAddAdditionalEmail() {
|
||||
if (this.isValidSection) {
|
||||
this.additionalEmails.push({ value: '', scope: DEFAULT_ADDITIONAL_EMAIL_SCOPE })
|
||||
this.additionalEmails.push({ value: '', scope: DEFAULT_ADDITIONAL_EMAIL_SCOPE, key: this.generateUniqueKey() })
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -186,6 +187,10 @@ export default {
|
|||
this.logger.error(errorMessage, error)
|
||||
}
|
||||
},
|
||||
|
||||
generateUniqueKey() {
|
||||
return Math.random().toString(36).substring(2)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue