           [:span {:class-name "mdl-list__item-primary-content"}
            [:i {:class-name "material-icons mdl-list__item-icon"} "link"] "Github"]]]))
 
+(defcomponent Nav-buttons
+  [[current-view user-id] {:keys [navigate]}]
+  (html [:span {}
+         (let [disabled (= :view/login-user current-view)]
+           [:button {:title      "User login"
+                     :class-name (if disabled
+                                   "mdl-button mdl-js-button mdl-button--icon mdl-button--disabled"
+                                   "mdl-button mdl-js-button mdl-button--icon")
+                     :on-click   #(when-not disabled (go (>! navigate :view/login-user)))}
+            [:i {:class-name "material-icons"} (if disabled "person" "person_outline")]])
+
+         (let [disabled (or (= :view/browse-scenes current-view)
+                            (nil? user-id))]
+           [:button {:title      "Browse scenes"
+                     :class-name (if disabled
+                                   "mdl-button mdl-js-button mdl-button--icon mdl-button--disabled"
+                                   "mdl-button mdl-js-button mdl-button--icon")
+                     :on-click   #(when-not disabled (go (>! navigate :view/browse-scenes)))}
+            [:i {:class-name "material-icons"} (if disabled "folder" "folder_open")]])
+
+         (let [disabled (or (= :view/create-scene current-view)
+                            (nil? user-id))]
+           [:button {:title      "Create scene"
+                     :class-name (if disabled
+                                   "mdl-button mdl-js-button mdl-button--icon mdl-button--disabled"
+                                   "mdl-button mdl-js-button mdl-button--icon")
+                     :on-click   #(when-not disabled (go (>! navigate :view/create-scene)))}
+            [:i {:class-name "material-icons"} (if disabled "insert_drive_file" "note_add")]])
+
+         (let [disabled (or (= :view/edit-config current-view)
+                            (nil? user-id))]
+           [:button {:title      "Configuration"
+                     :class-name (if disabled
+                                   "mdl-button mdl-js-button mdl-button--icon mdl-button--disabled"
+                                   "mdl-button mdl-js-button mdl-button--icon")
+                     :on-click   #(when-not disabled (go (>! navigate :view/edit-config)))}
+            [:i {:class-name "material-icons"} "settings"]])]))
+
 (defcomponent Header
   [state {:keys [add-plot fill-plots] :as cmd-chans}]
   (html [:header {:class-name "mdl-layout__header"}

          #_(Drawer state cmd-chans)

          (case (m/current-view state)
            :view/browse-scenes [:h1 {} "browse-scenes"]
            :view/create-scene  [:h1 {} "create-scene"]
            :view/edit-scene    (Grid state cmd-chans)
            :view/edit-config   [:h1 {} "edit-config"]

                                [:h1 {} "uh-oh"])

          ]]))

(defn view
  "Returns a stream of view trees, represented as a core.async channel."

            [sablono.core :refer-macros [html]]
            [foreign.sigma]
            [foreign.linkurious]
            [plongeur.route :as r]
            [plongeur.model :as m]
            [plongeur.sigma :as s]
            [plongeur.config :as c]
            [kierros.async :refer [debounce]]
            [dommy.core :as d :refer-macros [sel sel1]])
  (:require-macros [cljs.core.async.macros :refer [go go-loop]]))

(defn ascii [c] (-> c {\f 70
