0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-18 10:41:29 -05:00

💄 Update some namespace abbreviations

This commit is contained in:
Eva Marco 2024-02-23 16:39:57 +01:00 committed by Andrey Antukh
parent 1af2ec0b79
commit 336cc98029
27 changed files with 131 additions and 117 deletions

View file

@ -70,6 +70,7 @@
(rx/of (msg/dialog
:content (tr "notifications.by-code.upgrade-version")
:controls :inline-actions
:notification-type :inline
:type level
:actions [{:label "Refresh" :callback force-reload!}]
:tag :notification)))

View file

@ -8,7 +8,7 @@
(:require
[app.common.exceptions :as ex]
[app.common.media :as cm]
[app.main.data.messages :as dm]
[app.main.data.messages :as msg]
[app.main.store :as st]
[app.util.i18n :refer [tr]]
[beicon.v2.core :as rx]
@ -46,13 +46,13 @@
(defn notify-start-loading
[]
(st/emit! (dm/show {:content (tr "media.loading")
:type :info
:timeout nil})))
(st/emit! (msg/show {:content (tr "media.loading")
:type :info
:timeout nil})))
(defn notify-finished-loading
[]
(st/emit! dm/hide))
(st/emit! msg/hide))
(defn process-error
[error]
@ -68,4 +68,4 @@
:else
(tr "errors.unexpected-error"))]
(rx/of (dm/error msg))))
(rx/of (msg/error msg))))

View file

@ -16,7 +16,7 @@
(declare show)
(def default-animation-timeout 600)
(def default-timeout 5000)
(def default-timeout 7000)
(def ^:private
schema:message
@ -27,6 +27,8 @@
[::sm/one-of #{:visible :hide}]]
[:position {:optional true}
[::sm/one-of #{:fixed :floating :inline}]]
[:notification-type {:optional true}
[::sm/one-of #{:inline :context :toast}]]
[:controls {:optional true}
[::sm/one-of #{:none :close :inline-actions :bottom-actions}]]
[:tag {:optional true}
@ -93,18 +95,18 @@
(rx/of hide))))))
(defn error
([content] (error content {}))
([content {:keys [timeout] :or {timeout default-timeout}}]
([content]
(show {:content content
:type :error
:position :fixed
:timeout timeout})))
:notification-type :toast
:position :fixed})))
(defn info
([content] (info content {}))
([content {:keys [timeout] :or {timeout default-timeout}}]
(show {:content content
:type :info
:notification-type :toast
:position :fixed
:timeout timeout})))
@ -113,6 +115,7 @@
([content {:keys [timeout] :or {timeout default-timeout}}]
(show {:content content
:type :success
:notification-type :toast
:position :fixed
:timeout timeout})))
@ -121,6 +124,7 @@
([content {:keys [timeout] :or {timeout default-timeout}}]
(show {:content content
:type :warning
:notification-type :toast
:position :fixed
:timeout timeout})))
@ -142,6 +146,7 @@
{:content content
:type :info
:position :floating
:notification-type :inline
:controls controls
:links links
:actions actions

View file

@ -11,7 +11,7 @@
[app.common.logging :as log]
[app.common.spec :as us]
[app.config :as cf]
[app.main.data.messages :as dm]
[app.main.data.messages :as msg]
[app.main.data.users :as du]
[app.main.repo :as rp]
[app.main.store :as st]
@ -48,10 +48,10 @@
(cond
(and (= type :restriction)
(= 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
(st/emit! (dm/error (tr "errors.generic"))))))))
(st/emit! (msg/error (tr "errors.generic"))))))))
(defn- login-with-ldap
[event params]
@ -67,13 +67,13 @@
(cond
(and (= type :restriction)
(= code :ldap-not-initialized))
(st/emit! (dm/error (tr "errors.ldap-disabled")))
(st/emit! (msg/error (tr "errors.ldap-disabled")))
(fn? on-error)
(on-error error)
:else
(st/emit! (dm/error (tr "errors.generic")))))))))
(st/emit! (msg/error (tr "errors.generic")))))))))
(s/def ::email ::us/email)
(s/def ::password ::us/not-empty-string)

View file

@ -8,7 +8,7 @@
(:require-macros [app.main.style :as stl])
(:require
[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.store :as st]
[app.main.ui.components.forms :as fm]
@ -39,11 +39,11 @@
(defn- on-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
[_]
(st/emit! (dm/info (tr "auth.notifications.password-changed-successfully"))
(st/emit! (msg/info (tr "auth.notifications.password-changed-successfully"))
(rt/nav :auth-login)))
(defn- on-submit

View file

@ -9,7 +9,7 @@
(:require
[app.common.data :as d]
[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.store :as st]
[app.main.ui.components.forms :as fm]
@ -37,7 +37,7 @@
:initial {})
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
(mf/use-callback
@ -53,13 +53,13 @@
(reset! submitted false)
(case code
: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
(rx/of (dm/error (tr "errors.profile-is-muted")))
(rx/of (msg/error (tr "errors.profile-is-muted")))
: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))))

View file

@ -10,7 +10,7 @@
[app.common.data :as d]
[app.common.spec :as us]
[app.config :as cf]
[app.main.data.messages :as dm]
[app.main.data.messages :as msg]
[app.main.data.users :as du]
[app.main.repo :as rp]
[app.main.store :as st]
@ -61,14 +61,14 @@
[form {:keys [type code] :as cause}]
(condp = [type code]
[:restriction :registration-disabled]
(st/emit! (dm/error (tr "errors.registration-disabled")))
(st/emit! (msg/error (tr "errors.registration-disabled")))
[:restriction :profile-blocked]
(st/emit! (dm/error (tr "errors.profile-blocked")))
(st/emit! (msg/error (tr "errors.profile-blocked")))
[:validation :email-has-permanent-bounces]
(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]
(swap! form assoc-in [:errors :email]
@ -78,7 +78,7 @@
(swap! form assoc-in [:errors :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
[params]
@ -182,7 +182,7 @@
(do
(println (:explain error))
(st/emit! (dm/error (tr "errors.generic"))))))
(st/emit! (msg/error (tr "errors.generic"))))))
(defn- handle-register-success
[data]

View file

@ -7,7 +7,7 @@
(ns app.main.ui.auth.verify-token
(:require-macros [app.main.style :as stl])
(:require
[app.main.data.messages :as dm]
[app.main.data.messages :as msg]
[app.main.data.users :as du]
[app.main.repo :as rp]
[app.main.store :as st]
@ -25,13 +25,13 @@
(defmethod handle-token :verify-email
[data]
(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))))
(defmethod handle-token :change-email
[_data]
(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)
(du/fetch-profile))))
@ -44,7 +44,7 @@
(case (:state tdata)
:created
(st/emit!
(dm/success (tr "auth.notifications.team-invitation-accepted"))
(msg/success (tr "auth.notifications.team-invitation-accepted"))
(du/fetch-profile)
(rt/nav :dashboard-projects {:team-id (:team-id tdata)}))
@ -57,7 +57,7 @@
[_tdata]
(st/emit!
(rt/nav :auth-login)
(dm/warn (tr "errors.unexpected-token"))))
(msg/warn (tr "errors.unexpected-token"))))
(mf/defc verify-token
[{:keys [route] :as props}]
@ -79,17 +79,17 @@
(= :email-already-exists code)
(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)))
(= :email-already-validated code)
(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)))
:else
(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))))))))
(if @bad-token

View file

@ -9,7 +9,7 @@
[app.main.data.common :as dcm]
[app.main.data.dashboard :as dd]
[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.repo :as rp]
[app.main.store :as st]
@ -88,12 +88,12 @@
on-duplicate
(fn [_]
(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
(fn [_]
(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)))
on-delete
@ -126,8 +126,8 @@
on-move-success
(fn [team-id project-id]
(if multi?
(st/emit! (dm/success (tr "dashboard.success-move-files")))
(st/emit! (dm/success (tr "dashboard.success-move-file"))))
(st/emit! (msg/success (tr "dashboard.success-move-files")))
(st/emit! (msg/success (tr "dashboard.success-move-file"))))
(if (or navigate? (not= team-id current-team-id))
(st/emit! (dd/go-to-files team-id project-id))
(st/emit! (dd/fetch-recent-files team-id)

View file

@ -14,7 +14,6 @@
[app.main.refs :as refs]
[app.main.repo :as rp]
[app.main.store :as st]
[app.main.ui.components.context-menu-a11y :refer [context-menu-a11y]]
[app.main.ui.components.file-uploader :refer [file-uploader]]
[app.main.ui.icons :as i]
@ -139,7 +138,7 @@
(when problematic-fonts?
[: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)}
[:& i18n/tr-html {:tag-name "span"
:label "dashboard.fonts.warning-text"}]]])]]
@ -176,7 +175,7 @@
[:div {:class (stl/css :table-field :options)}
(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)
:class (stl/css-case :btn-primary true

View file

@ -256,40 +256,43 @@
}
.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;
display: grid;
grid-template-columns: $s-40 1fr;
background-color: $db-primary;
grid-template-columns: $s-16 1fr;
gap: $s-8;
padding: $s-8 $s-8 $s-8 $s-16;
border-radius: $br-12;
border: $s-1 solid $db-quaternary;
color: $df-primary;
border: $s-1 solid var(--border-color);
border-radius: $br-12;
background-color: var(--bg-color);
color: var(--fg-color);
font-size: $fs-12;
&:not(:last-child) {
margin-bottom: $s-12;
}
.icon {
display: flex;
align-items: flex-start;
justify-content: center;
padding-top: $s-12;
svg {
stroke: $df-secondary;
stroke: var(--icon-color);
fill: none;
height: $s-20;
width: $s-20;
height: $s-16;
width: $s-16;
}
}
.content {
margin: $s-12;
a {
color: $da-primary;
}
.content a {
color: $da-primary;
}
&.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 {
stroke: var(--element-foreground-warning);
}

View file

@ -9,7 +9,7 @@
(:require
[app.common.spec :as us]
[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.store :as st]
[app.main.ui.components.forms :as fm]
@ -29,22 +29,22 @@
(defn- on-create-success
[_form response]
(let [msg "Team created successfully"]
(st/emit! (dm/success msg)
(st/emit! (msg/success msg)
(modal/hide)
(rt/nav :dashboard-projects {:team-id (:id response)}))))
(defn- on-update-success
[_form _response]
(let [msg "Team created successfully"]
(st/emit! (dm/success msg)
(st/emit! (msg/success msg)
(modal/hide))))
(defn- on-error
[form _response]
(let [id (get-in @form [:clean-data :id])]
(if id
(rx/of (dm/error "Error on updating team."))
(rx/of (dm/error "Error on creating team.")))))
(rx/of (msg/error "Error on updating team."))
(rx/of (msg/error "Error on creating team.")))))
(defn- on-create-submit
[form]

View file

@ -17,6 +17,7 @@
(mf/defc notifications-hub
[]
(let [message (mf/deref refs/message)
on-close #(st/emit! dmsg/hide)
toast-message {:type (or (:type message) :info)
@ -33,16 +34,14 @@
:content (:content message)}
;; TODO review this options
is-toast-msg (some? (:timeout message))
actions? (some? (:actions message))
inline? (and (some? (:position message)) (= :floating (:position message)))
close? (and (some? (:controls message)) (= :close (:controls message)))]
is-toast-msg (or (= :toast (:notification-type message)) (some? (:timeout message)))
is-inline-msg (or (= :inline (:notification-type message)) (and (some? (:position message)) (= :floating (:position message))))]
(when message
(cond
(and close? is-toast-msg)
is-toast-msg
[:& toast-notification toast-message]
(and actions? inline?)
is-inline-msg
[:& inline-notification inline-message]
:else
[:& context-notification context-message]))))

View file

@ -42,21 +42,22 @@
[{:keys [type content links] :as props}]
[:aside {:class (stl/css-case :context-notification true
:warning (= type :warning)
:error (= type :error)
:success (= type :success)
:info (= type :info))}
:warning (= type :warning)
:error (= type :error)
:success (= type :success)
:info (= type :info))}
(get-icon-by-type type)
[:div {:class (stl/css :context-text)}
content]
[:nav {:class (stl/css :link-nav)}
(for [[index link] (d/enumerate links)]
;; TODO Review this component
[:& lb/link-button {:class (stl/css :link)
:on-click (:callback link)
:value (:label link)
:key (dm/str "link-" index)}])]])
(when (some? links)
[:nav {:class (stl/css :link-nav)}
(for [[index link] (d/enumerate links)]
;; TODO Review this component
[:& lb/link-button {:class (stl/css :link)
:on-click (:callback link)
:value (:label link)
:key (dm/str "link-" index)}])])])

View file

@ -18,7 +18,7 @@
width: 100%;
padding: $s-8 $s-8 $s-8 $s-16;
border: $s-1 solid var(--border-color);
border-radius: $br-12;
border-radius: $br-8;
background-color: var(--bg-color);
}

View file

@ -25,7 +25,7 @@
padding: $s-8 $s-8 $s-8 $s-16;
margin-inline: auto;
border: $s-1 solid var(--border-color);
border-radius: $br-12;
border-radius: $br-8;
z-index: $z-index-modal;
background-color: var(--bg-color);
color: var(--fg-color);

View file

@ -49,6 +49,7 @@
[{:keys [type content on-close links] :as props}]
[:aside {:class (stl/css-case :toast-notification true
:with-links (some? links)
:warning (= type :warning)
:error (= type :error)
:success (= type :success)

View file

@ -16,7 +16,7 @@
top: $s-16;
right: $s-16;
display: grid;
grid-template-columns: $s-16 auto 1fr auto;
grid-template-columns: $s-16 1fr auto;
gap: $s-8;
min-height: $s-32;
min-width: $s-500;
@ -24,11 +24,15 @@
padding: $s-8 $s-8 $s-8 $s-16;
border: $s-1 solid var(--border-color);
background-color: var(--bg-color);
border-radius: $br-12;
border-radius: $br-8;
color: var(--fg-color);
z-index: $z-index-alert;
}
.with-links {
grid-template-columns: $s-16 auto 1fr auto;
}
.warning {
--bg-color: var(--alert-background-color-warning);
--fg-color: var(--alert-text-foreground-color-warning);

View file

@ -7,7 +7,7 @@
(ns app.main.ui.onboarding.newsletter
(:require-macros [app.main.style :as stl])
(:require
[app.main.data.messages :as dm]
[app.main.data.messages :as msg]
[app.main.data.modal :as modal]
[app.main.data.users :as du]
[app.main.store :as st]
@ -33,7 +33,7 @@
(mf/deps @newsletter-updates @newsletter-news)
(fn []
(st/emit! (when (or @newsletter-updates @newsletter-news)
(dm/success message))
(msg/success message))
(modal/show {:type :onboarding-team})
(du/update-profile-props {:newsletter-updates @newsletter-updates :newsletter-news @newsletter-news}))))]

View file

@ -11,7 +11,7 @@
[app.common.spec :as us]
[app.main.data.dashboard :as dd]
[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.refs :as refs]
[app.main.store :as st]
@ -169,7 +169,7 @@
on-error
(mf/use-fn
(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
on-invite-later

View file

@ -8,7 +8,7 @@
(:require-macros [app.main.style :as stl])
(:require
[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.users :as du]
[app.main.store :as st]
@ -66,7 +66,7 @@
(fn [_]
(let [message (tr "dashboard.access-tokens.create.success")]
(st/emit! (du/fetch-access-tokens)
(dm/success message)
(msg/success message)
(reset! created? true)))))
on-close
@ -79,7 +79,7 @@
on-error
(mf/use-fn
(fn [_]
(st/emit! (dm/error (tr "errors.generic"))
(st/emit! (msg/error (tr "errors.generic"))
(modal/hide))))
on-submit
@ -101,9 +101,10 @@
(fn [event]
(dom/prevent-default event)
(wapi/write-to-clipboard (:token created))
(st/emit! (dm/show {:type :info
:content (tr "dashboard.access-tokens.copied-success")
:timeout 1000}))))]
(st/emit! (msg/show {:type :info
:notification-type :toast
:content (tr "dashboard.access-tokens.copied-success")
:timeout 7000}))))]
[:div {:class (stl/css :modal-overlay)}
[:div {:class (stl/css :modal-container)}

View file

@ -10,7 +10,7 @@
[app.common.data :as d]
[app.common.data.macros :as dma]
[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.users :as du]
[app.main.refs :as refs]
@ -47,11 +47,11 @@
(assoc-in data [:errors :email-1] error))))
: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
(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)))
@ -61,7 +61,7 @@
(st/emit! (du/fetch-profile)
(modal/hide))
(let [message (tr "notifications.validation-email-sent" (:email profile))]
(st/emit! (dm/info message)
(st/emit! (msg/info message)
(modal/hide)))))
(defn- on-submit

View file

@ -7,7 +7,7 @@
(ns app.main.ui.settings.delete-account
(:require-macros [app.main.style :as stl])
(:require
[app.main.data.messages :as dm]
[app.main.data.messages :as msg]
[app.main.data.modal :as modal]
[app.main.data.users :as du]
[app.main.store :as st]
@ -21,7 +21,7 @@
[{:keys [code] :as error}]
(if (= :owner-teams-with-people code)
(let [msg (tr "notifications.profile-deletion-not-allowed")]
(rx/of (dm/error msg)))
(rx/of (msg/error msg)))
(rx/throw error)))
(mf/defc delete-account-modal

View file

@ -9,7 +9,7 @@
(:require-macros [app.main.style :as stl])
(:require
[app.common.spec :as us]
[app.main.data.messages :as dm]
[app.main.data.messages :as msg]
[app.main.refs :as refs]
[app.main.repo :as rp]
[app.main.store :as st]
@ -39,7 +39,7 @@
(mf/deps profile)
(fn [_]
(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 {})))
on-error
@ -48,8 +48,8 @@
(fn [{:keys [code] :as error}]
(reset! loading false)
(if (= code :feedback-disabled)
(st/emit! (dm/error (tr "labels.feedback-disabled")))
(st/emit! (dm/error (tr "errors.generic"))))))
(st/emit! (msg/error (tr "labels.feedback-disabled")))
(st/emit! (msg/error (tr "errors.generic"))))))
on-submit
(mf/use-callback

View file

@ -8,7 +8,7 @@
(:require-macros [app.main.style :as stl])
(:require
[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.refs :as refs]
[app.main.store :as st]
@ -26,7 +26,7 @@
(defn- on-success
[_]
(st/emit! (dm/success (tr "notifications.profile-saved"))))
(st/emit! (msg/success (tr "notifications.profile-saved"))))
(defn- on-submit
[form _event]

View file

@ -8,7 +8,7 @@
(:require-macros [app.main.style :as stl])
(:require
[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.store :as st]
[app.main.ui.components.forms :as fm]
@ -28,7 +28,7 @@
{:message (tr "errors.email-as-password")})
(let [msg (tr "generic.error")]
(st/emit! (dm/error msg)))))
(st/emit! (msg/error msg)))))
(defn- on-success
[form]
@ -37,7 +37,7 @@
msg (tr "dashboard.notifications.password-saved")]
(dom/clean-value! password-old-node)
(dom/focus! password-old-node)
(st/emit! (dm/success msg))))
(st/emit! (msg/success msg))))
(defn- on-submit
[form event]

View file

@ -9,7 +9,7 @@
(:require
[app.common.spec :as us]
[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.users :as du]
[app.main.refs :as refs]
@ -29,7 +29,7 @@
(defn- on-success
[_]
(st/emit! (dm/success (tr "notifications.profile-saved"))))
(st/emit! (msg/success (tr "notifications.profile-saved"))))
(defn- on-submit
[form _event]