Skip to content

Instantly share code, notes, and snippets.

@ul
Created January 30, 2015 06:25
Show Gist options
  • Save ul/a5ab595cb810445b6aa0 to your computer and use it in GitHub Desktop.
Save ul/a5ab595cb810445b6aa0 to your computer and use it in GitHub Desktop.
cljfmt 0.1.3 discard reader macro fix error
(ns vion.page.calling)
(def video-css {:text-align "center"
:background-image "none"
:height "240px"})
(def voice-css {:background-image "url(/img/chat-audio.png)"
:height "141px"})
(defelem calling [{:keys [t state telecom]} _]
(let [call-status (cell= (get-in state [:telecom :call-status]))
video? (cell= (get-in state [:telecom :video?]))]
(div
(div :id "call-video-container"
:toggle (cell= (= :connected call-status))
:css (cell= (if video? video-css voice-css)))
(div :class "win__footer"
(button :class "r-btn r-btn_up"
:toggle (cell= (not= :connected call-status))
:click #(telecom :call :accept)
(span))
(button :class "r-btn r-btn_down"
:click #(telecom :call :reject)
(span))
#_[:tag :list][:format-string "(%s)"][:wrap-length 2][:seq-fn #<seq$list_node$fn__1563 rewrite_clj.node.seq$list_node$fn__1563@58399d82>][:children (<token: button> <whitespace: " "> <token: :class> <whitespace: " "> <token: "r-btn r-btn_arr"> <newline: "\n"> <token: :click> <whitespace: " "> <fn: #(js/alert "Ooops, FIXME")> <newline: "\n"> <list: (span)>)]))))
(ns vion.page.calling)
(def video-css {:text-align "center"
:background-image "none"
:height "240px"})
(def voice-css {:background-image "url(/img/chat-audio.png)"
:height "141px"})
(defelem calling [{:keys [t state telecom]} _]
(let [call-status (cell= (get-in state [:telecom :call-status]))
video? (cell= (get-in state [:telecom :video?]))]
(div
(div :id "call-video-container"
:toggle (cell= (= :connected call-status))
:css (cell= (if video? video-css voice-css)))
(div :class "win__footer"
(button :class "r-btn r-btn_up"
:toggle (cell= (not= :connected call-status))
:click #(telecom :call :accept)
(span))
(button :class "r-btn r-btn_down"
:click #(telecom :call :reject)
(span))
#_(button :class "r-btn r-btn_arr"
:click #(js/alert "Ooops, FIXME")
(span))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment