This is an automated email from the ASF dual-hosted git repository.
shuai pushed a commit to branch feat/1.2.1/ui
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git
The following commit(s) were added to refs/heads/feat/1.2.1/ui by this push:
new 498daa36 fix: login default value
498daa36 is described below
commit 498daa36e323a872b28bda3046dda45f443af2f6
Author: shuai <[email protected]>
AuthorDate: Wed Nov 15 14:14:11 2023 +0800
fix: login default value
---
ui/src/pages/Admin/Login/index.tsx | 1 +
ui/src/pages/Questions/Ask/index.tsx | 3 +++
2 files changed, 4 insertions(+)
diff --git a/ui/src/pages/Admin/Login/index.tsx
b/ui/src/pages/Admin/Login/index.tsx
index f2579475..7355a23e 100644
--- a/ui/src/pages/Admin/Login/index.tsx
+++ b/ui/src/pages/Admin/Login/index.tsx
@@ -150,6 +150,7 @@ const Index: FC = () => {
setting.allow_email_domains.join('\n');
}
formMeta.login_required.value = setting.login_required;
+ formMeta.allow_password_login.value = setting.allow_password_login;
setFormData({ ...formMeta });
}
});
diff --git a/ui/src/pages/Questions/Ask/index.tsx
b/ui/src/pages/Questions/Ask/index.tsx
index 949b1d67..089d6f67 100644
--- a/ui/src/pages/Questions/Ask/index.tsx
+++ b/ui/src/pages/Questions/Ask/index.tsx
@@ -236,6 +236,9 @@ const Ask = () => {
if (e.currentTarget.value.length >= 10) {
querySimilarQuestions(e.currentTarget.value);
}
+ if (e.currentTarget.value.length === 0) {
+ setSimilarQuestions([]);
+ }
};
const handleContentChange = (value: string) => {
setFormData({