From 892b474e8b38ed98422a1d5507cee98e837658ee Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 24 Feb 2016 17:24:49 +0200 Subject: [PATCH] Add logout interaction to the user menu on header. --- src/uxbox/ui/users.cljs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/uxbox/ui/users.cljs b/src/uxbox/ui/users.cljs index f311b47e3..48531c23b 100644 --- a/src/uxbox/ui/users.cljs +++ b/src/uxbox/ui/users.cljs @@ -3,8 +3,10 @@ [cats.labs.lens :as l] [rum.core :as rum] [uxbox.router :as r] + [uxbox.rstore :as rs] [uxbox.state :as s] - [uxbox.ui.icons :as icons] + [uxbox.data.auth :as da] + [uxbox.ui.icons :as i] [uxbox.ui.navigation :as nav] [uxbox.ui.mixins :as mx])) @@ -18,20 +20,20 @@ [:ul.dropdown {:class (when-not open? "hide")} [:li - icons/page + i/page [:span "Page settings"]] [:li - icons/grid + i/grid [:span "Grid settings"]] [:li - icons/eye + i/eye [:span "Preview"]] [:li - icons/user + i/user [:span "Your account"]] - [:li - icons/exit - [:span "Save & Exit"]]])) + [:li {:on-click #(rs/emit! (da/logout))} + i/exit + [:span "Exit"]]])) (def user-menu (mx/component