Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

refactor(web): migrate console reset password inputs (#41632)

yyh415e999cef39
diff --git a/oxlint-suppressions.json b/oxlint-suppressions.json
index cd13592acdf..ca7f9a9ba3e 100644
--- a/oxlint-suppressions.json
+++ b/oxlint-suppressions.json
@@ -4931,21 +4931,11 @@
"count": 7
}
},
- "web/app/reset-password/check-code/page.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
"web/app/reset-password/layout.tsx": {
"typescript/no-explicit-any": {
"count": 1
}
},
- "web/app/reset-password/page.tsx": {
- "no-restricted-imports": {
- "count": 1
- }
- },
"web/app/signin/layout.tsx": {
"typescript/no-explicit-any": {
"count": 1
diff --git a/web/app/reset-password/check-code/page.tsx b/web/app/reset-password/check-code/page.tsx
index d7149f3f612..1b0e051ab7d 100644
--- a/web/app/reset-password/check-code/page.tsx
+++ b/web/app/reset-password/check-code/page.tsx
@@ -1,10 +1,10 @@
'use client'
import { Button } from '@langgenius/dify-ui/button'
+import { Input } from '@langgenius/dify-ui/input'
import { toast } from '@langgenius/dify-ui/toast'
import { RiArrowLeftLine, RiMailSendFill } from '@remixicon/react'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
-import Input from '@/app/components/base/input'
import Countdown from '@/app/components/signin/countdown'
import { useLocale } from '@/context/i18n'
import useDocumentTitle from '@/hooks/use-document-title'
@@ -83,8 +83,13 @@ export default function CheckCode() {
{t(($) => $['checkCode.verificationCode'], { ns: 'login' })}
</label>
<Input
+ id="code"
+ name="code"
+ inputMode="numeric"
+ autoComplete="one-time-code"
+ spellCheck={false}
value={code}
- onChange={(e) => setVerifyCode(e.target.value)}
+ onValueChange={setVerifyCode}
maxLength={6}
className="mt-1"
placeholder={
diff --git a/web/app/reset-password/page.tsx b/web/app/reset-password/page.tsx
index f1db96539e9..3c1b6e5f26b 100644
--- a/web/app/reset-password/page.tsx
+++ b/web/app/reset-password/page.tsx
@@ -1,11 +1,11 @@
'use client'
import { Button } from '@langgenius/dify-ui/button'
+import { Input } from '@langgenius/dify-ui/input'
import { toast } from '@langgenius/dify-ui/toast'
import { RiArrowLeftLine, RiLockPasswordLine } from '@remixicon/react'
import { noop } from 'es-toolkit/function'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
-import Input from '@/app/components/base/input'
import { emailRegex } from '@/config'
import { useLocale } from '@/context/i18n'
import useDocumentTitle from '@/hooks/use-document-title'
@@ -75,11 +75,14 @@ export default function CheckCode() {
<div className="mt-1">
<Input
id="email"
+ name="email"
type="email"
+ autoComplete="email"
+ spellCheck={false}
disabled={loading}
value={email}
placeholder={t(($) => $.emailPlaceholder, { ns: 'login' }) as string}
- onChange={(e) => setEmail(e.target.value)}
+ onValueChange={setEmail}
/>
</div>
<div className="mt-3">