mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 23:26:39 +02:00
🐛 Show proper profile photo just after login.
This commit is contained in:
parent
8446ad13cb
commit
a5592dfe04
3 changed files with 4 additions and 3 deletions
|
@ -89,7 +89,8 @@
|
||||||
|
|
||||||
(defn- retrieve-profile-by-email
|
(defn- retrieve-profile-by-email
|
||||||
[conn email]
|
[conn email]
|
||||||
(db/query-one conn [sql:profile-by-email email]))
|
(-> (db/query-one conn [sql:profile-by-email email])
|
||||||
|
(p/then #(images/resolve-media-uris % [:photo :photo-uri]))))
|
||||||
|
|
||||||
|
|
||||||
;; --- Mutation: Update Profile (own)
|
;; --- Mutation: Update Profile (own)
|
||||||
|
|
|
@ -94,4 +94,4 @@
|
||||||
(defn strip-private-attrs
|
(defn strip-private-attrs
|
||||||
"Only selects a publicy visible profile attrs."
|
"Only selects a publicy visible profile attrs."
|
||||||
[profile]
|
[profile]
|
||||||
(select-keys profile [:id :fullname :lang :email :created-at :photo :theme]))
|
(select-keys profile [:id :fullname :lang :email :created-at :photo :theme :photo-uri]))
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
(ptk/reify ::clear-user-data
|
(ptk/reify ::clear-user-data
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(select-keys state [:route :router :session-id]))
|
(select-keys state [:route :router :session-id :history]))
|
||||||
|
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state s]
|
(watch [_ state s]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue