Use ES6 template strings
This commit is contained in:
@@ -68,13 +68,13 @@ Rectangle {
|
||||
}
|
||||
|
||||
HToolTip {
|
||||
text: name && topic ? (name + "<br>" + topic) : (name || topic)
|
||||
text: name && topic ? (`${name}<br>${topic}`) : (name || topic)
|
||||
label.textFormat: Text.StyledText
|
||||
visible: text && (nameHover.hovered || topicHover.hovered)
|
||||
|
||||
readonly property string name:
|
||||
roomName.truncated ?
|
||||
("<b>" + chatPage.roomInfo.display_name + "</b>") : ""
|
||||
(`<b>${chatPage.roomInfo.display_name}</b>`) : ""
|
||||
readonly property string topic:
|
||||
roomTopic.truncated ? chatPage.roomInfo.topic : ""
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ HRowLayout {
|
||||
readonly property string timeText: Utils.formatTime(model.date, false)
|
||||
readonly property string localEchoText:
|
||||
model.is_local_echo ?
|
||||
" <font size=" + theme.fontSize.small + "px>⏳</font>" :
|
||||
` <font size=${theme.fontSize.small}px>⏳</font>` :
|
||||
""
|
||||
|
||||
readonly property bool pureMedia: ! contentText && linksRepeater.count
|
||||
@@ -97,15 +97,14 @@ HRowLayout {
|
||||
// For some reason, if there's only one space,
|
||||
// times will be on their own lines most of the time.
|
||||
" " +
|
||||
"<font size=" + theme.fontSize.small +
|
||||
"px color=" + theme.chat.message.date + '>' +
|
||||
`<font size=${theme.fontSize.small}px ` +
|
||||
`color=${theme.chat.message.date}>` +
|
||||
timeText +
|
||||
"</font>" +
|
||||
|
||||
// Local echo icon
|
||||
(model.is_local_echo ?
|
||||
" <font size=" + theme.fontSize.small +
|
||||
"px>⏳</font>" : "")
|
||||
` <font size=${theme.fontSize.small}px>⏳</font>` : "")
|
||||
|
||||
transform: Translate { x: xOffset }
|
||||
|
||||
|
Reference in New Issue
Block a user