                                              (write-ui app [:app-id] (<-- :id))
                                              (remote !loadapp {:id (<-- :id)})
                                              )
-                             } "Edit")
-
-                    ))))
+                             } "Edit")))))
+
+
 
 
 


               (button {:className    "btn btn-default"
                        :style       {:display "inline-block" :marginLeft "30px" :fontFamily "Ubuntu" :fontSize "1em" :marginTop "-0.3em"  }
                        :onClick     #(go
                                       (let [code (js/getCodeMirrorValue)]
                                         (remote !savecode {:id (read-ui app [:app-id]) :code code})
                                         (js/sendcode (str code))
                                         ))}
                       "Save")))

            (a {:target       "appshare.co"
                :style       {:textDecoration "underline" :float "right"  :display "inline-block" :marginRight "30px" :fontFamily "Ubuntu" :fontSize "2em" :marginTop "0.3em"}
                :href         (str "http://canlabs.com")}
               "AppShare.co")

            )
       (cond
         (or (= (read-ui app [:mode]) nil) (= (read-ui app [:mode]) "browse"))
         (component browser-component app [])

         (= (read-ui app [:mode]) "edit")
         (component editor-component app [])

         :else
         (div {} "Nothing selected"))))




                                         ))))


                      ; if we select a different app
                      :else
                      (do
                        (div {:onClick     #(go  (write-ui app [:submode] "editappname")
                                                 (write-ui app [:app-id] (<-- :id)))

                              :style {:display "inline-block" :fontFamily "Ubuntu" :fontWeight "700" :fontSize "1.3em" ::marginTop "0.7em"}}
                             (str (<-- :application_name)))))



