adjust value-usd check

This commit is contained in:
Rob Culliton 2018-05-05 21:33:29 -04:00
parent 4db70dfc41
commit 356e344026
No known key found for this signature in database
GPG Key ID: 6FDEF60B3DC84D94

View File

@ -249,20 +249,18 @@
[:span.pt2 [:span.pt2
[:img.o-50.pl3.pt2 {:src image-src}]]) [:img.o-50.pl3.pt2 {:src image-src}]])
(defn three-dots [bounty] (defn three-dots []
(let [{:keys [issue-id value-usd]} bounty] [:div.fl.w-20
(when (pos? value-usd) [:div
[:div.fl.w-20 {:on-click #(rf/dispatch [:three-dots-open])}
[:div [three-dots-box "ic-more-vert-black-24dp-1x.png"]]])
{:on-click #(rf/dispatch [:three-dots-open])}
[three-dots-box "ic-more-vert-black-24dp-1x.png"]]])))
(defn revoke-dropdown [bounty] (defn revoke-dropdown [bounty]
(let [menu (if @(rf/subscribe [:three-dots-open?]) (let [menu (if @(rf/subscribe [:three-dots-open?])
[:div.ui.menu.revoke-transition {:tab-index -1}] [:div.ui.menu.revoke-transition {:tab-index -1}]
[:div.ui.menu.transition.hidden])] [:div.ui.menu.transition.hidden])]
[:div [:div
[three-dots bounty] [three-dots]
(into menu [[:div.revoke-item (into menu [[:div.revoke-item
[:a [:a
{:on-click #(rf/dispatch [:revoke-bounty {:issue-id (:issue-id bounty)}])} {:on-click #(rf/dispatch [:revoke-bounty {:issue-id (:issue-id bounty)}])}
@ -272,7 +270,9 @@
[:div.w-third-l.fl-l.pa2 [:div.w-third-l.fl-l.pa2
[square-card [square-card
[bounty-title-link bounty {:show-date? true :max-length 60}] [bounty-title-link bounty {:show-date? true :max-length 60}]
[:div [small-card-balances bounty] [revoke-dropdown bounty]]]]) [:div [small-card-balances bounty]
(when (pos? (:value-usd bounty))
[revoke-dropdown bounty])]]])
(defn paid-bounty [bounty] (defn paid-bounty [bounty]
[:div.w-third-l.fl-l.pa2 [:div.w-third-l.fl-l.pa2