mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 16:36:27 +00:00
Feature/Setups of Onboarding Process (#4580)
UX enhancement: onboarding setup graphs Co-authored-by: llcc <lzhes43@gmail.com> Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
This commit is contained in:
@@ -7,24 +7,7 @@
|
||||
[frontend.state :as state]
|
||||
[frontend.util :as util]
|
||||
[lambdaisland.glogi :as log]
|
||||
[promesa.core :as p])
|
||||
(:import [goog.format EmailAddress]))
|
||||
|
||||
(defn email? [v]
|
||||
(and v
|
||||
(.isValid (EmailAddress. v))))
|
||||
|
||||
(defn set-email!
|
||||
[email]
|
||||
(when (email? email)
|
||||
(util/post (str config/api "email")
|
||||
{:email email}
|
||||
(fn [_result]
|
||||
(db/transact! [{:me/email email}])
|
||||
(swap! state/state assoc-in [:me :email] email))
|
||||
(fn [_error]
|
||||
(notification/show! "Email already exists!"
|
||||
:error)))))
|
||||
[promesa.core :as p]))
|
||||
|
||||
(defn set-cors!
|
||||
[cors-proxy]
|
||||
|
||||
Reference in New Issue
Block a user