mirror of
https://github.com/status-im/open-bounty.git
synced 2025-02-03 05:03:38 +00:00
make sure long issue titles dont overlap other card content
This commit is contained in:
parent
08d6fa97d8
commit
f9b533ec0c
@ -1,6 +1,7 @@
|
|||||||
(ns commiteth.manage-payouts
|
(ns commiteth.manage-payouts
|
||||||
(:require [reagent.core :as r]
|
(:require [reagent.core :as r]
|
||||||
[re-frame.core :as rf]
|
[re-frame.core :as rf]
|
||||||
|
[goog.string :as gstring]
|
||||||
[commiteth.util :as util]
|
[commiteth.util :as util]
|
||||||
[commiteth.routes :as routes]
|
[commiteth.routes :as routes]
|
||||||
[commiteth.model.bounty :as bnt]
|
[commiteth.model.bounty :as bnt]
|
||||||
@ -206,10 +207,12 @@
|
|||||||
:pending-maintainer-confirmation :pending-maintainer-confirmation
|
:pending-maintainer-confirmation :pending-maintainer-confirmation
|
||||||
:paid :paid})
|
:paid :paid})
|
||||||
|
|
||||||
(defn bounty-title-link [bounty show-date?]
|
(defn bounty-title-link [bounty {:keys [show-date? max-length]}]
|
||||||
[:a {:href (common/issue-url (:repo-owner bounty) (:repo-name bounty) (:issue-number bounty))}
|
[:a {:href (common/issue-url (:repo-owner bounty) (:repo-name bounty) (:issue-number bounty))}
|
||||||
[:div.w-100.overflow-hidden
|
[:div.w-100.overflow-hidden
|
||||||
[:span.db.f5.pg-med.muted-blue.hover-black (:issue-title bounty)]
|
[:span.db.f5.pg-med.muted-blue.hover-black
|
||||||
|
(cond-> (:issue-title bounty)
|
||||||
|
max-length (gstring/truncate max-length))]
|
||||||
(when show-date?
|
(when show-date?
|
||||||
[:span.db.mt1.f7.gray.pg-book
|
[:span.db.mt1.f7.gray.pg-book
|
||||||
;;{:on-click #(do (.preventDefault %) (prn (dissoc bounty :claims)))}
|
;;{:on-click #(do (.preventDefault %) (prn (dissoc bounty :claims)))}
|
||||||
@ -227,7 +230,7 @@
|
|||||||
(defn unclaimed-bounty [bounty]
|
(defn unclaimed-bounty [bounty]
|
||||||
[:div.w-third-l.fl-l.pa2
|
[:div.w-third-l.fl-l.pa2
|
||||||
[square-card
|
[square-card
|
||||||
[bounty-title-link bounty true]
|
[bounty-title-link bounty {:show-date? true :max-length 100}]
|
||||||
[:div.f7
|
[:div.f7
|
||||||
[bounty-balance bounty]]]])
|
[bounty-balance bounty]]]])
|
||||||
|
|
||||||
@ -235,7 +238,7 @@
|
|||||||
[:div.w-third-l.fl-l.pa2
|
[:div.w-third-l.fl-l.pa2
|
||||||
[square-card
|
[square-card
|
||||||
[:div
|
[:div
|
||||||
[bounty-title-link bounty false]
|
[bounty-title-link bounty {:show-date? false :max-length 100}]
|
||||||
[:div.f6.mt1.gray
|
[:div.f6.mt1.gray
|
||||||
"Paid out to " [:span.pg-med.muted-blue "@" (:winner_login bounty)]]]
|
"Paid out to " [:span.pg-med.muted-blue "@" (:winner_login bounty)]]]
|
||||||
[:div.f7
|
[:div.f7
|
||||||
|
Loading…
x
Reference in New Issue
Block a user