Просмотр исходного кода

fix: e2ee password confirm inconsistent

fixes https://github.com/logseq/db-test/issues/681
Tienson Qin 3 месяцев назад
Родитель
Сommit
f927ae8b72

+ 2 - 1
deps/shui/src/logseq/shui/form/password.cljs

@@ -13,7 +13,8 @@
      (form-core/input
       (merge
        option
-       {:type (if visible? "text" "password")}))
+       {:type (or (:type option)
+                  (if visible? "text" "password"))}))
      (when-not (string/blank? (:value option))
        (base-core/button
         {:variant :ghost

+ 2 - 3
src/main/frontend/components/e2ee.cljs

@@ -47,9 +47,8 @@
                       (set-matched! (= password-confirm password))))})
 
        [:div.flex.flex-col.gap-2
-        (shui/input
-         {:type "password-confirm"
-          :placeholder "Enter password again"
+        (shui/toggle-password
+         {:placeholder "Enter password again"
           :value password-confirm
           :on-change (fn [e] (set-password-confirm! (-> e .-target .-value)))
           :on-blur (fn [] (set-matched! (= password-confirm password)))})