mirror of
https://github.com/penpot/penpot.git
synced 2025-07-07 18:17:19 +02:00
💄 Update some namespace abbreviations
This commit is contained in:
parent
1af2ec0b79
commit
336cc98029
27 changed files with 131 additions and 117 deletions
|
@ -70,6 +70,7 @@
|
||||||
(rx/of (msg/dialog
|
(rx/of (msg/dialog
|
||||||
:content (tr "notifications.by-code.upgrade-version")
|
:content (tr "notifications.by-code.upgrade-version")
|
||||||
:controls :inline-actions
|
:controls :inline-actions
|
||||||
|
:notification-type :inline
|
||||||
:type level
|
:type level
|
||||||
:actions [{:label "Refresh" :callback force-reload!}]
|
:actions [{:label "Refresh" :callback force-reload!}]
|
||||||
:tag :notification)))
|
:tag :notification)))
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
(:require
|
(:require
|
||||||
[app.common.exceptions :as ex]
|
[app.common.exceptions :as ex]
|
||||||
[app.common.media :as cm]
|
[app.common.media :as cm]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.util.i18n :refer [tr]]
|
[app.util.i18n :refer [tr]]
|
||||||
[beicon.v2.core :as rx]
|
[beicon.v2.core :as rx]
|
||||||
|
@ -46,13 +46,13 @@
|
||||||
|
|
||||||
(defn notify-start-loading
|
(defn notify-start-loading
|
||||||
[]
|
[]
|
||||||
(st/emit! (dm/show {:content (tr "media.loading")
|
(st/emit! (msg/show {:content (tr "media.loading")
|
||||||
:type :info
|
:type :info
|
||||||
:timeout nil})))
|
:timeout nil})))
|
||||||
|
|
||||||
(defn notify-finished-loading
|
(defn notify-finished-loading
|
||||||
[]
|
[]
|
||||||
(st/emit! dm/hide))
|
(st/emit! msg/hide))
|
||||||
|
|
||||||
(defn process-error
|
(defn process-error
|
||||||
[error]
|
[error]
|
||||||
|
@ -68,4 +68,4 @@
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(tr "errors.unexpected-error"))]
|
(tr "errors.unexpected-error"))]
|
||||||
(rx/of (dm/error msg))))
|
(rx/of (msg/error msg))))
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
(declare show)
|
(declare show)
|
||||||
|
|
||||||
(def default-animation-timeout 600)
|
(def default-animation-timeout 600)
|
||||||
(def default-timeout 5000)
|
(def default-timeout 7000)
|
||||||
|
|
||||||
(def ^:private
|
(def ^:private
|
||||||
schema:message
|
schema:message
|
||||||
|
@ -27,6 +27,8 @@
|
||||||
[::sm/one-of #{:visible :hide}]]
|
[::sm/one-of #{:visible :hide}]]
|
||||||
[:position {:optional true}
|
[:position {:optional true}
|
||||||
[::sm/one-of #{:fixed :floating :inline}]]
|
[::sm/one-of #{:fixed :floating :inline}]]
|
||||||
|
[:notification-type {:optional true}
|
||||||
|
[::sm/one-of #{:inline :context :toast}]]
|
||||||
[:controls {:optional true}
|
[:controls {:optional true}
|
||||||
[::sm/one-of #{:none :close :inline-actions :bottom-actions}]]
|
[::sm/one-of #{:none :close :inline-actions :bottom-actions}]]
|
||||||
[:tag {:optional true}
|
[:tag {:optional true}
|
||||||
|
@ -93,18 +95,18 @@
|
||||||
(rx/of hide))))))
|
(rx/of hide))))))
|
||||||
|
|
||||||
(defn error
|
(defn error
|
||||||
([content] (error content {}))
|
([content]
|
||||||
([content {:keys [timeout] :or {timeout default-timeout}}]
|
|
||||||
(show {:content content
|
(show {:content content
|
||||||
:type :error
|
:type :error
|
||||||
:position :fixed
|
:notification-type :toast
|
||||||
:timeout timeout})))
|
:position :fixed})))
|
||||||
|
|
||||||
(defn info
|
(defn info
|
||||||
([content] (info content {}))
|
([content] (info content {}))
|
||||||
([content {:keys [timeout] :or {timeout default-timeout}}]
|
([content {:keys [timeout] :or {timeout default-timeout}}]
|
||||||
(show {:content content
|
(show {:content content
|
||||||
:type :info
|
:type :info
|
||||||
|
:notification-type :toast
|
||||||
:position :fixed
|
:position :fixed
|
||||||
:timeout timeout})))
|
:timeout timeout})))
|
||||||
|
|
||||||
|
@ -113,6 +115,7 @@
|
||||||
([content {:keys [timeout] :or {timeout default-timeout}}]
|
([content {:keys [timeout] :or {timeout default-timeout}}]
|
||||||
(show {:content content
|
(show {:content content
|
||||||
:type :success
|
:type :success
|
||||||
|
:notification-type :toast
|
||||||
:position :fixed
|
:position :fixed
|
||||||
:timeout timeout})))
|
:timeout timeout})))
|
||||||
|
|
||||||
|
@ -121,6 +124,7 @@
|
||||||
([content {:keys [timeout] :or {timeout default-timeout}}]
|
([content {:keys [timeout] :or {timeout default-timeout}}]
|
||||||
(show {:content content
|
(show {:content content
|
||||||
:type :warning
|
:type :warning
|
||||||
|
:notification-type :toast
|
||||||
:position :fixed
|
:position :fixed
|
||||||
:timeout timeout})))
|
:timeout timeout})))
|
||||||
|
|
||||||
|
@ -142,6 +146,7 @@
|
||||||
{:content content
|
{:content content
|
||||||
:type :info
|
:type :info
|
||||||
:position :floating
|
:position :floating
|
||||||
|
:notification-type :inline
|
||||||
:controls controls
|
:controls controls
|
||||||
:links links
|
:links links
|
||||||
:actions actions
|
:actions actions
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
[app.common.logging :as log]
|
[app.common.logging :as log]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.config :as cf]
|
[app.config :as cf]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.users :as du]
|
[app.main.data.users :as du]
|
||||||
[app.main.repo :as rp]
|
[app.main.repo :as rp]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
|
@ -48,10 +48,10 @@
|
||||||
(cond
|
(cond
|
||||||
(and (= type :restriction)
|
(and (= type :restriction)
|
||||||
(= code :provider-not-configured))
|
(= code :provider-not-configured))
|
||||||
(st/emit! (dm/error (tr "errors.auth-provider-not-configured")))
|
(st/emit! (msg/error (tr "errors.auth-provider-not-configured")))
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(st/emit! (dm/error (tr "errors.generic"))))))))
|
(st/emit! (msg/error (tr "errors.generic"))))))))
|
||||||
|
|
||||||
(defn- login-with-ldap
|
(defn- login-with-ldap
|
||||||
[event params]
|
[event params]
|
||||||
|
@ -67,13 +67,13 @@
|
||||||
(cond
|
(cond
|
||||||
(and (= type :restriction)
|
(and (= type :restriction)
|
||||||
(= code :ldap-not-initialized))
|
(= code :ldap-not-initialized))
|
||||||
(st/emit! (dm/error (tr "errors.ldap-disabled")))
|
(st/emit! (msg/error (tr "errors.ldap-disabled")))
|
||||||
|
|
||||||
(fn? on-error)
|
(fn? on-error)
|
||||||
(on-error error)
|
(on-error error)
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(st/emit! (dm/error (tr "errors.generic")))))))))
|
(st/emit! (msg/error (tr "errors.generic")))))))))
|
||||||
|
|
||||||
(s/def ::email ::us/email)
|
(s/def ::email ::us/email)
|
||||||
(s/def ::password ::us/not-empty-string)
|
(s/def ::password ::us/not-empty-string)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
(:require-macros [app.main.style :as stl])
|
(:require-macros [app.main.style :as stl])
|
||||||
(:require
|
(:require
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.users :as du]
|
[app.main.data.users :as du]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.ui.components.forms :as fm]
|
[app.main.ui.components.forms :as fm]
|
||||||
|
@ -39,11 +39,11 @@
|
||||||
|
|
||||||
(defn- on-error
|
(defn- on-error
|
||||||
[_form _error]
|
[_form _error]
|
||||||
(st/emit! (dm/error (tr "auth.notifications.invalid-token-error"))))
|
(st/emit! (msg/error (tr "auth.notifications.invalid-token-error"))))
|
||||||
|
|
||||||
(defn- on-success
|
(defn- on-success
|
||||||
[_]
|
[_]
|
||||||
(st/emit! (dm/info (tr "auth.notifications.password-changed-successfully"))
|
(st/emit! (msg/info (tr "auth.notifications.password-changed-successfully"))
|
||||||
(rt/nav :auth-login)))
|
(rt/nav :auth-login)))
|
||||||
|
|
||||||
(defn- on-submit
|
(defn- on-submit
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
(:require
|
(:require
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.users :as du]
|
[app.main.data.users :as du]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.ui.components.forms :as fm]
|
[app.main.ui.components.forms :as fm]
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
:initial {})
|
:initial {})
|
||||||
submitted (mf/use-state false)
|
submitted (mf/use-state false)
|
||||||
|
|
||||||
default-success-finish #(st/emit! (dm/info (tr "auth.notifications.recovery-token-sent")))
|
default-success-finish #(st/emit! (msg/info (tr "auth.notifications.recovery-token-sent")))
|
||||||
|
|
||||||
on-success
|
on-success
|
||||||
(mf/use-callback
|
(mf/use-callback
|
||||||
|
@ -53,13 +53,13 @@
|
||||||
(reset! submitted false)
|
(reset! submitted false)
|
||||||
(case code
|
(case code
|
||||||
:profile-not-verified
|
:profile-not-verified
|
||||||
(rx/of (dm/error (tr "auth.notifications.profile-not-verified") {:timeout nil}))
|
(rx/of (msg/error (tr "auth.notifications.profile-not-verified")))
|
||||||
|
|
||||||
:profile-is-muted
|
:profile-is-muted
|
||||||
(rx/of (dm/error (tr "errors.profile-is-muted")))
|
(rx/of (msg/error (tr "errors.profile-is-muted")))
|
||||||
|
|
||||||
:email-has-permanent-bounces
|
:email-has-permanent-bounces
|
||||||
(rx/of (dm/error (tr "errors.email-has-permanent-bounces" (:email data))))
|
(rx/of (msg/error (tr "errors.email-has-permanent-bounces" (:email data))))
|
||||||
|
|
||||||
(rx/throw error))))
|
(rx/throw error))))
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.config :as cf]
|
[app.config :as cf]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.users :as du]
|
[app.main.data.users :as du]
|
||||||
[app.main.repo :as rp]
|
[app.main.repo :as rp]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
|
@ -61,14 +61,14 @@
|
||||||
[form {:keys [type code] :as cause}]
|
[form {:keys [type code] :as cause}]
|
||||||
(condp = [type code]
|
(condp = [type code]
|
||||||
[:restriction :registration-disabled]
|
[:restriction :registration-disabled]
|
||||||
(st/emit! (dm/error (tr "errors.registration-disabled")))
|
(st/emit! (msg/error (tr "errors.registration-disabled")))
|
||||||
|
|
||||||
[:restriction :profile-blocked]
|
[:restriction :profile-blocked]
|
||||||
(st/emit! (dm/error (tr "errors.profile-blocked")))
|
(st/emit! (msg/error (tr "errors.profile-blocked")))
|
||||||
|
|
||||||
[:validation :email-has-permanent-bounces]
|
[:validation :email-has-permanent-bounces]
|
||||||
(let [email (get @form [:data :email])]
|
(let [email (get @form [:data :email])]
|
||||||
(st/emit! (dm/error (tr "errors.email-has-permanent-bounces" email))))
|
(st/emit! (msg/error (tr "errors.email-has-permanent-bounces" email))))
|
||||||
|
|
||||||
[:validation :email-already-exists]
|
[:validation :email-already-exists]
|
||||||
(swap! form assoc-in [:errors :email]
|
(swap! form assoc-in [:errors :email]
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
(swap! form assoc-in [:errors :password]
|
(swap! form assoc-in [:errors :password]
|
||||||
{:message "errors.email-as-password"})
|
{:message "errors.email-as-password"})
|
||||||
|
|
||||||
(st/emit! (dm/error (tr "errors.generic")))))
|
(st/emit! (msg/error (tr "errors.generic")))))
|
||||||
|
|
||||||
(defn- handle-prepare-register-success
|
(defn- handle-prepare-register-success
|
||||||
[params]
|
[params]
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
|
|
||||||
(do
|
(do
|
||||||
(println (:explain error))
|
(println (:explain error))
|
||||||
(st/emit! (dm/error (tr "errors.generic"))))))
|
(st/emit! (msg/error (tr "errors.generic"))))))
|
||||||
|
|
||||||
(defn- handle-register-success
|
(defn- handle-register-success
|
||||||
[data]
|
[data]
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
(ns app.main.ui.auth.verify-token
|
(ns app.main.ui.auth.verify-token
|
||||||
(:require-macros [app.main.style :as stl])
|
(:require-macros [app.main.style :as stl])
|
||||||
(:require
|
(:require
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.users :as du]
|
[app.main.data.users :as du]
|
||||||
[app.main.repo :as rp]
|
[app.main.repo :as rp]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
|
@ -25,13 +25,13 @@
|
||||||
(defmethod handle-token :verify-email
|
(defmethod handle-token :verify-email
|
||||||
[data]
|
[data]
|
||||||
(let [msg (tr "dashboard.notifications.email-verified-successfully")]
|
(let [msg (tr "dashboard.notifications.email-verified-successfully")]
|
||||||
(ts/schedule 1000 #(st/emit! (dm/success msg)))
|
(ts/schedule 1000 #(st/emit! (msg/success msg)))
|
||||||
(st/emit! (du/login-from-token data))))
|
(st/emit! (du/login-from-token data))))
|
||||||
|
|
||||||
(defmethod handle-token :change-email
|
(defmethod handle-token :change-email
|
||||||
[_data]
|
[_data]
|
||||||
(let [msg (tr "dashboard.notifications.email-changed-successfully")]
|
(let [msg (tr "dashboard.notifications.email-changed-successfully")]
|
||||||
(ts/schedule 100 #(st/emit! (dm/success msg)))
|
(ts/schedule 100 #(st/emit! (msg/success msg)))
|
||||||
(st/emit! (rt/nav :settings-profile)
|
(st/emit! (rt/nav :settings-profile)
|
||||||
(du/fetch-profile))))
|
(du/fetch-profile))))
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
(case (:state tdata)
|
(case (:state tdata)
|
||||||
:created
|
:created
|
||||||
(st/emit!
|
(st/emit!
|
||||||
(dm/success (tr "auth.notifications.team-invitation-accepted"))
|
(msg/success (tr "auth.notifications.team-invitation-accepted"))
|
||||||
(du/fetch-profile)
|
(du/fetch-profile)
|
||||||
(rt/nav :dashboard-projects {:team-id (:team-id tdata)}))
|
(rt/nav :dashboard-projects {:team-id (:team-id tdata)}))
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
[_tdata]
|
[_tdata]
|
||||||
(st/emit!
|
(st/emit!
|
||||||
(rt/nav :auth-login)
|
(rt/nav :auth-login)
|
||||||
(dm/warn (tr "errors.unexpected-token"))))
|
(msg/warn (tr "errors.unexpected-token"))))
|
||||||
|
|
||||||
(mf/defc verify-token
|
(mf/defc verify-token
|
||||||
[{:keys [route] :as props}]
|
[{:keys [route] :as props}]
|
||||||
|
@ -79,17 +79,17 @@
|
||||||
|
|
||||||
(= :email-already-exists code)
|
(= :email-already-exists code)
|
||||||
(let [msg (tr "errors.email-already-exists")]
|
(let [msg (tr "errors.email-already-exists")]
|
||||||
(ts/schedule 100 #(st/emit! (dm/error msg)))
|
(ts/schedule 100 #(st/emit! (msg/error msg)))
|
||||||
(st/emit! (rt/nav :auth-login)))
|
(st/emit! (rt/nav :auth-login)))
|
||||||
|
|
||||||
(= :email-already-validated code)
|
(= :email-already-validated code)
|
||||||
(let [msg (tr "errors.email-already-validated")]
|
(let [msg (tr "errors.email-already-validated")]
|
||||||
(ts/schedule 100 #(st/emit! (dm/warn msg)))
|
(ts/schedule 100 #(st/emit! (msg/warn msg)))
|
||||||
(st/emit! (rt/nav :auth-login)))
|
(st/emit! (rt/nav :auth-login)))
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(let [msg (tr "errors.generic")]
|
(let [msg (tr "errors.generic")]
|
||||||
(ts/schedule 100 #(st/emit! (dm/error msg)))
|
(ts/schedule 100 #(st/emit! (msg/error msg)))
|
||||||
(st/emit! (rt/nav :auth-login))))))))
|
(st/emit! (rt/nav :auth-login))))))))
|
||||||
|
|
||||||
(if @bad-token
|
(if @bad-token
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
[app.main.data.common :as dcm]
|
[app.main.data.common :as dcm]
|
||||||
[app.main.data.dashboard :as dd]
|
[app.main.data.dashboard :as dd]
|
||||||
[app.main.data.events :as ev]
|
[app.main.data.events :as ev]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
[app.main.repo :as rp]
|
[app.main.repo :as rp]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
|
@ -88,12 +88,12 @@
|
||||||
on-duplicate
|
on-duplicate
|
||||||
(fn [_]
|
(fn [_]
|
||||||
(apply st/emit! (map dd/duplicate-file files))
|
(apply st/emit! (map dd/duplicate-file files))
|
||||||
(st/emit! (dm/success (tr "dashboard.success-duplicate-file" (i18n/c (count files))))))
|
(st/emit! (msg/success (tr "dashboard.success-duplicate-file" (i18n/c (count files))))))
|
||||||
|
|
||||||
on-delete-accept
|
on-delete-accept
|
||||||
(fn [_]
|
(fn [_]
|
||||||
(apply st/emit! (map dd/delete-file files))
|
(apply st/emit! (map dd/delete-file files))
|
||||||
(st/emit! (dm/success (tr "dashboard.success-delete-file" (i18n/c (count files))))
|
(st/emit! (msg/success (tr "dashboard.success-delete-file" (i18n/c (count files))))
|
||||||
(dd/clear-selected-files)))
|
(dd/clear-selected-files)))
|
||||||
|
|
||||||
on-delete
|
on-delete
|
||||||
|
@ -126,8 +126,8 @@
|
||||||
on-move-success
|
on-move-success
|
||||||
(fn [team-id project-id]
|
(fn [team-id project-id]
|
||||||
(if multi?
|
(if multi?
|
||||||
(st/emit! (dm/success (tr "dashboard.success-move-files")))
|
(st/emit! (msg/success (tr "dashboard.success-move-files")))
|
||||||
(st/emit! (dm/success (tr "dashboard.success-move-file"))))
|
(st/emit! (msg/success (tr "dashboard.success-move-file"))))
|
||||||
(if (or navigate? (not= team-id current-team-id))
|
(if (or navigate? (not= team-id current-team-id))
|
||||||
(st/emit! (dd/go-to-files team-id project-id))
|
(st/emit! (dd/go-to-files team-id project-id))
|
||||||
(st/emit! (dd/fetch-recent-files team-id)
|
(st/emit! (dd/fetch-recent-files team-id)
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.repo :as rp]
|
[app.main.repo :as rp]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
|
|
||||||
[app.main.ui.components.context-menu-a11y :refer [context-menu-a11y]]
|
[app.main.ui.components.context-menu-a11y :refer [context-menu-a11y]]
|
||||||
[app.main.ui.components.file-uploader :refer [file-uploader]]
|
[app.main.ui.components.file-uploader :refer [file-uploader]]
|
||||||
[app.main.ui.icons :as i]
|
[app.main.ui.icons :as i]
|
||||||
|
@ -139,7 +138,7 @@
|
||||||
|
|
||||||
(when problematic-fonts?
|
(when problematic-fonts?
|
||||||
[:div {:class (stl/css :banner :warning)}
|
[:div {:class (stl/css :banner :warning)}
|
||||||
[:div {:class (stl/css :icon)} i/msg-warning-refactor]
|
[:div {:class (stl/css :icon)} i/msg-neutral-refactor]
|
||||||
[:div {:class (stl/css :content)}
|
[:div {:class (stl/css :content)}
|
||||||
[:& i18n/tr-html {:tag-name "span"
|
[:& i18n/tr-html {:tag-name "span"
|
||||||
:label "dashboard.fonts.warning-text"}]]])]]
|
:label "dashboard.fonts.warning-text"}]]])]]
|
||||||
|
@ -176,7 +175,7 @@
|
||||||
|
|
||||||
[:div {:class (stl/css :table-field :options)}
|
[:div {:class (stl/css :table-field :options)}
|
||||||
(when (:height-warning? item)
|
(when (:height-warning? item)
|
||||||
[:span {:class (stl/css :icon :failure)} i/msg-warning-refactor])
|
[:span {:class (stl/css :icon :failure)} i/msg-neutral-refactor])
|
||||||
|
|
||||||
[:button {:on-click #(on-upload item)
|
[:button {:on-click #(on-upload item)
|
||||||
:class (stl/css-case :btn-primary true
|
:class (stl/css-case :btn-primary true
|
||||||
|
|
|
@ -256,40 +256,43 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner {
|
.banner {
|
||||||
|
@include bodyMedTipography;
|
||||||
|
--bg-color: var(--alert-background-color-default);
|
||||||
|
--fg-color: var(--alert-text-foreground-color-default);
|
||||||
|
--icon-color: var(--alert-icon-foreground-color-default);
|
||||||
|
--border-color: var(--alert-border-color-default);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: $s-40 1fr;
|
grid-template-columns: $s-16 1fr;
|
||||||
|
gap: $s-8;
|
||||||
background-color: $db-primary;
|
padding: $s-8 $s-8 $s-8 $s-16;
|
||||||
border-radius: $br-12;
|
border-radius: $br-12;
|
||||||
border: $s-1 solid $db-quaternary;
|
border: $s-1 solid var(--border-color);
|
||||||
color: $df-primary;
|
border-radius: $br-12;
|
||||||
|
background-color: var(--bg-color);
|
||||||
|
color: var(--fg-color);
|
||||||
font-size: $fs-12;
|
font-size: $fs-12;
|
||||||
|
|
||||||
&:not(:last-child) {
|
|
||||||
margin-bottom: $s-12;
|
|
||||||
}
|
|
||||||
.icon {
|
.icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding-top: $s-12;
|
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
stroke: $df-secondary;
|
stroke: var(--icon-color);
|
||||||
fill: none;
|
fill: none;
|
||||||
height: $s-20;
|
height: $s-16;
|
||||||
width: $s-20;
|
width: $s-16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.content {
|
.content a {
|
||||||
margin: $s-12;
|
color: $da-primary;
|
||||||
a {
|
|
||||||
color: $da-primary;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
&.warning {
|
&.warning {
|
||||||
background-color: $db-quaternary;
|
--bg-color: var(--alert-background-color-warning);
|
||||||
|
--fg-color: var(--alert-text-foreground-color-warning);
|
||||||
|
--icon-color: var(--alert-icon-foreground-color-warning);
|
||||||
|
--border-color: var(--alert-border-color-warning);
|
||||||
.icon svg {
|
.icon svg {
|
||||||
stroke: var(--element-foreground-warning);
|
stroke: var(--element-foreground-warning);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
(:require
|
(:require
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.main.data.dashboard :as dd]
|
[app.main.data.dashboard :as dd]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.ui.components.forms :as fm]
|
[app.main.ui.components.forms :as fm]
|
||||||
|
@ -29,22 +29,22 @@
|
||||||
(defn- on-create-success
|
(defn- on-create-success
|
||||||
[_form response]
|
[_form response]
|
||||||
(let [msg "Team created successfully"]
|
(let [msg "Team created successfully"]
|
||||||
(st/emit! (dm/success msg)
|
(st/emit! (msg/success msg)
|
||||||
(modal/hide)
|
(modal/hide)
|
||||||
(rt/nav :dashboard-projects {:team-id (:id response)}))))
|
(rt/nav :dashboard-projects {:team-id (:id response)}))))
|
||||||
|
|
||||||
(defn- on-update-success
|
(defn- on-update-success
|
||||||
[_form _response]
|
[_form _response]
|
||||||
(let [msg "Team created successfully"]
|
(let [msg "Team created successfully"]
|
||||||
(st/emit! (dm/success msg)
|
(st/emit! (msg/success msg)
|
||||||
(modal/hide))))
|
(modal/hide))))
|
||||||
|
|
||||||
(defn- on-error
|
(defn- on-error
|
||||||
[form _response]
|
[form _response]
|
||||||
(let [id (get-in @form [:clean-data :id])]
|
(let [id (get-in @form [:clean-data :id])]
|
||||||
(if id
|
(if id
|
||||||
(rx/of (dm/error "Error on updating team."))
|
(rx/of (msg/error "Error on updating team."))
|
||||||
(rx/of (dm/error "Error on creating team.")))))
|
(rx/of (msg/error "Error on creating team.")))))
|
||||||
|
|
||||||
(defn- on-create-submit
|
(defn- on-create-submit
|
||||||
[form]
|
[form]
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
(mf/defc notifications-hub
|
(mf/defc notifications-hub
|
||||||
[]
|
[]
|
||||||
(let [message (mf/deref refs/message)
|
(let [message (mf/deref refs/message)
|
||||||
|
|
||||||
on-close #(st/emit! dmsg/hide)
|
on-close #(st/emit! dmsg/hide)
|
||||||
|
|
||||||
toast-message {:type (or (:type message) :info)
|
toast-message {:type (or (:type message) :info)
|
||||||
|
@ -33,16 +34,14 @@
|
||||||
:content (:content message)}
|
:content (:content message)}
|
||||||
|
|
||||||
;; TODO review this options
|
;; TODO review this options
|
||||||
is-toast-msg (some? (:timeout message))
|
is-toast-msg (or (= :toast (:notification-type message)) (some? (:timeout message)))
|
||||||
actions? (some? (:actions message))
|
is-inline-msg (or (= :inline (:notification-type message)) (and (some? (:position message)) (= :floating (:position message))))]
|
||||||
inline? (and (some? (:position message)) (= :floating (:position message)))
|
|
||||||
close? (and (some? (:controls message)) (= :close (:controls message)))]
|
|
||||||
|
|
||||||
(when message
|
(when message
|
||||||
(cond
|
(cond
|
||||||
(and close? is-toast-msg)
|
is-toast-msg
|
||||||
[:& toast-notification toast-message]
|
[:& toast-notification toast-message]
|
||||||
(and actions? inline?)
|
is-inline-msg
|
||||||
[:& inline-notification inline-message]
|
[:& inline-notification inline-message]
|
||||||
:else
|
:else
|
||||||
[:& context-notification context-message]))))
|
[:& context-notification context-message]))))
|
||||||
|
|
|
@ -42,21 +42,22 @@
|
||||||
[{:keys [type content links] :as props}]
|
[{:keys [type content links] :as props}]
|
||||||
|
|
||||||
[:aside {:class (stl/css-case :context-notification true
|
[:aside {:class (stl/css-case :context-notification true
|
||||||
:warning (= type :warning)
|
:warning (= type :warning)
|
||||||
:error (= type :error)
|
:error (= type :error)
|
||||||
:success (= type :success)
|
:success (= type :success)
|
||||||
:info (= type :info))}
|
:info (= type :info))}
|
||||||
|
|
||||||
(get-icon-by-type type)
|
(get-icon-by-type type)
|
||||||
|
|
||||||
[:div {:class (stl/css :context-text)}
|
[:div {:class (stl/css :context-text)}
|
||||||
content]
|
content]
|
||||||
|
|
||||||
[:nav {:class (stl/css :link-nav)}
|
(when (some? links)
|
||||||
(for [[index link] (d/enumerate links)]
|
[:nav {:class (stl/css :link-nav)}
|
||||||
;; TODO Review this component
|
(for [[index link] (d/enumerate links)]
|
||||||
[:& lb/link-button {:class (stl/css :link)
|
;; TODO Review this component
|
||||||
:on-click (:callback link)
|
[:& lb/link-button {:class (stl/css :link)
|
||||||
:value (:label link)
|
:on-click (:callback link)
|
||||||
:key (dm/str "link-" index)}])]])
|
:value (:label link)
|
||||||
|
:key (dm/str "link-" index)}])])])
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: $s-8 $s-8 $s-8 $s-16;
|
padding: $s-8 $s-8 $s-8 $s-16;
|
||||||
border: $s-1 solid var(--border-color);
|
border: $s-1 solid var(--border-color);
|
||||||
border-radius: $br-12;
|
border-radius: $br-8;
|
||||||
background-color: var(--bg-color);
|
background-color: var(--bg-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
padding: $s-8 $s-8 $s-8 $s-16;
|
padding: $s-8 $s-8 $s-8 $s-16;
|
||||||
margin-inline: auto;
|
margin-inline: auto;
|
||||||
border: $s-1 solid var(--border-color);
|
border: $s-1 solid var(--border-color);
|
||||||
border-radius: $br-12;
|
border-radius: $br-8;
|
||||||
z-index: $z-index-modal;
|
z-index: $z-index-modal;
|
||||||
background-color: var(--bg-color);
|
background-color: var(--bg-color);
|
||||||
color: var(--fg-color);
|
color: var(--fg-color);
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
[{:keys [type content on-close links] :as props}]
|
[{:keys [type content on-close links] :as props}]
|
||||||
|
|
||||||
[:aside {:class (stl/css-case :toast-notification true
|
[:aside {:class (stl/css-case :toast-notification true
|
||||||
|
:with-links (some? links)
|
||||||
:warning (= type :warning)
|
:warning (= type :warning)
|
||||||
:error (= type :error)
|
:error (= type :error)
|
||||||
:success (= type :success)
|
:success (= type :success)
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
top: $s-16;
|
top: $s-16;
|
||||||
right: $s-16;
|
right: $s-16;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: $s-16 auto 1fr auto;
|
grid-template-columns: $s-16 1fr auto;
|
||||||
gap: $s-8;
|
gap: $s-8;
|
||||||
min-height: $s-32;
|
min-height: $s-32;
|
||||||
min-width: $s-500;
|
min-width: $s-500;
|
||||||
|
@ -24,11 +24,15 @@
|
||||||
padding: $s-8 $s-8 $s-8 $s-16;
|
padding: $s-8 $s-8 $s-8 $s-16;
|
||||||
border: $s-1 solid var(--border-color);
|
border: $s-1 solid var(--border-color);
|
||||||
background-color: var(--bg-color);
|
background-color: var(--bg-color);
|
||||||
border-radius: $br-12;
|
border-radius: $br-8;
|
||||||
color: var(--fg-color);
|
color: var(--fg-color);
|
||||||
z-index: $z-index-alert;
|
z-index: $z-index-alert;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.with-links {
|
||||||
|
grid-template-columns: $s-16 auto 1fr auto;
|
||||||
|
}
|
||||||
|
|
||||||
.warning {
|
.warning {
|
||||||
--bg-color: var(--alert-background-color-warning);
|
--bg-color: var(--alert-background-color-warning);
|
||||||
--fg-color: var(--alert-text-foreground-color-warning);
|
--fg-color: var(--alert-text-foreground-color-warning);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
(ns app.main.ui.onboarding.newsletter
|
(ns app.main.ui.onboarding.newsletter
|
||||||
(:require-macros [app.main.style :as stl])
|
(:require-macros [app.main.style :as stl])
|
||||||
(:require
|
(:require
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
[app.main.data.users :as du]
|
[app.main.data.users :as du]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
(mf/deps @newsletter-updates @newsletter-news)
|
(mf/deps @newsletter-updates @newsletter-news)
|
||||||
(fn []
|
(fn []
|
||||||
(st/emit! (when (or @newsletter-updates @newsletter-news)
|
(st/emit! (when (or @newsletter-updates @newsletter-news)
|
||||||
(dm/success message))
|
(msg/success message))
|
||||||
(modal/show {:type :onboarding-team})
|
(modal/show {:type :onboarding-team})
|
||||||
(du/update-profile-props {:newsletter-updates @newsletter-updates :newsletter-news @newsletter-news}))))]
|
(du/update-profile-props {:newsletter-updates @newsletter-updates :newsletter-news @newsletter-news}))))]
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.main.data.dashboard :as dd]
|
[app.main.data.dashboard :as dd]
|
||||||
[app.main.data.events :as ev]
|
[app.main.data.events :as ev]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
|
@ -169,7 +169,7 @@
|
||||||
on-error
|
on-error
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(fn [_form _response]
|
(fn [_form _response]
|
||||||
(st/emit! (dm/error "Error on creating team."))))
|
(st/emit! (msg/error "Error on creating team."))))
|
||||||
|
|
||||||
;; The SKIP branch only creates the team, without invitations
|
;; The SKIP branch only creates the team, without invitations
|
||||||
on-invite-later
|
on-invite-later
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
(:require-macros [app.main.style :as stl])
|
(:require-macros [app.main.style :as stl])
|
||||||
(:require
|
(:require
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
[app.main.data.users :as du]
|
[app.main.data.users :as du]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
(fn [_]
|
(fn [_]
|
||||||
(let [message (tr "dashboard.access-tokens.create.success")]
|
(let [message (tr "dashboard.access-tokens.create.success")]
|
||||||
(st/emit! (du/fetch-access-tokens)
|
(st/emit! (du/fetch-access-tokens)
|
||||||
(dm/success message)
|
(msg/success message)
|
||||||
(reset! created? true)))))
|
(reset! created? true)))))
|
||||||
|
|
||||||
on-close
|
on-close
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
on-error
|
on-error
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(fn [_]
|
(fn [_]
|
||||||
(st/emit! (dm/error (tr "errors.generic"))
|
(st/emit! (msg/error (tr "errors.generic"))
|
||||||
(modal/hide))))
|
(modal/hide))))
|
||||||
|
|
||||||
on-submit
|
on-submit
|
||||||
|
@ -101,9 +101,10 @@
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(dom/prevent-default event)
|
(dom/prevent-default event)
|
||||||
(wapi/write-to-clipboard (:token created))
|
(wapi/write-to-clipboard (:token created))
|
||||||
(st/emit! (dm/show {:type :info
|
(st/emit! (msg/show {:type :info
|
||||||
:content (tr "dashboard.access-tokens.copied-success")
|
:notification-type :toast
|
||||||
:timeout 1000}))))]
|
:content (tr "dashboard.access-tokens.copied-success")
|
||||||
|
:timeout 7000}))))]
|
||||||
|
|
||||||
[:div {:class (stl/css :modal-overlay)}
|
[:div {:class (stl/css :modal-overlay)}
|
||||||
[:div {:class (stl/css :modal-container)}
|
[:div {:class (stl/css :modal-container)}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.data.macros :as dma]
|
[app.common.data.macros :as dma]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
[app.main.data.users :as du]
|
[app.main.data.users :as du]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
|
@ -47,11 +47,11 @@
|
||||||
(assoc-in data [:errors :email-1] error))))
|
(assoc-in data [:errors :email-1] error))))
|
||||||
|
|
||||||
:profile-is-muted
|
:profile-is-muted
|
||||||
(rx/of (dm/error (tr "errors.profile-is-muted")))
|
(rx/of (msg/error (tr "errors.profile-is-muted")))
|
||||||
|
|
||||||
:email-has-permanent-bounces
|
:email-has-permanent-bounces
|
||||||
(let [email (get @form [:data :email-1])]
|
(let [email (get @form [:data :email-1])]
|
||||||
(rx/of (dm/error (tr "errors.email-has-permanent-bounces" email))))
|
(rx/of (msg/error (tr "errors.email-has-permanent-bounces" email))))
|
||||||
|
|
||||||
(rx/throw error)))
|
(rx/throw error)))
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
(st/emit! (du/fetch-profile)
|
(st/emit! (du/fetch-profile)
|
||||||
(modal/hide))
|
(modal/hide))
|
||||||
(let [message (tr "notifications.validation-email-sent" (:email profile))]
|
(let [message (tr "notifications.validation-email-sent" (:email profile))]
|
||||||
(st/emit! (dm/info message)
|
(st/emit! (msg/info message)
|
||||||
(modal/hide)))))
|
(modal/hide)))))
|
||||||
|
|
||||||
(defn- on-submit
|
(defn- on-submit
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
(ns app.main.ui.settings.delete-account
|
(ns app.main.ui.settings.delete-account
|
||||||
(:require-macros [app.main.style :as stl])
|
(:require-macros [app.main.style :as stl])
|
||||||
(:require
|
(:require
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
[app.main.data.users :as du]
|
[app.main.data.users :as du]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
[{:keys [code] :as error}]
|
[{:keys [code] :as error}]
|
||||||
(if (= :owner-teams-with-people code)
|
(if (= :owner-teams-with-people code)
|
||||||
(let [msg (tr "notifications.profile-deletion-not-allowed")]
|
(let [msg (tr "notifications.profile-deletion-not-allowed")]
|
||||||
(rx/of (dm/error msg)))
|
(rx/of (msg/error msg)))
|
||||||
(rx/throw error)))
|
(rx/throw error)))
|
||||||
|
|
||||||
(mf/defc delete-account-modal
|
(mf/defc delete-account-modal
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
(:require-macros [app.main.style :as stl])
|
(:require-macros [app.main.style :as stl])
|
||||||
(:require
|
(:require
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.repo :as rp]
|
[app.main.repo :as rp]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
(mf/deps profile)
|
(mf/deps profile)
|
||||||
(fn [_]
|
(fn [_]
|
||||||
(reset! loading false)
|
(reset! loading false)
|
||||||
(st/emit! (dm/success (tr "labels.feedback-sent")))
|
(st/emit! (msg/success (tr "labels.feedback-sent")))
|
||||||
(swap! form assoc :data {} :touched {} :errors {})))
|
(swap! form assoc :data {} :touched {} :errors {})))
|
||||||
|
|
||||||
on-error
|
on-error
|
||||||
|
@ -48,8 +48,8 @@
|
||||||
(fn [{:keys [code] :as error}]
|
(fn [{:keys [code] :as error}]
|
||||||
(reset! loading false)
|
(reset! loading false)
|
||||||
(if (= code :feedback-disabled)
|
(if (= code :feedback-disabled)
|
||||||
(st/emit! (dm/error (tr "labels.feedback-disabled")))
|
(st/emit! (msg/error (tr "labels.feedback-disabled")))
|
||||||
(st/emit! (dm/error (tr "errors.generic"))))))
|
(st/emit! (msg/error (tr "errors.generic"))))))
|
||||||
|
|
||||||
on-submit
|
on-submit
|
||||||
(mf/use-callback
|
(mf/use-callback
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
(:require-macros [app.main.style :as stl])
|
(:require-macros [app.main.style :as stl])
|
||||||
(:require
|
(:require
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.users :as du]
|
[app.main.data.users :as du]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
(defn- on-success
|
(defn- on-success
|
||||||
[_]
|
[_]
|
||||||
(st/emit! (dm/success (tr "notifications.profile-saved"))))
|
(st/emit! (msg/success (tr "notifications.profile-saved"))))
|
||||||
|
|
||||||
(defn- on-submit
|
(defn- on-submit
|
||||||
[form _event]
|
[form _event]
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
(:require-macros [app.main.style :as stl])
|
(:require-macros [app.main.style :as stl])
|
||||||
(:require
|
(:require
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.users :as udu]
|
[app.main.data.users :as udu]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.ui.components.forms :as fm]
|
[app.main.ui.components.forms :as fm]
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
{:message (tr "errors.email-as-password")})
|
{:message (tr "errors.email-as-password")})
|
||||||
|
|
||||||
(let [msg (tr "generic.error")]
|
(let [msg (tr "generic.error")]
|
||||||
(st/emit! (dm/error msg)))))
|
(st/emit! (msg/error msg)))))
|
||||||
|
|
||||||
(defn- on-success
|
(defn- on-success
|
||||||
[form]
|
[form]
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
msg (tr "dashboard.notifications.password-saved")]
|
msg (tr "dashboard.notifications.password-saved")]
|
||||||
(dom/clean-value! password-old-node)
|
(dom/clean-value! password-old-node)
|
||||||
(dom/focus! password-old-node)
|
(dom/focus! password-old-node)
|
||||||
(st/emit! (dm/success msg))))
|
(st/emit! (msg/success msg))))
|
||||||
|
|
||||||
(defn- on-submit
|
(defn- on-submit
|
||||||
[form event]
|
[form event]
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
(:require
|
(:require
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.config :as cf]
|
[app.config :as cf]
|
||||||
[app.main.data.messages :as dm]
|
[app.main.data.messages :as msg]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
[app.main.data.users :as du]
|
[app.main.data.users :as du]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
(defn- on-success
|
(defn- on-success
|
||||||
[_]
|
[_]
|
||||||
(st/emit! (dm/success (tr "notifications.profile-saved"))))
|
(st/emit! (msg/success (tr "notifications.profile-saved"))))
|
||||||
|
|
||||||
(defn- on-submit
|
(defn- on-submit
|
||||||
[form _event]
|
[form _event]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue