diff --git a/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoForm.tsx b/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoForm.tsx index 9e5a1ecdd3d..dae45f6b0e8 100644 --- a/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoForm.tsx +++ b/webapp/packages/core-blocks/src/ObjectPropertyInfo/ObjectPropertyInfoForm/ObjectPropertyInfoForm.tsx @@ -1,6 +1,6 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2025 DBeaver Corp and others + * Copyright (C) 2020-2026 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. @@ -20,6 +20,8 @@ import { useS } from '../../useS.js'; import { RenderField } from './RenderField.js'; import { getObjectPropertyDefaults } from '../getObjectPropertyDefaults.js'; +type AutocompletePasswordType = 'current-password' | 'new-password' | 'off' | 'on'; + export interface ObjectPropertyFormProps extends ILayoutSizeProps { properties: ReadonlyArray; state?: Record; @@ -36,25 +38,21 @@ export interface ObjectPropertyFormProps extends ILayoutSizeProps { hideEmptyPlaceholder?: boolean; emptyPlaceholder?: string; canShowPassword?: boolean; - disableAutoCompleteForPasswords?: boolean; + autocompletePasswordType?: AutocompletePasswordType; isSaved?: (property: ObjectPropertyInfo) => boolean; getLayoutSize?: (property: ObjectPropertyInfo) => ILayoutSizeProps; onFocus?: (name: string) => void; } -function getAutocompleteParam(property: ObjectPropertyInfo, prefix: string, disabledForPasswords: boolean): string { +function getAutocompleteParam(property: ObjectPropertyInfo, prefix: string, autocompletePasswordType: AutocompletePasswordType): string { const isPasswordField = property.features.includes('password'); - if (isPasswordField && disabledForPasswords) { - return 'off'; - } - if (isPasswordField) { - return prefix ? prefix + ' current-password' : 'current-password'; + return prefix ? `${prefix} ${autocompletePasswordType}` : autocompletePasswordType; } if (property.features.includes('name')) { - return prefix ? prefix + ' username' : 'username'; + return prefix ? `${prefix} username` : 'username'; } return 'on'; @@ -66,7 +64,6 @@ export const ObjectPropertyInfoForm = observer(function context, defaultState, category, - disableAutoCompleteForPasswords = false, editable = true, className, autocompleteSectionName = '', @@ -77,6 +74,7 @@ export const ObjectPropertyInfoForm = observer(function hideEmptyPlaceholder, emptyPlaceholder = 'core_blocks_object_property_info_form_empty_placeholder', canShowPassword, + autocompletePasswordType = 'on', isSaved, getLayoutSize, onFocus, @@ -116,7 +114,7 @@ export const ObjectPropertyInfoForm = observer(function context={context} defaultState={defaults} editable={editable} - autocomplete={getAutocompleteParam(property, autocompleteSectionName, disableAutoCompleteForPasswords)} + autocomplete={getAutocompleteParam(property, autocompleteSectionName, autocompletePasswordType)} disabled={disabled} readOnly={readOnly} autoHide={autoHide} diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionAuthModelCredentials/ConnectionAuthModelCredentialsForm.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionAuthModelCredentials/ConnectionAuthModelCredentialsForm.tsx index d1456a9b0b3..d512a14ffeb 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionAuthModelCredentials/ConnectionAuthModelCredentialsForm.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/ConnectionAuthModelCredentials/ConnectionAuthModelCredentialsForm.tsx @@ -1,6 +1,6 @@ /* * CloudBeaver - Cloud Database Manager - * Copyright (C) 2020-2025 DBeaver Corp and others + * Copyright (C) 2020-2026 DBeaver Corp and others * * Licensed under the Apache License, Version 2.0. * you may not use this file except in compliance with the License. @@ -47,6 +47,7 @@ export const ConnectionAuthModelCredentialsForm = observer(function Conne disabled={disabled} readOnly={readonly} getLayoutSize={getLayoutSize} + autocompletePasswordType="new-password" showRememberTip hideEmptyPlaceholder /> diff --git a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx index bfa5f6e866c..fa0ffa09d1c 100644 --- a/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx +++ b/webapp/packages/plugin-connections/src/ConnectionForm/SSH/SSH.tsx @@ -128,7 +128,7 @@ export const SSH: TabContainerPanelComponent = observer(function SSH({ fo