fix: deleted-by user name style (#15218)

This commit is contained in:
yqrashawn 2023-03-01 15:03:27 +08:00 committed by GitHub
parent b72f0d4702
commit 2ce4a820d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 25 deletions

View File

@ -3,8 +3,8 @@
[quo2.components.icon :as icons]
[quo2.components.markdown.text :as text]
[quo2.components.messages.author.style :as style]
[react-native.core :as rn]
[quo2.foundations.colors :as colors]))
[quo2.foundations.colors :as colors]
[react-native.core :as rn]))
(def middle-dot "·")
@ -17,17 +17,20 @@
[text/text
{:weight :semi-bold
:size :paragraph-2
:number-of-lines 1
:style {:color (colors/theme-colors colors/neutral-100 colors/white)}}
primary-name]
(when (not (string/blank? secondary-name))
[:<>
[text/text
{:size :paragraph-2
:number-of-lines 1
:style style/middle-dot-nickname}
middle-dot]
[text/text
{:weight :medium
:size :paragraph-2
:number-of-lines 1
:style {:color (colors/theme-colors colors/neutral-60 colors/neutral-40)}}
secondary-name]])]
(when contact?
@ -46,21 +49,25 @@
{:size 12
:no-color true
:container-style style/icon-container}])
(when-not verified?
(when (and (not verified?) short-chat-key)
[text/text
{:monospace true
:size :paragraph-2
:number-of-lines 1
:style style/chat-key-text}
short-chat-key])
(when (and (not verified?) time-str)
[text/text
{:monospace true
:size :paragraph-2
:number-of-lines 1
:style style/middle-dot-chat-key}
middle-dot])
(when time-str
[text/text
{:monospace true
:size :paragraph-2
:accessibility-label :message-timestamp
:number-of-lines 1
:style (style/time-text verified?)}
time-str]])])
time-str])])])

View File

@ -7,7 +7,11 @@
(defn user-xxx-deleted-this-message
[{:keys [display-name profile-picture]}]
[rn/view {:style {:flex-direction :row :align-items :center :flex 1 :flex-wrap :wrap}}
[rn/view
{:style {:flex-direction :row
:align-items :center
:flex 1
:flex-wrap :wrap}}
[rn/view {:style {:margin-right 4}}
[quo/user-avatar
{:full-name display-name
@ -16,7 +20,10 @@
:ring? false
:size :xxxs}]]
[quo/author {:primary-name display-name}]
[quo/text {:style {:margin-left 4} :size :paragraph-2}
[quo/text
{:style {:margin-left 4}
:size :paragraph-2
:number-of-lines 1}
(i18n/label :t/deleted-this-message)]])
(defn- compute-on-long-press-fn