diff --git a/changelog/unreleased/enhancement-add-password-policy-compatibility b/changelog/unreleased/enhancement-add-password-policy-compatibility index 015859dd791..92a4a12465b 100644 --- a/changelog/unreleased/enhancement-add-password-policy-compatibility +++ b/changelog/unreleased/enhancement-add-password-policy-compatibility @@ -7,5 +7,6 @@ https://github.com/owncloud/web/pull/9682 https://github.com/owncloud/web/pull/9634 https://github.com/owncloud/web/pull/9686 https://github.com/owncloud/web/pull/9688 +https://github.com/owncloud/web/pull/9735 https://github.com/owncloud/web/issues/9638 https://github.com/owncloud/web/issues/9657 diff --git a/packages/design-system/src/components/OcTextInput/OcTextInput.vue b/packages/design-system/src/components/OcTextInput/OcTextInput.vue index 065c54ef505..7854156616b 100644 --- a/packages/design-system/src/components/OcTextInput/OcTextInput.vue +++ b/packages/design-system/src/components/OcTextInput/OcTextInput.vue @@ -12,6 +12,7 @@ :is="inputComponent" :id="id" v-bind="additionalAttributes" + v-on="additionalListeners" ref="input" :aria-invalid="ariaInvalid" class="oc-text-input oc-input oc-rounded" @@ -261,6 +262,13 @@ export default defineComponent({ messageId() { return `${this.id}-message` }, + additionalListeners() { + if (this.type === 'password') { + return { passwordGenerated: this.onInput } + } + + return {} + }, additionalAttributes() { const additionalAttrs = {} if (!!this.warningMessage || !!this.errorMessage || !!this.descriptionMessage) { diff --git a/packages/design-system/src/components/_OcTextInputPassword/_OcTextInputPassword.vue b/packages/design-system/src/components/_OcTextInputPassword/_OcTextInputPassword.vue index afb63f4d241..20eb65f1271 100644 --- a/packages/design-system/src/components/_OcTextInputPassword/_OcTextInputPassword.vue +++ b/packages/design-system/src/components/_OcTextInputPassword/_OcTextInputPassword.vue @@ -6,7 +6,12 @@ 'oc-text-input-password-wrapper-danger': hasError }" > - + { + unref(passwordInput).focus() } watch(password, (value) => { @@ -155,9 +166,11 @@ export default defineComponent({ }) return { + focus, $gettext, password, showPassword, + passwordInput, copyPasswordIcon, showPasswordPolicyInformation, testedPasswordPolicy,