2021-02-09 17:09:25 -04:00
|
|
|
import QtQuick 2.14
|
2020-07-15 17:04:14 -04:00
|
|
|
import "../../../../../shared"
|
2021-02-09 17:09:25 -04:00
|
|
|
import "../../../../../shared/status"
|
2020-07-15 17:04:14 -04:00
|
|
|
import "../../../../../imports"
|
|
|
|
|
2021-02-10 08:45:56 -04:00
|
|
|
StyledText {
|
2020-12-22 11:22:04 +01:00
|
|
|
property bool formatDateTime: false
|
2020-07-15 17:04:14 -04:00
|
|
|
id: chatTime
|
2020-07-20 13:34:20 -04:00
|
|
|
visible: isMessage
|
2021-02-19 10:20:26 -05:00
|
|
|
color: isImage ? Style.current.white : Style.current.secondaryText
|
2021-04-15 13:41:14 +02:00
|
|
|
text: formatDateTime ? Utils.formatDateTime(timestamp, globalSettings.locale) : Utils.formatTime(timestamp, globalSettings.locale)
|
2020-11-25 11:46:18 +01:00
|
|
|
font.pixelSize: Style.current.asideTextFontSize
|
2021-02-10 08:45:56 -04:00
|
|
|
|
2021-02-09 17:09:25 -04:00
|
|
|
StatusToolTip {
|
|
|
|
visible: hhandler.hovered
|
2021-04-15 13:41:14 +02:00
|
|
|
text: new Date(parseInt(timestamp, 10)).toLocaleString(Qt.locale(globalSettings.locale))
|
2021-03-25 11:08:25 -04:00
|
|
|
maxWidth: 350
|
2021-02-09 17:09:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
HoverHandler {
|
|
|
|
id: hhandler
|
|
|
|
}
|
2020-07-15 17:04:14 -04:00
|
|
|
}
|