♻️ Refactor frontend code for adapt to new banners.

This commit is contained in:
Andrey Antukh 2020-05-26 13:56:32 +02:00
parent b331489741
commit a27828ed79
25 changed files with 387 additions and 369 deletions

View file

@ -9,7 +9,7 @@ We received a request to change your current email to {{ pendingEmail }}.
Click to the link below to confirm the change:
{{ publicUrl }}/#/auth/verify-token?token={{token}}
{{ publicUri }}/#/auth/verify-token?token={{token}}
If you received this email by mistake, please consider changing your password
for security reasons.

View file

@ -8,7 +8,7 @@ Hello {{name}}!
We received a request to reset your password. Click the link below to choose a
new one:
{{ publicUrl }}/#/auth/recovery?token={{token}}
{{ publicUri }}/#/auth/recovery?token={{token}}
If you received this email by mistake, you can safely ignore it. Your password
won't be changed.

View file

@ -8,7 +8,7 @@ Hello {{name}}!
Thanks for signing up for your UXBOX account! Please verify your email using the
link below adn get started building mockups and prototypes today!
{{ publicUrl }}/#/auth/verify-token?token={{token}}
{{ publicUri }}/#/auth/verify-token?token={{token}}
Enjoy!
The UXBOX team.

View file

@ -22,9 +22,11 @@
;; --- Defaults
(def default-context
(defn default-context
[]
{:static media/resolve-asset
:comment (constantly nil)})
:comment (constantly nil)
:public-uri (:public-uri cfg/config)})
;; --- Public API

View file

@ -220,7 +220,7 @@
(let [owner-id (:id owner)
id (mk-uuid "file" "draft" owner-id index)
name (str "file" index)
project-id (:default-project owner)]
project-id (:default-project-id owner)]
(log/info "create draft file" id)
(db/insert! conn :file
{:id id

View file

@ -156,6 +156,9 @@
(sm/defmutation ::login
[{:keys [email password scope] :as params}]
(letfn [(check-password [profile password]
(when (= (:password profile) "!")
(ex/raise :type :validation
:code ::account-without-password))
(let [result (sodi.pwhash/verify password (:password profile))]
(:valid result)))

View file

@ -95,7 +95,10 @@
(when-let [spec (s/get-spec id)]
(s/assert spec context))
(let [context (merge extra-context context)
(let [context (merge (if (fn? extra-context)
(extra-context)
extra-context)
context)
email (impl-build-email id context)]
(when-not email
(ex/raise :type :internal