Skip to content

Commit

Permalink
🐛 fix: Automatically fill in the wrong password (lobehub#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
mushan0x0 committed Jan 24, 2024
1 parent f076102 commit 0159a1a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/settings/common/Common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,12 @@ const Common = memo<SettingsCommonProps>(({ showAccessCodeConfig }) => {
const system: SettingItemGroup = {
children: [
{
children: <Input.Password placeholder={t('settingSystem.accessCode.placeholder')} />,
children: (
<Input.Password
autoComplete={'new-password'}
placeholder={t('settingSystem.accessCode.placeholder')}
/>
),
desc: t('settingSystem.accessCode.desc'),
hidden: !showAccessCodeConfig,
label: t('settingSystem.accessCode.title'),
Expand Down
1 change: 1 addition & 0 deletions src/app/settings/llm/LLM/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const LLM = memo(() => {
{
children: (
<Input.Password
autoComplete={'new-password'}
placeholder={
useAzure ? t('llm.AzureOpenAI.token.placeholder') : t('llm.OpenAI.token.placeholder')
}
Expand Down
1 change: 1 addition & 0 deletions src/features/Conversation/Error/ApiKeyForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const APIKeyForm = memo<{ id: string }>(({ id }) => {
title={t('unlock.apikey.title')}
>
<Input.Password
autoComplete={'new-password'}
onChange={(e) => {
setConfig({ OPENAI_API_KEY: e.target.value });
}}
Expand Down
1 change: 1 addition & 0 deletions src/features/Conversation/Error/InvalidAccess.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const InvalidAccess: RenderErrorMessage['Render'] = memo(({ id }) => {
title={t('unlock.password.title')}
>
<Input.Password
autoComplete={'new-password'}
onChange={(e) => {
setSettings({ password: e.target.value });
}}
Expand Down
1 change: 1 addition & 0 deletions src/features/PluginSettings/PluginSettingRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const PluginSettingRender = memo<PluginSettingsProps>(
return (
<Input.Password
{...props}
autoComplete={'new-password'}
defaultValue={defaultValue}
onChange={(v) => {
onChange(v.target.value);
Expand Down

0 comments on commit 0159a1a

Please sign in to comment.