[Fixes: #12060] Highlight posts that mention you
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
e30ca97184
commit
152407b903
|
@ -9,21 +9,25 @@
|
||||||
b (js/parseInt (subs hex 4 6) 16)]
|
b (js/parseInt (subs hex 4 6) 16)]
|
||||||
(str "rgba(" r "," g "," b "," opacity ")")))
|
(str "rgba(" r "," g "," b "," opacity ")")))
|
||||||
|
|
||||||
(def dark {:white "#141414"
|
(def dark {:white "#141414"
|
||||||
:black "#ffffff"
|
:black "#ffffff"
|
||||||
:gray-lighter "#252528"
|
:gray-lighter "#252528"
|
||||||
:blue "#6177E5"
|
:mentioned-background "#2a4046"
|
||||||
:gray "#838C91"
|
:mentioned-border "#2a4046"
|
||||||
:blue-light "#23252F"
|
:blue "#6177E5"
|
||||||
:red "#FC5F5F"})
|
:gray "#838C91"
|
||||||
|
:blue-light "#23252F"
|
||||||
|
:red "#FC5F5F"})
|
||||||
|
|
||||||
(def light {:white "#ffffff"
|
(def light {:white "#ffffff"
|
||||||
:black "#000000"
|
:black "#000000"
|
||||||
:gray-lighter "#eef2f5"
|
:gray-lighter "#eef2f5"
|
||||||
:blue "#4360df"
|
:blue "#4360df"
|
||||||
:gray "#939ba1"
|
:gray "#939ba1"
|
||||||
:blue-light "#ECEFFC"
|
:mentioned-background "#def6fc"
|
||||||
:red "#ff2d55"})
|
:mentioned-border "#b8ecf9"
|
||||||
|
:blue-light "#ECEFFC"
|
||||||
|
:red "#ff2d55"})
|
||||||
|
|
||||||
(def themes {:dark dark :light light})
|
(def themes {:dark dark :light light})
|
||||||
|
|
||||||
|
@ -36,6 +40,9 @@
|
||||||
(def white-transparent-70 (alpha white 0.7))
|
(def white-transparent-70 (alpha white 0.7))
|
||||||
(def white-transparent-70-persist (alpha white 0.7))
|
(def white-transparent-70-persist (alpha white 0.7))
|
||||||
|
|
||||||
|
(def mentioned-background (:mentioned-background light))
|
||||||
|
(def mentioned-border (:mentioned-border light))
|
||||||
|
|
||||||
(def red-light "#ffe5ea") ;; error tooltip TODO (andrey) should be white, but shadow needed
|
(def red-light "#ffe5ea") ;; error tooltip TODO (andrey) should be white, but shadow needed
|
||||||
|
|
||||||
;; BLACK
|
;; BLACK
|
||||||
|
@ -116,6 +123,8 @@
|
||||||
(set! blue-light (:blue-light colors))
|
(set! blue-light (:blue-light colors))
|
||||||
(set! red (:red colors))
|
(set! red (:red colors))
|
||||||
(set! text black)
|
(set! text black)
|
||||||
|
(set! mentioned-background (:mentioned-background colors))
|
||||||
|
(set! mentioned-border (:mentioned-border colors))
|
||||||
(set! white-transparent-10 (alpha white 0.1))
|
(set! white-transparent-10 (alpha white 0.1))
|
||||||
(set! white-transparent (alpha white 0.4))
|
(set! white-transparent (alpha white 0.4))
|
||||||
(set! white-transparent-70 (alpha white 0.7))
|
(set! white-transparent-70 (alpha white 0.7))
|
||||||
|
|
|
@ -342,7 +342,7 @@
|
||||||
(get content :parsed-text)))
|
(get content :parsed-text)))
|
||||||
:label (i18n/label :t/sharing-copy-to-clipboard)}])))
|
:label (i18n/label :t/sharing-copy-to-clipboard)}])))
|
||||||
|
|
||||||
(defn collapsible-text-message [_ _]
|
(defn collapsible-text-message [{:keys [mentioned]} _]
|
||||||
(let [collapsed? (reagent/atom false)
|
(let [collapsed? (reagent/atom false)
|
||||||
collapsible? (reagent/atom false)]
|
collapsible? (reagent/atom false)]
|
||||||
(fn [{:keys [content outgoing current-public-key public?] :as message} on-long-press modal]
|
(fn [{:keys [content outgoing current-public-key public?] :as message} on-long-press modal]
|
||||||
|
@ -377,16 +377,17 @@
|
||||||
[message-timestamp message true])
|
[message-timestamp message true])
|
||||||
(when (and @collapsible? (not modal))
|
(when (and @collapsible? (not modal))
|
||||||
(if @collapsed?
|
(if @collapsed?
|
||||||
[react/touchable-highlight
|
(let [color (if mentioned colors/mentioned-background colors/blue-light)]
|
||||||
{:on-press #(swap! collapsed? not)
|
[react/touchable-highlight
|
||||||
:style {:position :absolute :bottom 0 :left 0 :right 0 :height 72}}
|
{:on-press #(swap! collapsed? not)
|
||||||
[react/linear-gradient {:colors [(str colors/blue-light "00") colors/blue-light]
|
:style {:position :absolute :bottom 0 :left 0 :right 0 :height 72}}
|
||||||
:start {:x 0 :y 0} :end {:x 0 :y 0.9}}
|
[react/linear-gradient {:colors [(str color "00") color]
|
||||||
[react/view {:height 72 :align-self :center :justify-content :flex-end
|
:start {:x 0 :y 0} :end {:x 0 :y 0.9}}
|
||||||
:padding-bottom 10}
|
[react/view {:height 72 :align-self :center :justify-content :flex-end
|
||||||
[react/view (style/collapse-button)
|
:padding-bottom 10}
|
||||||
[icons/icon :main-icons/dropdown
|
[react/view (style/collapse-button)
|
||||||
{:color colors/white}]]]]]
|
[icons/icon :main-icons/dropdown
|
||||||
|
{:color colors/white}]]]]])
|
||||||
[react/touchable-highlight {:on-press #(swap! collapsed? not)
|
[react/touchable-highlight {:on-press #(swap! collapsed? not)
|
||||||
:style {:align-self :center :margin 5}}
|
:style {:align-self :center :margin 5}}
|
||||||
[react/view (style/collapse-button)
|
[react/view (style/collapse-button)
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
:shadow-offset {:width 0 :height 4}})
|
:shadow-offset {:width 0 :height 4}})
|
||||||
|
|
||||||
(defn message-view
|
(defn message-view
|
||||||
[{:keys [content-type outgoing group-chat last-in-group?]}]
|
[{:keys [content-type outgoing group-chat last-in-group? mentioned]}]
|
||||||
(merge
|
(merge
|
||||||
{:border-top-left-radius 16
|
{:border-top-left-radius 16
|
||||||
:border-top-right-radius 16
|
:border-top-right-radius 16
|
||||||
|
@ -136,6 +136,9 @@
|
||||||
(cond
|
(cond
|
||||||
(= content-type constants/content-type-system-text) nil
|
(= content-type constants/content-type-system-text) nil
|
||||||
outgoing {:background-color colors/blue}
|
outgoing {:background-color colors/blue}
|
||||||
|
mentioned {:background-color colors/mentioned-background
|
||||||
|
:border-color colors/mentioned-border
|
||||||
|
:border-width 1}
|
||||||
:else {:background-color colors/blue-light})
|
:else {:background-color colors/blue-light})
|
||||||
|
|
||||||
(when (= content-type constants/content-type-emoji)
|
(when (= content-type constants/content-type-emoji)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
|
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
|
||||||
"owner": "status-im",
|
"owner": "status-im",
|
||||||
"repo": "status-go",
|
"repo": "status-go",
|
||||||
"version": "v0.79.4",
|
"version": "v0.79.5",
|
||||||
"commit-sha1": "d1dc5f1e272b72d84a8c6bee1fe09de6c7d6fd1e",
|
"commit-sha1": "dfd46680879954fed29f18863354139d3d2ff34b",
|
||||||
"src-sha256": "04nszlhn33p0szqpd115h50gcgw3jm3yjrvqv028ry1zzn4r8k6a"
|
"src-sha256": "0v5v32zvazcr1fnv8j08pknwz7567i6brhyr51x42al1an9jdkqj"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue