Compare commits

..
46 changed files with 703 additions and 22228 deletions
-3
View File
@@ -2,9 +2,6 @@
> An emerging reusable QML UI component library for Status applications.
:bangbang: | This repository is set to read-only. `StatusQ` library is further developed in the [status-desktop](https://github.com/status-im/status-desktop) repository.
:---: | :---
## Usage
StatusQ introduces a module namespace that semantically groups components so they can be easily imported.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

+2 -48
View File
@@ -21,37 +21,18 @@ Column {
StatusButton {
text: "Button"
type: StatusBaseButton.Type.Primary
StatusToolTip {
visible: parent.hovered
text: "Look I'm a tooltip on a button!"
}
onClicked: console.warn("Primary button clicked")
onPressed: console.warn("Primary button pressed")
}
StatusButton {
text: "Button"
enabled: false
type: StatusBaseButton.Type.Primary
StatusToolTip {
visible: parent.hovered
text: "Tooltip on a disabled button, should not be visible!"
}
onClicked: console.warn("Primary disabled button clicked, this should not happen !!!")
}
StatusButton {
text: "Button"
loading: true
type: StatusBaseButton.Type.Primary
StatusToolTip {
visible: parent.hovered
text: "Look I'm a tooltip on a loading button!"
}
onClicked: console.warn("Primary loading button clicked, this should not happen !!!")
}
// Large
@@ -69,25 +50,6 @@ Column {
loading: true
}
// Large + Icon
StatusButton {
text: "Button"
icon.name: "info"
}
StatusButton {
text: "Button"
enabled: false
icon.name: "info"
}
StatusButton {
text: "Button"
loading: true
icon.name: "info"
}
// Danger
StatusButton {
text: "Button"
type: StatusBaseButton.Type.Danger
@@ -105,7 +67,6 @@ Column {
type: StatusBaseButton.Type.Danger
}
// Flat
StatusFlatButton {
text: "Button"
}
@@ -113,6 +74,7 @@ Column {
StatusFlatButton {
text: "Button"
enabled: false
}
StatusFlatButton {
@@ -120,7 +82,6 @@ Column {
loading: true
}
// Flat + Danger
StatusFlatButton {
text: "Button"
type: StatusBaseButton.Type.Danger
@@ -156,7 +117,6 @@ Column {
loading: true
}
// Small + danger
StatusButton {
text: "Button"
type: StatusBaseButton.Type.Danger
@@ -177,7 +137,6 @@ Column {
loading: true
}
// Flat + small
StatusFlatButton {
text: "Button"
size: StatusBaseButton.Size.Small
@@ -400,12 +359,7 @@ Column {
// Button with emoji
StatusButton {
text: "Button with Emoji"
asset.emoji: "🖼️"
}
StatusButton {
width: parent.width
text: "wide"
icon.emoji: "🖼️"
}
RowLayout {
+2 -10
View File
@@ -150,13 +150,13 @@ GridLayout {
implicitHeight: 48
StatusChatInfoButton {
title: "Iuri Matias elided"
subTitle: "Very long subtitle should elide as well"
subTitle: "Contact"
asset.color: Theme.palette.miscColor7
asset.isImage: true
asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
type: StatusChatInfoButton.Type.OneToOneChat
muted: true
pinnedMessagesCount: 10
pinnedMessagesCount: 1
width: 100
}
}
@@ -199,14 +199,6 @@ GridLayout {
type: StatusChatInfoButton.Type.CommunityChat
}
StatusChatInfoButton {
title: "community-channel"
subTitle: "Some very long description text to see how the whole item wraps or elides"
asset.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.CommunityChat
pinnedMessagesCount: 3
}
StatusSlider {
width: 360
from: 0
+8 -26
View File
@@ -28,8 +28,8 @@ Column {
headerContent: StatusChatInfoButton {
width: Math.min(implicitWidth, parent.width)
title: "Muted public chat"
subTitle: "Some subtitle"
title: "Some contact"
subTitle: "Contact"
asset.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.PublicChat
pinnedMessagesCount: 1
@@ -44,35 +44,14 @@ Column {
headerContent: StatusChatInfoButton {
width: Math.min(implicitWidth, parent.width)
title: "Group chat"
subTitle: "Group chat subtitle"
title: "Some contact"
subTitle: "Contact"
asset.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.GroupChat
type: StatusChatInfoButton.Type.OneToOneChat
pinnedMessagesCount: 1
}
}
StatusToolBar {
width: 518
headerContent: StatusChatInfoButton {
title: "Community chat"
subTitle: "Some very long description text to see how the whole item wraps or ellides"
asset.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.CommunityChat
pinnedMessagesCount: 3
}
}
StatusToolBar {
headerContent: StatusChatInfoButton {
title: "Very long chat name"
asset.color: Theme.palette.miscColor7
type: StatusChatInfoButton.Type.CommunityChat
pinnedMessagesCount: 1234567891
}
}
StatusToolBar {
notificationCount: 1
width: 518
@@ -494,5 +473,8 @@ Column {
}
}
}
}
}
-38
View File
@@ -576,42 +576,4 @@ ColumnLayout {
asset.isLetterIdenticon: true
loadingFailed: true
}
StatusListItem {
implicitWidth: 600
title: "List Item with Tags"
subTitle: "03:32"
asset.isLetterIdenticon: true
inlineTagModel: 6
inlineTagDelegate: StatusListItemTag {
height: 24
title: "tag"
asset.isLetterIdenticon: true
}
components: [
ColumnLayout {
Row {
Layout.alignment: Qt.AlignRight
spacing: 4
StatusIcon {
color: Theme.palette.successColor1
icon: "arrow-up"
rotation: 135
height: 18
}
StatusBaseText {
text: "0.0000015 ETH"
font.pixelSize: 15
color: Theme.palette.directColor1
}
}
StatusBaseText {
Layout.alignment: Qt.AlignRight
text: "1201.10 USD"
font.pixelSize: 15
color: Theme.palette.baseColor1
}
}
]
}
}
+4 -4
View File
@@ -419,11 +419,11 @@ Column {
topPadding: 8
bottomPadding: 0
implicitHeight: 32
leftPadding: 4
defaultLeftPadding: 4
text: name
asset.emoji: !!emoji ? emoji: ""
asset.emojiSize: Emoji.size.middle
asset.name: !emoji ? "filled-account": ""
icon.emoji: !!emoji ? emoji: ""
icon.emojiSize: Emoji.size.middle
icon.name: !emoji ? "filled-account": ""
normalColor: "transparent"
highlighted: index === floatingHeader.currentIndex
onClicked: {
+5 -4
View File
@@ -40,8 +40,9 @@ ListView {
messageContent: model.messageContent
amISender: model.amIsender
sender.id: model.senderId
sender.displayName: model.senderDisplayName
sender.secondaryName: model.senderOptionalName
sender.userName: model.userName
sender.localName: model.localName
sender.ensName: model.ensName
sender.isContact: model.isContact
sender.trustIndicator: model.trustIndicator
sender.profileImage: StatusProfileImageSettings {
@@ -67,8 +68,8 @@ ListView {
replyDetails: StatusMessageDetails {
amISender: model.isReply && model.replyAmISender
sender.id: model.replySenderId || ""
sender.displayName: model.isReply ? model.replySenderName: ""
sender.secondaryName: model.isReply ? model.replySenderEnsName : ""
sender.userName: model.isReply ? model.replySenderName: ""
sender.ensName: model.isReply ? model.replySenderEnsName : ""
sender.profileImage: StatusProfileImageSettings {
width: 20
height: 20
+7 -1
View File
@@ -70,6 +70,12 @@ Page {
Component.onCompleted: {
textEdit.forceActiveFocus();
sortModel(root.contactsModel);
//add admin tag
namesModel.append({
"pubKey": "0x043a7ed78362567894688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04",
"name": "carmen.eth",
"tagIcon": "crown",
"isReadonly": true});
}
}
@@ -77,7 +83,7 @@ Page {
implicitWidth: 106
implicitHeight: 44
Layout.alignment: Qt.AlignTop
enabled: (tagSelector.namesModel.count > 0)
enabled: (tagSelector.namesModel.count > 1)
text: "Confirm"
}
@@ -44,6 +44,8 @@ StatusSectionLayout {
spacing: 18
StatusBaseText {
Layout.topMargin: d.layoutVMargin
Layout.leftMargin: d.layoutHMargin
text: qsTr("Find community")
font.weight: Font.Bold
font.pixelSize: d.titlePixelSize
+70 -92
View File
@@ -437,8 +437,9 @@ QtObject {
timestamp: "1656937930"
amIsender: false
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
senderDisplayName: "Ferocious Herringbone Sinewave"
senderOptionalName: ""
userName: "Ferocious Herringbone Sinewave"
ensName: ""
localName: ""
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
contentType: StatusMessage.ContentType.Text
@@ -464,8 +465,9 @@ QtObject {
timestamp: "1657937930"
amIsender: false
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
senderDisplayName: "Teenage Mutant Turtle"
senderOptionalName: ""
userName: "Teenage Mutant Turtle"
ensName: ""
localName: ""
profileImage: ""
contentType: StatusMessage.ContentType.Text
message: 'Simple text message'
@@ -490,8 +492,9 @@ QtObject {
timestamp: "1657937930"
amIsender: false
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
senderDisplayName: "Bro from work"
senderOptionalName: "Teenage Mutant Turtle"
userName: "Teenage Mutant Turtle"
ensName: ""
localName: "Bro from work"
profileImage: ""
contentType: StatusMessage.ContentType.Text
message: '<code>Renamed, contact</code>'
@@ -516,8 +519,9 @@ QtObject {
timestamp: "1657937930"
amIsender: false
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
senderOptionalName: "@turtle.statusofus.eth"
senderDisplayName: "Bro from work"
userName: "Teenage Mutant Turtle"
ensName: "@turtle.statusofus.eth"
localName: "Bro from work"
profileImage: ""
contentType: StatusMessage.ContentType.Text
message: '<code>ENS, Renamed, Contact, Untrustworthy</code>'
@@ -542,8 +546,9 @@ QtObject {
timestamp: "1658937930"
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
amIsender: false
senderOptionalName: "@turtle.statusofus.eth"
senderDisplayName: "Bro from work"
userName: "Teenage Mutant Turtle"
ensName: "@turtle.statusofus.eth"
localName: "Bro from work"
profileImage: ""
message: '<code>ENS, renamed, contact, verified</code>'
contentType: StatusMessage.ContentType.Text
@@ -568,8 +573,9 @@ QtObject {
timestamp: "1658937930"
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
amIsender: false
senderOptionalName: "Teenage Mutant Turtle"
senderDisplayName: "Bro from work"
userName: "Teenage Mutant Turtle"
ensName: ""
localName: "Bro from work"
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg="
message: 'With profile image, no ENS'
contentType: StatusMessage.ContentType.Text
@@ -594,8 +600,9 @@ QtObject {
timestamp: "1658937930"
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
amIsender: false
senderOptionalName: "@turtle.statusofus.eth"
senderDisplayName: "Bro from work"
userName: "Teenage Mutant Turtle"
ensName: "@turtle.statusofus.eth"
localName: "Bro from work"
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg="
message: 'With profile image and ENS'
contentType: StatusMessage.ContentType.Text
@@ -620,8 +627,9 @@ QtObject {
timestamp: "1658937930"
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
amIsender: true
senderDisplayName: "You"
senderOptionalName: "@ghd.statusofus.eth"
userName: "You"
ensName: "@ghd.statusofus.eth"
localName: ""
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg="
message: 'Message with image'
contentType: StatusMessage.ContentType.Image
@@ -646,8 +654,9 @@ QtObject {
timestamp: "1658937930"
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
amIsender: true
senderDisplayName: "You"
senderOptionalName: "@ghd.statusofus.eth"
userName: "You"
ensName: "@ghd.statusofus.eth"
localName: ""
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg="
message: '👍'
contentType: StatusMessage.ContentType.Emoji
@@ -672,8 +681,9 @@ QtObject {
timestamp: "1658937930"
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
amIsender: true
senderDisplayName: "You"
senderOptionalName: "@ghd.statusofus.eth"
userName: "You"
ensName: "@ghd.statusofus.eth"
localName: ""
profileImage: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDKExhKZ4a9Uq3TZviZmIITSG0DRvlqcbqVbrlouZiCE0htD4h0hjCI0hNN5aNIbQGKKPxEzEEBpDaAyhMYTmDAAA//+gYCErzmCpCQAAAABJRU5ErkJggg="
message: 'Message with sticker'
contentType: StatusMessage.ContentType.Sticker
@@ -698,8 +708,9 @@ QtObject {
timestamp: "1660937930"
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
amIsender: true
senderDisplayName: "You"
senderOptionalName: "@ghd.statusofus.eth"
userName: "You"
ensName: "@ghd.statusofus.eth"
localName: ""
message: ""
isCurrentUser: true
contentType: StatusMessage.ContentType.Audio
@@ -726,8 +737,9 @@ QtObject {
timestamp: "1660937930"
senderId: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
amIsender: true
senderDisplayName: "You"
senderOptionalName: "@ghd.statusofus.eth"
userName: "You"
ensName: "@ghd.statusofus.eth"
localName: ""
message: "Hi Johnny"
isCurrentUser: true
contentType: StatusMessage.ContentType.Text
@@ -754,8 +766,9 @@ QtObject {
timestamp: "1660937930"
senderId: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
amIsender: false
senderDisplayName: "Pompie"
senderOptionalName: "@ghd.statusofus.eth"
userName: "Pompie"
ensName: "@ghd.statusofus.eth"
localName: ""
message: '<p>Do you have a Bitcoin wallet or Coinbase wallet?<br />You can earn up to 0.06021BTC every 3 hours with your phone or PC...<br />Without referrals nor registration fee...<br />If you are interested ask me “HOW”<br /><a href="https://t.me/Markstones455">https://t.me/Markstones455</a></p>'
isCurrentUser: true
contentType: StatusMessage.ContentType.Text
@@ -782,8 +795,9 @@ QtObject {
timestamp: "1660937930"
senderId: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
amIsender: false
senderDisplayName: "Pompie"
senderOptionalName: "@ghd.statusofus.eth"
userName: "Pompie"
ensName: "@ghd.statusofus.eth"
localName: ""
message: '<p><a href="//0x0431859bd00be79baef9617f4719ce73d2d261a2496f9a861f447a2f8ba34bf7ba03e572bb39fcf2df43564d39f6364bfe9be0a1fca3bf741e8f4b9492f86db427" class="mention">Uniform Dark Pike</a></p>'
isCurrentUser: true
contentType: StatusMessage.ContentType.Text
@@ -810,8 +824,9 @@ QtObject {
timestamp: "1660937930"
senderId: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
amIsender: false
senderDisplayName: "Pompie"
senderOptionalName: "@ghd.statusofus.eth"
userName: "Pompie"
ensName: "@ghd.statusofus.eth"
localName: ""
message: "Replying to text message"
isCurrentUser: true
contentType: StatusMessage.ContentType.Text
@@ -839,8 +854,9 @@ QtObject {
timestamp: "1660937930"
senderId: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
amIsender: false
senderDisplayName: "Pompie"
senderOptionalName: "@ghd.statusofus.eth"
userName: "Pompie"
ensName: "@ghd.statusofus.eth"
localName: ""
message: "Replying to a Image Message"
isCurrentUser: true
contentType: StatusMessage.ContentType.Text
@@ -868,8 +884,9 @@ QtObject {
timestamp: "1660937930"
senderId: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
amIsender: false
senderDisplayName: "Pompie"
senderOptionalName: "@ghd.statusofus.eth"
userName: "Pompie"
ensName: "@ghd.statusofus.eth"
localName: ""
message: "Replying to a sticker message"
isCurrentUser: true
contentType: StatusMessage.ContentType.Text
@@ -897,8 +914,9 @@ QtObject {
timestamp: "1660937930"
senderId: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
amIsender: false
senderDisplayName: "Pompie"
senderOptionalName: "@ghd.statusofus.eth"
userName: "Pompie"
ensName: "@ghd.statusofus.eth"
localName: ""
message: "Replying to a Audio message"
isCurrentUser: true
contentType: StatusMessage.ContentType.Text
@@ -926,8 +944,9 @@ QtObject {
timestamp: "1660937930"
senderId: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
amIsender: false
senderDisplayName: "Pumba"
senderOptionalName: "@quite.statusofus.eth"
userName: "Pumba"
ensName: "@quite.statusofus.eth"
localName: ""
message: "This is me"
isCurrentUser: true
contentType: StatusMessage.ContentType.Sticker
@@ -954,8 +973,9 @@ QtObject {
timestamp: "1660937930"
senderId: "0x04d1bed19c523299cbd07ddec7b8949ad7dd923819a68e0b733c9c0bc38cde276bd256f098e755f8f028395c2c91f438a22adaff6caded060b7cc0ef3f470f1234"
amIsender: true
senderDisplayName: "You"
senderOptionalName: "@ghd.statusofus.eth"
userName: "You"
ensName: "@ghd.statusofus.eth"
localName: ""
message: ""
isCurrentUser: true
contentType: StatusMessage.ContentType.Image
@@ -982,58 +1002,12 @@ QtObject {
timestamp: "1657937930"
amIsender: false
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
senderDisplayName: "Teenage Mutant Turtle"
senderOptionalName: ""
profileImage: ""
contentType: StatusMessage.ContentType.Text
message: 'Simple text message from another user with reactions'
messageContent: ""
isContact: false
trustIndicator: StatusContactVerificationIcons.TrustedType.None
hasMention: false
editMode: false
isReply: false
replySenderId: ""
replySenderName: ""
replyProfileImage: ""
replyMessageText: ""
replyAmISender: false
replyContentType: StatusMessage.ContentType.Text
replyMessageContent: ""
isPinned: false
pinnedBy: ""
hasExpired: false
reactions: [
ListElement {
numberOfReactions: 2
didIReactWithThisEmoji: false
jsonArrayOfUsersReactedWithThisEmoji: '["User 1", "User 3"]'
emojiId: 1
},
ListElement {
numberOfReactions: 3
didIReactWithThisEmoji: true
jsonArrayOfUsersReactedWithThisEmoji: '["Teenage Mutant Turtle", "User 1", "User 3"]'
emojiId: 3
},
ListElement {
numberOfReactions: 1
didIReactWithThisEmoji: false
jsonArrayOfUsersReactedWithThisEmoji: '["User 3"]'
emojiId: 4
}
]
}
ListElement {
timestamp: "1657937930"
amIsender: true
senderId: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc74f72cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
userName: "You"
userName: "Teenage Mutant Turtle"
ensName: ""
localName: ""
profileImage: ""
contentType: StatusMessage.ContentType.Text
message: 'Simple text message from current user with reactions'
message: 'Simple text message with reactions'
messageContent: ""
isContact: false
trustIndicator: StatusContactVerificationIcons.TrustedType.None
@@ -1055,6 +1029,10 @@ QtObject {
numberOfReactions: 2
didIReactWithThisEmoji: false
jsonArrayOfUsersReactedWithThisEmoji: '["User 1", "User 3"]'
// jsonArrayOfUsersReactedWithThisEmoji: [
// ListElement { text: "User 1" },
// ListElement { text: "User 3" }
// ]
emojiId: 1
},
ListElement {
@@ -1082,7 +1060,7 @@ QtObject {
isVerified: true
isUntrustworthy: false
isContact: true
isImage: true
isReadonly: true
onlineStatus: 1
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
@@ -1095,7 +1073,7 @@ QtObject {
isVerified: false
isUntrustworthy: true
isContact: false
isImage: false
isReadonly: false
onlineStatus: 0
icon: ""
isAdmin: false
@@ -1107,7 +1085,7 @@ QtObject {
isVerified: false
isUntrustworthy: false
isContact: false
isImage: true
isReadonly: false
onlineStatus: 1
isAdmin: false
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAiElEQVR4nOzXUQpAQBRGYWQvLNAyLJDV8C5qpiGnv/M9al5Ot27X0IUwhMYQGkNoDKGJCRlLH67bftx9X+ap/+P9VcxEDK
@@ -1119,8 +1097,8 @@ QtObject {
pubKey: "0x043a7ed0e8752236a4688563652fd0296453cef00a5dcddbe252dc79872cc1caa97a2b65e4a1a52d9c30a84c9966beaaaf6b333d659cbdd2e486b443ed1012cf04"
isVerified: false
isUntrustworthy: true
isReadonly: false
isContact: true
isImage: false
onlineStatus: 0
icon: ""
isAdmin: false
-5
View File
@@ -307,11 +307,6 @@ StatusWindow {
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title, true);
}
StatusNavigationListItem {
title: "StatusChartPanel"
selected: viewLoader.source.toString().includes(title)
onClicked: mainPageView.page(title, true);
}
StatusListSectionHeadline { text: "StatusQ.Popup" }
StatusNavigationListItem {
title: "StatusPopupMenu"
-193
View File
@@ -1,193 +0,0 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import Sandbox 0.1
Item {
QtObject {
id: d
//dummy data
property real stepSize: 1000
property real minStep: 12000
property real maxStep: 22000
property var graphTabsModel: [{text: "Price", enabled: true}, {text: "Balance", enabled: false}]
property var timeRangeTabsModel: [{text: "1H", enabled: true},
{text: "1D", enabled: true},{text: "7D", enabled: true},
{text: "1M", enabled: true}, {text: "6M", enabled: true},
{text: "1Y", enabled: true}, {text: "ALL", enabled: true}]
property var simTimer: Timer {
running: true
interval: 3000
repeat: true
onTriggered: {
d.generateData();
}
}
function minutes(minutes = 0) {
var newMinute = new Date(new Date().getTime() - (minutes * 60 * 1000)).toString();
if (newMinute.slice(10,12) === "00") {
var dateToday = new Date(Date.now()).toString();
return dateToday.slice(4,7) + " " + dateToday.slice(8,10);
}
return newMinute.slice(10,16);
}
function hour(hours = 0) {
var newHour = new Date(new Date().getTime() - (hours * 60 * 60 * 1000)).toString();
if (newHour.slice(10,12) === "00") {
var dateToday = new Date(Date.now()).toString();
return dateToday.slice(4,7) + " " + dateToday.slice(8,10);
}
return newHour.slice(10,16);
}
function day(before = 0) {
var newDay = new Date(Date.now() - before * 24 * 60 * 60 * 1000).toString();
return newDay.slice(4,7) + " " + newDay.slice(8,10);
}
function month(before = 0) {
var newMonth = new Date(Date.now() - before * 24 * 60 * 60 * 1000).toString();
return newMonth.slice(4,7) + " '" + newMonth.slice(newMonth.indexOf("G")-3, newMonth.indexOf("G")-1);
}
property var timeRange: [
{'1H': [minutes(60), minutes(55), minutes(50), minutes(45), minutes(40), minutes(35), minutes(30), minutes(25), minutes(20), minutes(15), minutes(10), minutes(5), minutes()]},
{'1D': [hour(24), hour(23), hour(22), hour(21), hour(20), hour(19), hour(18), hour(17), hour(16), hour(15), hour(14), hour(13),
hour(12), hour(11), hour(10), hour(9), hour(8), hour(7), hour(6), hour(5), hour(4), hour(3), hour(2), hour(1), hour()]},
{'7D': [day(6), day(5), day(4), day(3), day(2), day(1), day()]},
{'1M': [day(30), day(28), day(26), day(24), day(22), day(20), day(18), day(16), day(14), day(12), day(10), day(8), day(6), day(4), day()]},
{'6M': [month(150), month(120), month(90), month(60), month(30), month()]},
{'1Y': [month(330), month(300), month(270), month(240), month(210), month(180), month(150), month(120), month(90), month(60), month(30), month()]},
{'ALL': ['2016', '2017', '2018', '2019', '2020', '2021', '2022']}
]
function generateData() {
var result = [];
for (var i = 0; i < timeRange[graphDetail.timeRangeTabBarIndex][graphDetail.selectedTimeRange].length; ++i) {
result[i] = Math.random() * (maxStep - minStep) + minStep;
}
graphDetail.chart.chartData.datasets[0].data = result;
graphDetail.chart.animateToNewData();
}
}
StatusChartPanel {
id: graphDetail
height: 290
anchors.left: parent.left
anchors.leftMargin: 24
anchors.right: parent.right
anchors.rightMargin: 24
anchors.verticalCenter: parent.verticalCenter
graphsModel: d.graphTabsModel
timeRangeModel: d.timeRangeTabsModel
onHeaderTabClicked: {
//TODO
//if time range tab
d.generateData();
//if graph bar
//switch graph
}
chart.chartType: 'line'
chart.chartData: {
return {
labels: d.timeRange[graphDetail.timeRangeTabBarIndex][graphDetail.selectedTimeRange],
datasets: [{
label: 'Price',
xAxisId: 'x-axis-1',
yAxisId: 'y-axis-1',
backgroundColor: (Theme.palette.name === "dark") ? 'rgba(136, 176, 255, 0.2)' : 'rgba(67, 96, 223, 0.2)',
borderColor: (Theme.palette.name === "dark") ? 'rgba(136, 176, 255, 1)' : 'rgba(67, 96, 223, 1)',
borderWidth: 3,
pointRadius: 0,
//data: d.generateData()
}]
}
}
chart.chartOptions: {
return {
maintainAspectRatio: false,
responsive: true,
legend: {
display: false
},
//TODO enable zoom
// zoom: {
// enabled: true,
// drag: true,
// speed: 0.1,
// threshold: 2
// },
// pan:{enabled:true,mode:'x'},
tooltips: {
intersect: false,
displayColors: false,
callbacks: {
footer: function(tooltipItem, data) { return 'Vol: $43,042,678,876'; },
label: function(tooltipItem, data) {
let label = data.datasets[tooltipItem.datasetIndex].label || '';
if (label) {
label += ': ';
}
label += tooltipItem.yLabel.toFixed(2);
return label.slice(0,label.indexOf(":")+1)+ " $"+label.slice(label.indexOf(":")+2, label.length);
}
}
},
scales: {
xAxes: [{
id: 'x-axis-1',
position: 'bottom',
gridLines: {
drawOnChartArea: false,
drawBorder: false,
drawTicks: false,
},
ticks: {
fontSize: 10,
fontColor: (Theme.palette.name === "dark") ? '#909090' : '#939BA1',
padding: 16
}
}],
yAxes: [{
position: 'left',
id: 'y-axis-1',
gridLines: {
borderDash: [8, 4],
drawBorder: false,
drawTicks: false,
color: (Theme.palette.name === "dark") ? '#909090' : '#939BA1'
},
beforeDataLimits: (axis) => {
axis.paddingTop = 25;
axis.paddingBottom = 0;
},
ticks: {
fontSize: 10,
fontColor: (Theme.palette.name === "dark") ? '#909090' : '#939BA1',
padding: 8,
min: d.minStep,
max: d.maxStep,
stepSize: d.stepSize,
callback: function(value, index, ticks) {
return '$' + value;
},
}
}]
}
}
}
}
}
-69
View File
@@ -72,73 +72,4 @@ Column {
text: "Introduced PIN: " + regexPinInput.pinInput
font.pixelSize: 12
}
// PUK input that accepts only numbers
StatusBaseText {
topPadding: 100
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.directColor1
text: "Enter Keycard PUK"
font.pixelSize: 30
font.bold: true
}
StatusPinInput {
id: numbersPukInput
anchors.horizontalCenter: parent.horizontalCenter
validator: StatusRegularExpressionValidator { regularExpression: /[0-9]+/ }
pinLen: 12
}
StatusBaseText {
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.dangerColor1
text: "Only numbers allowed"
font.pixelSize: 16
}
StatusBaseText {
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.directColor1
text: "Introduced PUK: " + numbersPukInput.pinInput
font.pixelSize: 12
}
// PUK input that accepts only numbers
StatusBaseText {
topPadding: 100
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.directColor1
text: "Enter Keycard PUK"
font.pixelSize: 30
font.bold: true
}
StatusPinInput {
id: numbersPukInputWithSpacing
anchors.horizontalCenter: parent.horizontalCenter
validator: StatusRegularExpressionValidator { regularExpression: /[0-9]+/ }
pinLen: 12
additionalSpacing: 32
additionalSpacingOnEveryNItems: 4
Component.onCompleted: {
numbersPukInputWithSpacing.statesInitialization()
numbersPukInputWithSpacing.forceFocus()
}
}
StatusBaseText {
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.dangerColor1
text: "Only numbers allowed"
font.pixelSize: 16
}
StatusBaseText {
anchors.horizontalCenter: parent.horizontalCenter
color: Theme.palette.directColor1
text: "Introduced PUK: " + numbersPukInputWithSpacing.pinInput
font.pixelSize: 12
}
}
-144
View File
@@ -1,144 +0,0 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Controls 0.1
import "private/chart"
/*!
\qmltype StatusChartPanel
\inherits Page
\inqmlmodule StatusQ.Components
\since StatusQ.Components 0.1
\brief Displays a chart component together with an optional header in order to add a list of options.
Inherits \l{https://doc.qt.io/qt-5/qml-qtquick-controls2-page.html}{Page}.
The \c StatusChartPanel displays a customizable chart component. Additionally, options
can be added in the header in both right and left sides given graphTabsModel and timeRangeTabsModel
property are set respectively.
For example:
\qml
StatusChartPanel {
id: graphDetail
width: parent.width
height: 290
anchors.verticalCenter: parent.verticalCenter
graphsModel: d.graphTabsModel
timeRangeModel: d.timeRangeTabsModel
chart.chartType: 'line'
chart.chartData: {
return {
datasets: [{
data: d.data
}],
...
}
}
chart.chartOptions: {
return {
legend: {
display: false
},
...
}
}
}
\endqml
\image status_chart_panel.png
For a list of components available see StatusQ.
*/
Page {
id: root
/*!
\qmlproperty var StatusChartPanel::graphsModel
This property holds the graphs model options to be set on the left side tab bar of the header.
*/
property var graphsModel
/*!
\qmlproperty var StatusChartPanel::timeRangeModel
This property holds the time range options to be set on the right side tab bar of the header.
*/
property var timeRangeModel
/*!
\qmlproperty alias StatusChartPanel::graphComponent
This property holds holds a reference to the graph component.
*/
property alias chart: graphComponent
/*!
\qmlproperty alias StatusChartPanel::timeRangeTabBarIndex
This property holds holds a reference to the time range tab bar current index.
*/
property alias timeRangeTabBarIndex: timeRangeTabBar.currentIndex
/*!
\qmlproperty string StatusChartPanel::selectedTimeRange
This property holds holds the text of the current time range tab bar selected tab.
*/
property string selectedTimeRange: timeRangeTabBar.currentItem.text
/*!
\qmlsignal
This signal is emitted when a header tab bar is clicked.
*/
signal headerTabClicked(string text)
Component {
id: tabButton
StatusTabButton {
leftPadding: 0
width: implicitWidth
onClicked: {
root.headerTabClicked(text);
}
}
}
Component.onCompleted: {
if (!!timeRangeModel) {
for (var i = 0; i < timeRangeModel.length; i++) {
var timeTab = tabButton.createObject(root, { text: timeRangeModel[i].text,
enabled: timeRangeModel[i].enabled });
timeRangeTabBar.addItem(timeTab);
}
}
if (!!graphsModel) {
for (var j = 0; j < graphsModel.length; j++) {
var graphTab = tabButton.createObject(root, { text: graphsModel[j].text,
enabled: graphsModel[j].enabled });
graphsTabBar.addItem(graphTab);
}
}
}
background: null
header: Item {
height: childrenRect.height
RowLayout {
anchors.left: parent.left
anchors.leftMargin: 46
anchors.right: parent.right
StatusTabBar {
id: graphsTabBar
}
StatusTabBar {
id: timeRangeTabBar
Layout.alignment: Qt.AlignRight
}
}
}
contentItem: Item {
Chart {
id: graphComponent
anchors.fill: parent
}
}
}
@@ -123,7 +123,6 @@ Column {
asset.isImage: model.icon.includes("data")
asset.name: model.icon
ringSettings.ringSpecModel: model.colorHash
onlineStatus: model.onlineStatus
sensor.cursorShape: dragSensor.cursorShape
@@ -21,7 +21,6 @@ Rectangle {
property bool hasUnreadMessages: false
property int notificationsCount: 0
property bool muted: false
property int onlineStatus: StatusChatListItem.OnlineStatus.Inactive
property StatusAssetSettings asset: StatusAssetSettings {
width: 24
@@ -51,11 +50,6 @@ Rectangle {
CommunityChat // 6
}
enum OnlineStatus {
Inactive,
Online
}
implicitWidth: 288
implicitHeight: 40
@@ -90,15 +84,6 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
asset: root.asset
name: root.name
badge {
visible: type === StatusChatListItem.Type.OneToOneChat
color: onlineStatus === StatusChatListItem.OnlineStatus.Online ? Theme.palette.successColor1 : Theme.palette.baseColor1
border.width: 1
border.color: root.color
implicitHeight: 9
implicitWidth: 9
}
}
StatusIcon {
@@ -13,7 +13,6 @@ Rectangle {
property alias button: button
property alias expandableComponent: expandableRegion.sourceComponent
property alias expandableItem: expandableRegion.item
property bool separatorVisible: true
property int type: StatusExpandableItem.Type.Primary
property bool expandable: true
@@ -50,7 +49,7 @@ Rectangle {
height: 1
color: Theme.palette.baseColor2
visible: (statusExpandableItem.type === StatusExpandableItem.Type.Tertiary) && separatorVisible
visible: (statusExpandableItem.type === StatusExpandableItem.Type.Tertiary)
}
@@ -58,7 +57,7 @@ Rectangle {
id: header
anchors.top: parent.top
width: parent.width
height: statusExpandableItem.type === StatusExpandableItem.Type.Tertiary ? 40 : 64
height: 64
radius: (statusExpandableItem.type === StatusExpandableItem.Type.Secondary) ? 8 : 0
color: statusExpandableItem.type === StatusExpandableItem.Type.Secondary && sensor.containsMouse ? Theme.palette.baseColor2 : "transparent"
@@ -79,7 +78,7 @@ Rectangle {
(statusExpandableItem.type === StatusExpandableItem.Type.Tertiary) ? parent.top : undefined
anchors.topMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Tertiary) ? 29 : 17
anchors.left: identicon.active ? identicon.right : parent.left
anchors.leftMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Primary) ? 10 : !identicon.active ? 0 : 16
anchors.leftMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Primary) ? 10 : 16
anchors.verticalCenter: (statusExpandableItem.type === StatusExpandableItem.Type.Secondary) ? identicon.verticalCenter : undefined
@@ -175,7 +174,7 @@ Rectangle {
Loader {
id: expandableRegion
anchors.top: header.bottom
anchors.topMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Tertiary) ? 24 : 16
anchors.topMargin: 16
anchors.left: parent.left
anchors.leftMargin: (statusExpandableItem.type === StatusExpandableItem.Type.Primary) ? 48 : 0
anchors.right: parent.right
@@ -196,7 +195,7 @@ Rectangle {
State {
name: "EXPANDED"
PropertyChanges {target: expandImage; icon: "chevron-up"}
PropertyChanges {target: statusExpandableItem; height: 82 + expandableRegion.height}
PropertyChanges {target: statusExpandableItem; height: 82 + expandableRegion.height + 22}
PropertyChanges {target: expandableRegion; visible: true}
},
State {
@@ -94,12 +94,6 @@ Rectangle {
\endqml
*/
property var itemsModel: ListModel { }
/*!
\qmlproperty bool StatusItemSelector::useIcons
This property determines if the imageSource role from the model will be handled as
an image or an icon.
*/
property bool useIcons: false
/*!
\qmlproperty string StatusItemSelector::andOperatorText
This property holds the string text representation for an `AND` logical operator.
@@ -174,7 +168,7 @@ Rectangle {
Layout.fillWidth: true
spacing: 6
StatusListItemTag {
visible: !itemsModel || itemsModel.count === 0
visible: itemsModel.count === 0
title: root.defaultItemText
asset.name: root.defaultItemImageSource
asset.isImage: true
@@ -210,8 +204,7 @@ Rectangle {
StatusListItemTag {
title: model.text
asset.name: model.imageSource
asset.isImage: !root.useIcons
asset.bgColor: "transparent"
asset.isImage: true
color: Theme.palette.primaryColor3
closeButtonVisible: false
titleText.color: Theme.palette.primaryColor1
+13 -58
View File
@@ -31,8 +31,6 @@ Rectangle {
property Component bottomDelegate
property alias tagsModel: tagsRepeater.model
property Component tagsDelegate
property var inlineTagModel: []
property Component inlineTagDelegate
property bool loading: false
property bool loadingFailed: false
@@ -280,68 +278,25 @@ Rectangle {
anchors.leftMargin: 4
}
RowLayout {
id: statusListItemSubtitleTagsRow
StatusBaseText {
id: statusListItemSubTitle
objectName: "statusListItemSubTitle"
anchors.top: statusListItemTitle.bottom
width: parent.width
spacing: 4
StatusBaseText {
id: statusListItemSubTitle
objectName: "statusListItemSubTitle"
Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: inlineTagModelRepeater.count > 0 ? contentWidth : parent.width
text: statusListItem.subTitle
font.pixelSize: 15
color: statusListItem.loadingFailed ? Theme.palette.dangerColor1
: !statusListItem.enabled || !statusListItem.tertiaryTitle
? Theme.palette.baseColor1
: Theme.palette.directColor1
visible: !!statusListItem.subTitle
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
}
StatusBaseText {
id: dot
Layout.alignment: Qt.AlignVCenter
Layout.topMargin: -48
text: "."
font.pixelSize: 40
color: Theme.palette.baseColor1
lineHeightMode: Text.FixedHeight
lineHeight: 24
visible: inlineTagModelRepeater.count > 0
}
StatusScrollView {
id: inlineTagModelRepeaterRow
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
Layout.preferredHeight: row.height
contentHeight: row.height
contentWidth: row.width
padding: 0
clip: true
interactive: false
Row {
id: row
spacing: 4
Repeater {
id: inlineTagModelRepeater
model: inlineTagModel
delegate: inlineTagDelegate
}
}
}
text: statusListItem.subTitle
font.pixelSize: 15
color: statusListItem.loadingFailed ? Theme.palette.dangerColor1
: !statusListItem.enabled || !statusListItem.tertiaryTitle
? Theme.palette.baseColor1
: Theme.palette.directColor1
height: visible ? contentHeight : 0
visible: !!statusListItem.subTitle
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
}
StatusBaseText {
id: statusListItemTertiaryTitle
anchors.top: statusListItemSubtitleTagsRow.bottom
anchors.top: statusListItemSubTitle.bottom
width: parent.width
height: visible ? contentHeight : 0
text: statusListItem.tertiaryTitle
+3 -45
View File
@@ -37,7 +37,6 @@ Rectangle {
property string errorLoadingImageText: ""
property string audioMessageInfoText: ""
property string pinnedMsgInfoText: ""
property string messageAttachments: ""
property var reactionIcons: [
Emoji.iconSource("❤"),
Emoji.iconSource("👍"),
@@ -69,7 +68,6 @@ Rectangle {
property color overrideBackgroundColor: "transparent"
property bool overrideBackground: false
property bool profileClickable: true
property bool hideMessage: false
property alias previousMessageIndex: dateGroupLabel.previousMessageIndex
property alias previousMessageTimestamp: dateGroupLabel.previousMessageTimestamp
@@ -103,20 +101,6 @@ Rectangle {
messageFoundAnimation.start();
}
onMessageAttachmentsChanged: {
root.prepareAttachmentsModel()
}
function prepareAttachmentsModel() {
attachmentsModel.clear()
if (!root.messageAttachments) {
return
}
root.messageAttachments.split(" ").forEach(source => {
attachmentsModel.append({source})
})
}
implicitWidth: messageLayout.implicitWidth
+ messageLayout.anchors.leftMargin
+ messageLayout.anchors.rightMargin
@@ -243,14 +227,14 @@ Rectangle {
spacing: 8
Item {
implicitWidth: root.messageDetails.sender.profileImage.assetSettings.width
implicitWidth: profileImage.width
implicitHeight: profileImage.visible ? profileImage.height : 0
Layout.alignment: Qt.AlignTop
StatusSmartIdenticon {
id: profileImage
active: root.showHeader
visible: active
name: root.messageDetails.sender.displayName
name: root.messageDetails.sender.userName
asset: root.messageDetails.sender.profileImage.assetSettings
ringSettings: root.messageDetails.sender.profileImage.ringSettings
@@ -265,7 +249,6 @@ Rectangle {
}
ColumnLayout {
spacing: 4
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
@@ -294,7 +277,7 @@ Rectangle {
}
Loader {
Layout.fillWidth: true
active: !root.editMode && !!root.messageDetails.messageText && !root.hideMessage
active: !editMode && !!root.messageDetails.messageText
visible: active
sourceComponent: StatusTextMessage {
objectName: "StatusMessage_textMessage"
@@ -333,24 +316,6 @@ Rectangle {
shapeType: root.messageDetails.amISender ? StatusImageMessage.ShapeType.RIGHT_ROUNDED : StatusImageMessage.ShapeType.LEFT_ROUNDED
}
}
Loader {
active: !!root.messageAttachments && !editMode
visible: active
sourceComponent: Column {
spacing: 4
Layout.fillWidth: true
Repeater {
model: attachmentsModel
delegate: StatusImageMessage {
source: model.source
onClicked: root.imageClicked(image, mouse, imageSource)
shapeType: root.messageDetails.amISender ? StatusImageMessage.ShapeType.RIGHT_ROUNDED : StatusImageMessage.ShapeType.LEFT_ROUNDED
}
}
}
}
Loader {
active: root.messageDetails.contentType === StatusMessage.ContentType.Sticker && !editMode
visible: active
@@ -441,11 +406,4 @@ Rectangle {
anchors.topMargin: -8
visible: hoverHandler.hovered && !root.hideQuickActions
}
ListModel {
id: attachmentsModel
Component.onCompleted: {
root.prepareAttachmentsModel()
}
}
}
@@ -5,17 +5,29 @@ QtObject {
id: root
property string id: ""
property string displayName: ""
property string secondaryName: ""
property string userName: ""
property string ensName: ""
property string localName: ""
property bool isEnsVerified: false
property bool isContact: false
property int trustIndicator: StatusContactVerificationIcons.TrustedType.None
property StatusProfileImageSettings profileImage: StatusProfileImageSettings {
pubkey: root.id
showRing: !root.isEnsVerified
showRing: !root.ensName
width: 40
height: 40
}
readonly property string displayName: root.localName !== ""
? root.localName
: root.ensName !== ""
? root.ensName
: root.userName
readonly property string secondaryName: root.localName === ""
? ""
: root.ensName !== ""
? root.ensName
: root.userName
}
@@ -99,8 +99,6 @@ Loader {
visible: false
anchors.bottom: root.bottom
anchors.right: root.right
anchors.rightMargin: -border.width
anchors.bottomMargin: -border.width
border.width: 3
implicitHeight: 15
implicitWidth: 15
+1 -1
View File
@@ -217,7 +217,7 @@ Item {
if(root.orderByReadonly) {
for(var i = 0; i < namesModel.count; i++) {
var entry = namesModel.get(i)
if(entry.isReadonly) {
if(entry.tagIcon === "crown") {
namesModel.move(i, 0, 1)
}
}
-14
View File
@@ -9,12 +9,10 @@ import StatusQ.Controls 0.1
ToolBar {
id: root
property string backButtonName: ""
property int notificationCount: 0
property Item headerContent
property alias notificationButton: notificationButton
signal backButtonClicked()
signal notificationButtonClicked()
implicitWidth: visible ? 518 : 0
@@ -25,18 +23,6 @@ ToolBar {
RowLayout {
anchors.fill: parent
spacing: 0
StatusFlatButton {
icon.name: "arrow-left"
icon.width: 20
icon.height: 20
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.leftMargin: 12
visible: !!root.backButtonName
text: root.backButtonName
size: StatusBaseButton.Size.Large
onClicked: { root.backButtonClicked(); }
}
Control {
id: headerContentItem
Layout.fillWidth: !!headerContent
File diff suppressed because it is too large Load Diff
@@ -1,139 +0,0 @@
/*!
* Elypson's Chart.qml adaptor to Chart.js
* (c) 2020 ChartJs2QML contributors (starting with Elypson, Michael A. Voelkel, https://github.com/Elypson)
* Released under the MIT License
*/
import QtQuick 2.13
import "Chart.js" as Chart
Canvas {
id: root
property var jsChart: undefined
property string chartType
property var chartData
property var chartOptions
property double chartAnimationProgress: 0.1
property var animationEasingType: Easing.InOutExpo
property double animationDuration: 500
property var memorizedContext
property var memorizedData
property var memorizedOptions
property alias animationRunning: chartAnimator.running
signal animationFinished()
function animateToNewData()
{
chartAnimationProgress = 0.1;
jsChart.update();
chartAnimator.restart();
}
MouseArea {
id: event
anchors.fill: root
hoverEnabled: true
enabled: true
property var handler: undefined
property QtObject mouseEvent: QtObject {
property int left: 0
property int top: 0
property int x: 0
property int y: 0
property int clientX: 0
property int clientY: 0
property string type: ""
property var target
}
function submitEvent(mouse, type) {
mouseEvent.type = type
mouseEvent.clientX = mouse ? mouse.x : 0;
mouseEvent.clientY = mouse ? mouse.y : 0;
mouseEvent.x = mouse ? mouse.x : 0;
mouseEvent.y = mouse ? mouse.y : 0;
mouseEvent.left = 0;
mouseEvent.top = 0;
mouseEvent.target = root;
if(handler) {
handler(mouseEvent);
}
root.requestPaint();
}
onClicked: {
submitEvent(mouse, "click");
}
onPositionChanged: {
submitEvent(mouse, "mousemove");
}
onExited: {
submitEvent(undefined, "mouseout");
}
onEntered: {
submitEvent(undefined, "mouseenter");
}
onPressed: {
submitEvent(mouse, "mousedown");
}
onReleased: {
submitEvent(mouse, "mouseup");
}
}
PropertyAnimation {
id: chartAnimator
target: root
property: "chartAnimationProgress"
alwaysRunToEnd: true
to: 1
duration: root.animationDuration
easing.type: root.animationEasingType
onFinished: {
root.animationFinished();
}
}
onChartAnimationProgressChanged: {
root.requestPaint();
}
onPaint: {
if(root.getContext('2d') != null && memorizedContext != root.getContext('2d') || memorizedData != root.chartData || memorizedOptions != root.chartOptions) {
var ctx = root.getContext('2d');
jsChart = new Chart.build(ctx, {
type: root.chartType,
data: root.chartData,
options: root.chartOptions
});
memorizedData = root.chartData ;
memorizedContext = root.getContext('2d');
memorizedOptions = root.chartOptions;
root.jsChart.bindEvents(function(newHandler) {event.handler = newHandler;});
chartAnimator.start();
}
jsChart.draw(chartAnimationProgress);
}
onWidthChanged: {
if(jsChart) {
jsChart.resize();
}
}
onHeightChanged: {
if(jsChart) {
jsChart.resize();
}
}
}
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020 ChartJs2QML contributors (starting with Elypson, Michael A. Voelkel, https://github.com/Elypson)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -1,6 +1,5 @@
import QtQuick 2.3
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.14
import QtGraphicalEffects 1.13
import StatusQ.Core 0.1
@@ -74,67 +73,102 @@ Item {
Repeater {
id: reactionRepeater
width: childrenRect.width
model: root.emojiReactionsModel
Control {
id: reactionDelegate
Rectangle {
id: emojiContainer
topPadding: 2
bottomPadding: 2
leftPadding: 2
rightPadding: 6
readonly property bool isHovered: mouseArea.containsMouse
background: Rectangle {
radius: 10
color: model.didIReactWithThisEmoji
? (reactionDelegate.hovered ? Theme.palette.statusMessage.emojiReactionActiveBackgroundHovered
: Theme.palette.statusMessage.emojiReactionActiveBackground)
: (reactionDelegate.hovered ? Theme.palette.statusMessage.emojiReactionBackgroundHovered
: Theme.palette.statusMessage.emojiReactionBackground)
// Rounded corner to cover one corner
Rectangle {
anchors.top: parent.top
anchors.left: parent.left
width: 10
height: 10
radius: 2
color: parent.color
}
}
contentItem: Row {
spacing: 4
StatusEmoji {
anchors.verticalCenter: parent.verticalCenter
width: 15
height: 15
source: {
if (model.emojiId >= 1 && model.emojiId <= root.icons.length)
return root.icons[model.emojiId - 1];
return "";
}
}
StatusBaseText {
anchors.verticalCenter: parent.verticalCenter
text: model.numberOfReactions
font.pixelSize: 12
color: model.didIReactWithThisEmoji ? Theme.palette.indirectColor1 : Theme.palette.directColor1
}
}
width: emojiImage.width + emojiCount.width + (root.imageMargin * 2) + + 8
height: 20
radius: 10
color: model.didIReactWithThisEmoji ?
(isHovered ? Theme.palette.statusMessage.emojiReactionActiveBackgroundHovered : Theme.palette.statusMessage.emojiReactionActiveBackground) :
(isHovered ? Theme.palette.statusMessage.emojiReactionBackgroundHovered : Theme.palette.statusMessage.emojiReactionBackground)
StatusToolTip {
visible: reactionDelegate.hovered
visible: mouseArea.containsMouse
maxWidth: 400
text: d.showReactionAuthors(model.jsonArrayOfUsersReactedWithThisEmoji, model.emojiId)
}
// Rounded corner to cover one corner
Rectangle {
color: parent.color
width: 10
height: 10
anchors.top: parent.top
anchors.left: !root.isCurrentUser ? parent.left : undefined
anchors.leftMargin: 0
anchors.right: !root.isCurrentUser ? undefined : parent.right
anchors.rightMargin: 0
radius: 2
z: -1
}
// This is a workaround to get a "border" around the rectangle including the weird rectangle
Loader {
active: model.didIReactWithThisEmoji
anchors.top: parent.top
anchors.topMargin: -1
anchors.left: parent.left
anchors.leftMargin: -1
z: -2
sourceComponent: Component {
Rectangle {
width: emojiContainer.width + 2
height: emojiContainer.height + 2
radius: emojiContainer.radius
color: Theme.palette.primaryColor1
Rectangle {
color: parent.color
width: 10
height: 10
anchors.top: parent.top
anchors.left: !root.isCurrentUser ? parent.left : undefined
anchors.leftMargin: 0
anchors.right: !root.isCurrentUser ? undefined : parent.right
anchors.rightMargin: 0
radius: 2
z: -1
}
}
}
}
// TODO: Use Row
StatusEmoji {
id: emojiImage
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: root.imageMargin
width: 15
height: 15
source: {
if (model.emojiId >= 1 && model.emojiId <= root.icons.length)
return root.icons[model.emojiId - 1];
return "";
}
}
StatusBaseText {
id: emojiCount
text: model.numberOfReactions
anchors.verticalCenter: parent.verticalCenter
anchors.left: emojiImage.right
anchors.leftMargin: root.imageMargin
font.pixelSize: 12
color: model.didIReactWithThisEmoji ? Theme.palette.primaryColor1 : Theme.palette.directColor1
}
MouseArea {
id: mouseArea
anchors.fill: parent
@@ -160,7 +194,7 @@ Item {
StatusIcon {
id: addEmojiButton
readonly property bool isHovered: addEmojiButtonMouseArea.containsMouse
property bool isHovered: false // TODO: Replace with mouseArea.containsMouse
anchors.left: parent.left
anchors.leftMargin: 2.5
@@ -177,6 +211,8 @@ Item {
anchors.fill: addEmojiButton
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onEntered: addEmojiButton.isHovered = true
onExited: addEmojiButton.isHovered = false
onClicked: {
root.addEmojiClicked(this, mouse);
}
@@ -89,7 +89,7 @@ Item {
}
StatusBaseText {
id: tertiaryDetailText
visible: !root.amISender && root.messageOriginInfo === ""
visible: !root.amISender && messageOriginInfo == ""
Layout.alignment: Qt.AlignVCenter
font.pixelSize: 10
elide: Text.ElideMiddle
@@ -58,7 +58,7 @@ Item {
StatusSmartIdenticon {
id: profileImage
Layout.alignment: Qt.AlignTop
name: replyDetails.sender.displayName
name: replyDetails.sender.userName
asset: replyDetails.sender.profileImage.assetSettings
ringSettings: replyDetails.sender.profileImage.ringSettings
MouseArea {
@@ -40,7 +40,6 @@ Loader {
}
contentItem: RowLayout {
spacing: 4
StatusIcon {
Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: 16
@@ -57,6 +56,7 @@ Loader {
}
StatusBaseText {
Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: -4
color: Theme.palette.directColor1
font.pixelSize: 13
font.weight: Font.Medium
-2
View File
@@ -43,5 +43,3 @@ StatusCommunityTags 0.1 StatusCommunityTags.qml
StatusItemSelector 0.1 StatusItemSelector.qml
StatusCard 0.1 StatusCard.qml
StatusDatePicker 0.1 StatusDatePicker.qml
StatusChart 0.1 StatusChart.qml
StatusChartPanel 0.1 StatusChartPanel.qml
+144 -95
View File
@@ -1,14 +1,11 @@
import QtQuick 2.14
import QtQuick.Layouts 1.14
import QtQuick.Controls 2.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Utils 0.1
Button {
id: root
Rectangle {
id: statusBaseButton
enum Size {
Tiny,
@@ -22,106 +19,158 @@ Button {
Primary
}
property StatusAssetSettings asset: StatusAssetSettings { }
property StatusAssetSettings icon: StatusAssetSettings {
width: 24
height: 24
}
property bool loading
property bool loading: false
property color normalColor
property color hoverColor
property color disabledColor
property color textColor
property color disabledTextColor
property color borderColor: "transparent"
property alias hovered: sensor.containsMouse
property int size: StatusBaseButton.Size.Large
property int type: StatusBaseButton.Type.Normal
property alias text: label.text
property alias font: label.font
property real defaultLeftPadding: size === StatusBaseButton.Size.Large ? 24 : 12
property real defaultRightPadding: size === StatusBaseButton.Size.Large ? 24 : 12
property real defaultTopPadding: {
switch (size) {
case StatusBaseButton.Size.Tiny:
return 5
case StatusBaseButton.Size.Small:
return 10
case StatusBaseButton.Size.Large:
default:
return 11
}
}
property real defaultBottomPadding: {
switch (size) {
case StatusBaseButton.Size.Tiny:
return 5
case StatusBaseButton.Size.Small:
return 10
case StatusBaseButton.Size.Large:
default:
return 11
}
}
property real leftPadding: defaultLeftPadding
property real rightPadding: defaultRightPadding
property real topPadding: defaultTopPadding
property real bottomPadding: defaultBottomPadding
property color normalColor
property color hoverColor
property color disaledColor
property color textColor
property color disabledTextColor
signal pressed(var mouse)
signal released(var mouse)
signal clicked(var mouse)
signal pressAndHold(var mouse)
property bool highlighted: false
/// Implementation
implicitWidth: layout.width + statusBaseButton.leftPadding + statusBaseButton.rightPadding
implicitHeight: layout.height + statusBaseButton.topPadding + statusBaseButton.bottomPadding
radius: size !== StatusBaseButton.Size.Tiny ? 8 : 6
color: {
if (statusBaseButton.enabled)
return !statusBaseButton.loading && (sensor.containsMouse || highlighted) ? hoverColor
: normalColor;
return disaledColor
}
QtObject {
id: d
readonly property color textColor: root.enabled || root.loading ? root.textColor : root.disabledTextColor
readonly property color textColor: statusBaseButton.enabled ? statusBaseButton.textColor : statusBaseButton.disabledTextColor
}
font.family: Theme.palette.baseFont.name
font.weight: Font.Medium
font.pixelSize: size === StatusBaseButton.Size.Large ? 15 : 13
horizontalPadding: {
if (root.icon.name) {
return size === StatusBaseButton.Size.Large ? 18 : 16
}
return size === StatusBaseButton.Size.Large ? 24 : 12
}
verticalPadding: {
switch (size) {
case StatusBaseButton.Size.Tiny:
return 5
case StatusBaseButton.Size.Small:
return 10
case StatusBaseButton.Size.Large:
default:
return 11
}
}
spacing: root.size === StatusBaseButton.Size.Large ? 6 : 4
icon.height: 24
icon.width: 24
background: Rectangle {
radius: root.size === StatusBaseButton.Size.Tiny ? 6 : 8
border.color: root.borderColor
color: {
if (root.enabled)
return !root.loading && (root.hovered || root.highlighted) ? hoverColor : normalColor;
return disabledColor;
}
}
contentItem: RowLayout {
spacing: root.spacing
StatusIcon {
Layout.preferredWidth: visible ? root.icon.width : 0
Layout.preferredHeight: visible ? root.icon.height : 0
icon: root.icon.name
rotation: root.asset.rotation
opacity: !loading && root.icon.name !== ""
visible: root.icon.name !== ""
color: d.textColor
}
StatusEmoji {
Layout.preferredWidth: visible ? root.icon.width : 0
Layout.preferredHeight: visible ? root.icon.height : 0
visible: root.asset.emoji
emojiId: Emoji.iconId(root.asset.emoji, root.asset.emojiSize) || ""
}
StatusBaseText {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
opacity: !loading
font: root.font
text: root.text
color: d.textColor
verticalAlignment: Text.AlignVCenter
}
}
Loader {
anchors.centerIn: parent
active: root.loading
sourceComponent: StatusLoadingIndicator {
color: d.textColor
}
}
// stop the mouse clicks in the "loading" state w/o disabling the whole button
// as this would make it impossible to have hover events or a tooltip
MouseArea {
id: sensor
anchors.fill: parent
acceptedButtons: Qt.AllButtons
enabled: root.loading
onPressed: mouse.accepted = true
onWheel: wheel.accepted = true
cursorShape: !root.loading ? Qt.PointingHandCursor: undefined // always works; 'undefined' resets to default cursor
}
cursorShape: loading ? Qt.ArrowCursor
: Qt.PointingHandCursor
hoverEnabled: true
enabled: statusBaseButton.enabled
Loader {
anchors.centerIn: parent
active: loading
sourceComponent: StatusLoadingIndicator {
color: d.textColor
} // Indicator
} // Loader
Row {
id: layout
anchors.centerIn: parent
spacing: 4
StatusIcon {
id: statusIcon
width: statusBaseButton.icon.width
height: statusBaseButton.icon.height
icon: statusBaseButton.icon.name
rotation: statusBaseButton.icon.rotation
anchors.verticalCenter: parent.verticalCenter
opacity: !loading && statusBaseButton.icon.name !== ""
visible: statusBaseButton.icon.name !== ""
color: d.textColor
} // Icon
StatusEmoji {
width: statusBaseButton.icon.width
height: statusBaseButton.icon.height
anchors.verticalCenter: parent.verticalCenter
visible: statusBaseButton.icon.emoji
emojiId: Emoji.iconId(statusBaseButton.icon.emoji, statusBaseButton.icon.emojiSize) || ""
} // Emoji
StatusBaseText {
id: label
opacity: !loading
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: size === StatusBaseButton.Size.Large ? 15 : 13 // by design
color: d.textColor
} // Text
} // Row
onPressed: {
if (!loading) {
statusBaseButton.pressed(mouse)
}
}
onReleased: {
if (!loading) {
statusBaseButton.released(mouse)
}
}
onClicked: {
if (!loading) {
statusBaseButton.clicked(mouse)
}
}
onPressAndHold: {
if (!loading) {
statusBaseButton.pressAndHold(mouse)
}
}
} // Sensor
}
+3 -1
View File
@@ -11,10 +11,12 @@ StatusBaseButton {
hoverColor: type === StatusBaseButton.Type.Primary ? Theme.palette.hoverColor(normalColor) :
type === StatusBaseButton.Type.Normal ? Theme.palette.primaryColor2
: Theme.palette.dangerColor2
disabledColor: Theme.palette.baseColor2
disaledColor: Theme.palette.baseColor2
textColor: type === StatusBaseButton.Type.Primary ? Theme.palette.white :
type === StatusBaseButton.Type.Normal ? Theme.palette.primaryColor1
: Theme.palette.dangerColor1
disabledTextColor: Theme.palette.baseColor1
font.weight: type === StatusBaseButton.Type.Primary ? Font.Medium : Font.Normal
}
+179 -144
View File
@@ -1,20 +1,24 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
Button {
id: root
Rectangle {
id: statusChatInfoButton
objectName: "chatInfoButton"
property string title: text
property string subTitle
property bool muted
property int pinnedMessagesCount
implicitWidth: identicon.width +
Math.max(
statusChatInfoButtonTitle.anchors.leftMargin + statusChatInfoButtonTitle.implicitWidth,
statusChatInfoButtonTitle.anchors.leftMargin + statusChatInfoButtonSubTitle.implicitWidth
) + 8
implicitHeight: 48
property string title: ""
property string subTitle: ""
property bool muted: false
property int pinnedMessagesCount: 0
property StatusAssetSettings asset: StatusAssetSettings {
width: 36
@@ -25,7 +29,9 @@ Button {
property int type: StatusChatInfoButton.Type.PublicChat
property alias tooltip: statusToolTip
property alias sensor: sensor
signal clicked(var mouse)
signal pinnedMessagesCountClicked(var mouse)
signal unmute()
signal linkActivated(string link)
@@ -40,163 +46,192 @@ Button {
CommunityChat // 6
}
horizontalPadding: 4
verticalPadding: 2
spacing: 4
radius: 8
color: sensor.enabled && sensor.containsMouse ? Theme.palette.baseColor2 : "transparent"
background: Rectangle {
radius: 8
color: root.enabled && root.hovered ? Theme.palette.baseColor2 : "transparent"
MouseArea {
id: sensor
anchors.fill: parent
hoverEnabled: true
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
cursorShape: root.hovered ? Qt.PointingHandCursor : undefined
}
}
onClicked: statusChatInfoButton.clicked(mouse)
contentItem: RowLayout {
spacing: root.spacing
// identicon
StatusSmartIdenticon {
id: identicon
asset: root.asset
name: root.title
anchors.left: parent.left
anchors.leftMargin: 4
anchors.verticalCenter: parent.verticalCenter
asset: statusChatInfoButton.asset
name: statusChatInfoButton.title
}
// text
ColumnLayout {
Layout.fillWidth: true
spacing: 2
Item {
id: statusChatInfoButtonTitle
anchors.top: identicon.top
anchors.topMargin: statusChatInfoButtonSubTitle.visible ? 0 : 8
anchors.left: identicon.right
anchors.leftMargin: 8
// title
RowLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeading | Qt.AlignBottom
spacing: root.spacing
width: Math.min(parent.width - anchors.leftMargin
- identicon.width - identicon.anchors.leftMargin,
implicitWidth)
height: chatName.height
StatusIcon {
visible: root.type !== StatusChatInfoButton.Type.OneToOneChat
Layout.preferredWidth: 14
Layout.preferredHeight: 14
color: root.muted ? Theme.palette.baseColor1 : Theme.palette.directColor1
icon: {
switch (root.type) {
case StatusChatInfoButton.Type.PublicCat:
return "tiny/public-chat"
case StatusChatInfoButton.Type.GroupChat:
return "tiny/group"
case StatusChatInfoButton.Type.CommunityChat:
return "tiny/channel"
default:
return "tiny/public-chat"
}
}
}
implicitWidth: statusIcon.width + chatName.anchors.leftMargin + chatName.implicitWidth
+ mutedDelta
StatusBaseText {
objectName: "statusChatInfoButtonNameText"
Layout.fillWidth: true
elide: Text.ElideRight
text: root.type === StatusChatInfoButton.Type.PublicChat && !root.title.startsWith("#") ?
"#" + root.title
: root.title
color: root.muted ? Theme.palette.directColor5 : Theme.palette.directColor1
font.weight: Font.Medium
}
property real mutedDelta: mutedIcon.visible ? mutedIcon.width + 8 : 0
StatusIcon {
objectName: "mutedIcon"
Layout.preferredWidth: 13
Layout.preferredHeight: 13
icon: "tiny/muted"
color: mutedIconSensor.containsMouse ? Theme.palette.directColor1 : Theme.palette.baseColor1
visible: root.muted
StatusIcon {
id: statusIcon
anchors.top: parent.top
anchors.topMargin: -2
anchors.left: parent.left
MouseArea {
id: mutedIconSensor
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: root.unmute()
}
StatusToolTip {
id: statusToolTip
text: qsTr("Unmute")
visible: mutedIconSensor.containsMouse
orientation: StatusToolTip.Orientation.Bottom
y: parent.height + 12
visible: statusChatInfoButton.type !== StatusChatInfoButton.Type.OneToOneChat
width: visible ? 14 : 0
color: statusChatInfoButton.muted ? Theme.palette.baseColor1 : Theme.palette.directColor1
icon: {
switch (statusChatInfoButton.type) {
case StatusChatInfoButton.Type.PublicCat:
return "tiny/public-chat"
break;
case StatusChatInfoButton.Type.GroupChat:
return "tiny/group"
break;
case StatusChatInfoButton.Type.CommunityChat:
return "tiny/channel"
break;
default:
return "tiny/public-chat"
}
}
}
// subtitle
RowLayout {
id: subtitleRow
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeading | Qt.AlignTop
Layout.rightMargin: 4
spacing: 0
StatusBaseText {
id: chatName
objectName: "statusChatInfoButtonNameText"
StatusSelectableText {
Layout.fillWidth: implicitWidth + separator.width + pinIcon.width + pinText.width > subtitleRow.width
text: root.subTitle
visible: root.subTitle
color: Theme.palette.baseColor1
font.pixelSize: 12
onLinkActivated: root.linkActivated(link)
anchors.left: statusIcon.visible ? statusIcon.right : parent.left
anchors.leftMargin: statusIcon.visible ? 1 : 0
anchors.top: parent.top
elide: Text.ElideRight
width: Math.min(implicitWidth, parent.width
- statusIcon.width
- statusChatInfoButtonTitle.mutedDelta)
text: statusChatInfoButton.type === StatusChatInfoButton.Type.PublicChat &&
!statusChatInfoButton.title.startsWith("#") ?
"#" + statusChatInfoButton.title :
statusChatInfoButton.title
color: statusChatInfoButton.muted ? Theme.palette.directColor5 : Theme.palette.directColor1
font.pixelSize: 15
font.weight: Font.Medium
}
StatusIcon {
objectName: "mutedIcon"
id: mutedIcon
anchors.left: chatName.right
anchors.leftMargin: 4
anchors.top: chatName.top
anchors.topMargin: -2
width: 13
icon: "tiny/muted"
color: mutedIconSensor.containsMouse ? Theme.palette.directColor1 : Theme.palette.baseColor1
visible: statusChatInfoButton.muted
MouseArea {
id: mutedIconSensor
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: statusChatInfoButton.unmute()
}
Rectangle {
id: separator
Layout.preferredHeight: 12
Layout.preferredWidth: 1
Layout.leftMargin: 4
Layout.rightMargin: 2
color: Theme.palette.directColor7
visible: root.subTitle && root.pinnedMessagesCount
StatusToolTip {
id: statusToolTip
text: "Unmute"
visible: mutedIconSensor.containsMouse
orientation: StatusToolTip.Orientation.Bottom
y: parent.height + 12
}
}
}
StatusIcon {
id: pinIcon
Layout.preferredHeight: 14
Layout.preferredWidth: 14
visible: root.pinnedMessagesCount > 0
icon: "pin"
color: Theme.palette.baseColor1
Item {
id: statusChatInfoButtonSubTitle
anchors.left: statusChatInfoButtonTitle.left
anchors.top: statusChatInfoButtonTitle.bottom
visible: !!statusChatInfoButton.subTitle || statusChatInfoButton.pinnedMessagesCount > 0
height: visible ? chatType.height : 0
width: Math.min(parent.width - statusChatInfoButtonTitle.anchors.leftMargin
- identicon.width - identicon.anchors.leftMargin - 8,
implicitWidth)
implicitWidth: chatType.implicitWidth + pinIconDelta + 8
property real pinIconDelta: pinIcon.visible ? pinIcon.width + pinIcon.anchors.leftMargin
+ divider.width + divider.anchors.leftMargin
: 0
StatusSelectableText {
id: chatType
text: statusChatInfoButton.subTitle
color: Theme.palette.baseColor1
font.pixelSize: 12
width: Math.min(parent.width - (pinIcon.visible ? divider.width + divider.anchors.leftMargin + pinIcon.width + pinIcon.anchors.leftMargin : 0),
implicitWidth)
onLinkActivated: statusChatInfoButton.linkActivated(link)
}
Rectangle {
id: divider
height: 12
width: 1
color: Theme.palette.directColor7
anchors.left: chatType.right
anchors.leftMargin: 4
anchors.verticalCenter: chatType.verticalCenter
visible: !!chatType.text && pinIcon.visible
}
StatusIcon {
id: pinIcon
anchors.left: divider.visible ? divider.right : parent.left
anchors.leftMargin: -2
anchors.verticalCenter: chatType.verticalCenter
height: 14
visible: statusChatInfoButton.pinnedMessagesCount > 0
icon: "pin"
color: Theme.palette.baseColor1
}
StatusBaseText {
objectName: "StatusChatInfo_pinText"
anchors.left: pinIcon.right
anchors.leftMargin: -6
anchors.verticalCenter: pinIcon.verticalCenter
width: 14
text: statusChatInfoButton.pinnedMessagesCount
font.pixelSize: 12
font.underline: pinCountSensor.containsMouse
visible: pinIcon.visible
color: pinCountSensor.containsMouse ? Theme.palette.directColor1 : Theme.palette.baseColor1
MouseArea {
objectName: "pinMessagesCounterSensor"
id: pinCountSensor
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: statusChatInfoButton.pinnedMessagesCountClicked(mouse)
}
StatusBaseText {
id: pinText
TextMetrics {
id: tm
font: pinText.font
elide: Text.ElideRight
elideWidth: pinText.width
text: qsTr("%Ln pinned message(s)", "", root.pinnedMessagesCount)
}
objectName: "StatusChatInfo_pinText"
Layout.fillWidth: true
text: tm.elidedText !== tm.text ? root.pinnedMessagesCount : tm.text
font.pixelSize: 12
font.underline: pinCountSensor.containsMouse
visible: root.pinnedMessagesCount
color: pinCountSensor.containsMouse ? Theme.palette.directColor1 : Theme.palette.baseColor1
MouseArea {
objectName: "pinMessagesCounterSensor"
id: pinCountSensor
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.pinnedMessagesCountClicked(mouse)
}
}
Item { Layout.fillWidth: true }
}
}
}
@@ -8,13 +8,11 @@ RadioButton {
property string radioButtonColor: ""
property string selectionColor: StatusColors.colors['white']
property int diameter: 44
property int selectorDiameter: 16
property int diameter: 48
property int selectorDiameter: 20
spacing: 0
implicitWidth: 44
implicitHeight: 44
implicitWidth: 48
implicitHeight: 48
indicator: Rectangle {
implicitWidth: control.diameter
@@ -23,13 +21,13 @@ RadioButton {
color: radioButtonColor
Rectangle {
anchors.centerIn: parent
width: control.selectorDiameter
height: control.selectorDiameter
visible: control.checked
radius: width/2
color: selectionColor
border.color: StatusColors.colors['grey3']
visible: control.checked
anchors.centerIn: parent
}
}
}
@@ -36,7 +36,6 @@ Column {
StatusBaseText {
id: title
width: parent.width
verticalAlignment: Text.AlignVCenter
font.pixelSize: 13
color: Theme.palette.baseColor1
@@ -47,7 +46,6 @@ Column {
columns: 6
rowSpacing: 16
columnSpacing: 32
Repeater {
objectName: "statusColorRepeater"
model: root.model
+9 -5
View File
@@ -3,15 +3,19 @@ import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
StatusBaseButton {
id: statusFlatButton
normalColor: "transparent"
hoverColor: type === StatusBaseButton.Type.Normal ? Theme.palette.primaryColor3
: Theme.palette.dangerColor3
disabledColor: "transparent"
hoverColor: type === StatusBaseButton.Type.Normal ? Theme.palette.primaryColor3
: Theme.palette.dangerColor3
disaledColor: "transparent"
textColor: type === StatusBaseButton.Type.Normal ? Theme.palette.primaryColor1
: Theme.palette.dangerColor1
disabledTextColor: Theme.palette.baseColor1
borderColor: (type === StatusBaseButton.Type.Normal || hovered) && !loading ? "transparent"
: Theme.palette.baseColor2
border.color: type === StatusBaseButton.Type.Normal || hovered ? "transparent"
: Theme.palette.baseColor2
rightPadding: icon.name !== "" ? 18 : defaultRightPadding
leftPadding: icon.name !== "" ? 14 : defaultLeftPadding
}
@@ -113,11 +113,12 @@ Row {
implicitHeight: 32
topPadding: 8
bottomPadding: 0
horizontalPadding: 4
defaultLeftPadding: 4
defaultRightPadding: 4
hoverColor: Theme.palette.statusFloatingButtonHighlight
normalColor: Theme.palette.baseColor3
asset.name: "more"
asset.bgColor: "transparent"
icon.name: "more"
icon.bgColor: "transparent"
onClicked: popupMenu.popup(parent.x, y + height + 8)
}
}
+45 -69
View File
@@ -77,20 +77,6 @@ Item {
*/
property int circleDiameter: 16
/*!
\qmlproperty int StatusPinInput::additionalSpacingOnEveryNItems
This property allows you to customize spacing among every N-th pin. By default the value is 0, which
means only regular `circleSpacing` will be applied, meaning that spacing among all pins will be the same.
*/
property int additionalSpacingOnEveryNItems: 0
/*!
\qmlproperty int StatusPinInput::additionalSpacing
This property allows you to customize spacing between pin circles on every `additionalSpacingOnEveryNItems` items.
This additionalSpacing won't be applied if `additionalSpacingOnEveryNItems` is set to `0`.
*/
property int additionalSpacing: 0
QtObject {
id: d
property int currentPinIndex: 0
@@ -165,8 +151,8 @@ Item {
}
}
implicitWidth: childrenRect.width
implicitHeight: childrenRect.height
width: (root.circleDiameter + root.circleSpacing) * root.pinLen - root.circleSpacing
height: root.circleDiameter
// Pin input data management object:
TextInput {
@@ -210,66 +196,56 @@ Item {
id: repeater
model: root.pinLen
Item {
id: container
Rectangle {
id: background
property string innerState: "EMPTY"
property alias blinkingAnimation: blinkingAnimation
property alias innerOpacity: inner.opacity
height: root.circleDiameter
width: {
if (index > 0 && index < root.pinLen-1 && (index+1) % root.additionalSpacingOnEveryNItems == 0) {
return root.circleDiameter + root.additionalSpacing
}
return root.circleDiameter
}
width: root.circleDiameter
height: width
color: Theme.palette.primaryColor2
radius: 0.5 * width
Rectangle {
width: root.circleDiameter
height: width
color: Theme.palette.primaryColor2
radius: 0.5 * width
Rectangle {
id: inner
state: background.innerState
anchors.centerIn: parent
height: width
color: Theme.palette.primaryColor1
radius: 0.5 * width
states: [
State {
name: "NEXT"
StateChangeScript { script: { if(inputText.focus) blinkingAnimation.start() } }
PropertyChanges {target: inner; width: root.circleDiameter / 2}
},
State {
name: "FILLED"
StateChangeScript { script: if(blinkingAnimation.running) blinkingAnimation.stop() }
PropertyChanges {target: inner; width: root.circleDiameter}
PropertyChanges {target: inner; opacity: 1}
},
State {
name: "EMPTY"
StateChangeScript { script: if(blinkingAnimation.running) blinkingAnimation.stop() }
PropertyChanges {target: inner; width: 0}
PropertyChanges {target: inner; opacity: 1}
}
]
Rectangle {
id: inner
state: container.innerState
anchors.centerIn: parent
height: width
color: Theme.palette.primaryColor1
radius: 0.5 * width
states: [
State {
name: "NEXT"
StateChangeScript { script: { if(inputText.focus) blinkingAnimation.start() } }
PropertyChanges {target: inner; width: root.circleDiameter / 2}
},
State {
name: "FILLED"
StateChangeScript { script: if(blinkingAnimation.running) blinkingAnimation.stop() }
PropertyChanges {target: inner; width: root.circleDiameter}
PropertyChanges {target: inner; opacity: 1}
},
State {
name: "EMPTY"
StateChangeScript { script: if(blinkingAnimation.running) blinkingAnimation.stop() }
PropertyChanges {target: inner; width: 0}
PropertyChanges {target: inner; opacity: 1}
}
]
// Animation on transitions
Behavior on width { NumberAnimation { duration: 200 } }
// Animation on transitions
Behavior on width { NumberAnimation { duration: 200 } }
// Animation on "cursor" blinking
SequentialAnimation {
id: blinkingAnimation
loops: Animation.Infinite
running: visible
NumberAnimation { target: inner; property: "opacity"; to: 0; duration: 800;}
NumberAnimation { target: inner; property: "opacity"; to: 1; duration: 800;}
}
}
}
// Animation on "cursor" blinking
SequentialAnimation {
id: blinkingAnimation
loops: Animation.Infinite
running: visible
NumberAnimation { target: inner; property: "opacity"; to: 0; duration: 800;}
NumberAnimation { target: inner; property: "opacity"; to: 1; duration: 800;}
}
}
}
}
}
+2 -2
View File
@@ -159,8 +159,8 @@ ThemePalette {
property QtObject statusMessage: QtObject {
property color emojiReactionBackground: "#2d2823"
property color emojiReactionBackgroundHovered: "#3a3632"
property color emojiReactionActiveBackground: getColor('blue')
property color emojiReactionActiveBackgroundHovered: Qt.darker(emojiReactionActiveBackground, 1.1)
property color emojiReactionActiveBackground: "#353a4d"
property color emojiReactionActiveBackgroundHovered: "#cbd5f1"
}
}
+2 -2
View File
@@ -157,8 +157,8 @@ ThemePalette {
property QtObject statusMessage: QtObject {
property color emojiReactionBackground: "#e2e6e9"
property color emojiReactionBackgroundHovered: "#d7dadd"
property color emojiReactionActiveBackground: getColor('blue')
property color emojiReactionActiveBackgroundHovered: Qt.darker(emojiReactionActiveBackground, 1.1)
property color emojiReactionActiveBackground: getColor('blue6')
property color emojiReactionActiveBackgroundHovered: "#cbd5f1"
}
}
+71 -77
View File
@@ -1,6 +1,7 @@
import QtQuick 2.13
QtObject {
id: theme
property string name
@@ -9,95 +10,88 @@ QtObject {
source: "../../../assets/fonts/Inter/Inter-Regular.otf"
}
property var baseFontThin: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Thin.otf"
}
property var baseFontExtraLight: FontLoader {
source: "../../../assets/fonts/Inter/Inter-ExtraLight.otf"
}
property var baseFontLight: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Light.otf"
}
property var baseFontMedium: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Medium.otf"
}
property var baseFontBold: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Bold.otf"
}
property var baseFontExtraBold: FontLoader {
source: "../../../assets/fonts/Inter/Inter-ExtraBold.otf"
}
property var baseFontBlack: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Black.otf"
}
property var monoFont: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Regular.otf"
}
property var monoFontThin: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Thin.otf"
}
property var monoFontExtraLight: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-ExtraLight.otf"
}
property var monoFontLight: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Light.otf"
}
property var monoFontMedium: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Medium.otf"
}
property var monoFontBold: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Bold.otf"
}
property var monoFontExtraBold: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-ExtraBold.otf"
}
property var monoFontBlack: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Black.otf"
}
property var codeFont: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Regular.ttf"
}
readonly property QtObject _d: QtObject {
// specific font variants should not be accessed directly
property var codeFontThin: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Thin.ttf"
}
// Inter font variants
property var baseFontThin: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Thin.otf"
}
property var codeFontExtraLight: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-ExtraLight.ttf"
}
property var baseFontExtraLight: FontLoader {
source: "../../../assets/fonts/Inter/Inter-ExtraLight.otf"
}
property var codeFontLight: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Light.ttf"
}
property var baseFontLight: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Light.otf"
}
property var codeFontMedium: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Medium.ttf"
}
property var baseFontMedium: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Medium.otf"
}
property var baseFontBold: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Bold.otf"
}
property var baseFontExtraBold: FontLoader {
source: "../../../assets/fonts/Inter/Inter-ExtraBold.otf"
}
property var baseFontBlack: FontLoader {
source: "../../../assets/fonts/Inter/Inter-Black.otf"
}
// Inter Status font variants
property var monoFontThin: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Thin.otf"
}
property var monoFontExtraLight: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-ExtraLight.otf"
}
property var monoFontLight: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Light.otf"
}
property var monoFontMedium: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Medium.otf"
}
property var monoFontBold: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Bold.otf"
}
property var monoFontExtraBold: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-ExtraBold.otf"
}
property var monoFontBlack: FontLoader {
source: "../../../assets/fonts/InterStatus/InterStatus-Black.otf"
}
// Roboto font variants
property var codeFontThin: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Thin.ttf"
}
property var codeFontExtraLight: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-ExtraLight.ttf"
}
property var codeFontLight: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Light.ttf"
}
property var codeFontMedium: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Medium.ttf"
}
property var codeFontBold: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Bold.ttf"
}
property var codeFontBold: FontLoader {
source: "../../../assets/fonts/RobotoMono/RobotoMono-Bold.ttf"
}
property color black: getColor('black')
+4 -22
View File
@@ -81,19 +81,11 @@ SplitView {
property bool showHeader: true
/*!
\qmlproperty alias StatusAppLayout::notificationCount
This property holds a reference to the notificationCount property of the
header component.
\qmlproperty int StatusAppLayout::notificationCount
This property holds the number of notifications to be displayed in the notifications
button of the header component.
*/
property alias notificationCount: statusToolBar.notificationCount
/*!
\qmlproperty alias StatusAppLayout::backButtonName
This property holds a reference to the backButtonName property of the
header component.
*/
property alias backButtonName: statusToolBar.backButtonName
property int notificationCount
/*!
\qmlproperty alias StatusAppLayout::headerContent
This property holds a reference to the custom header content of
@@ -107,13 +99,6 @@ SplitView {
*/
property alias notificationButton: statusToolBar.notificationButton
/*!
\qmlsignal
This signal is emitted when the back button of the header component
is pressed.
*/
signal backButtonClicked()
/*!
\qmlsignal
This signal is emitted when the notification button of the header component
@@ -149,9 +134,6 @@ SplitView {
id: statusToolBar
width: visible ? parent.width : 0
visible: root.showHeader
onBackButtonClicked: {
root.backButtonClicked();
}
onNotificationButtonClicked: {
root.notificationButtonClicked();
}
+3 -2
View File
@@ -1,3 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.9386 19C14.6023 19 14.3607 19.3279 14.392 19.6628C14.402 19.7703 14.4075 19.8827 14.4075 20C14.4075 21.3889 13.2012 22.75 11.6575 22.75C10.1139 22.75 8.90752 21.3889 8.90752 20C8.90752 19.8827 8.91302 19.7703 8.92307 19.6628C8.95437 19.3279 8.71275 19 8.37646 19H6.29189L4.28033 21.0116C3.98744 21.3045 3.51256 21.3045 3.21967 21.0116C2.92678 20.7187 2.92678 20.2438 3.21967 19.9509L19.1296 4.041C19.4225 3.74811 19.8973 3.74811 20.1902 4.041C20.4831 4.33389 20.4831 4.80877 20.1902 5.10166L16.7885 8.50335L17.4584 12.3548C17.5884 13.1028 17.9287 13.7983 18.4394 14.3601L19.6163 15.6547C20.7843 16.9394 19.8727 19 18.1364 19H14.9386ZM15.4916 9.80031L7.79189 17.5H18.1364C18.5705 17.5 18.7984 16.9849 18.5064 16.6637L17.3295 15.3691C16.6273 14.5967 16.1594 13.6403 15.9805 12.6118L15.4916 9.80031ZM7.53808 11.4413L5.46494 13.5144C5.65331 13.152 5.78602 12.7612 5.85669 12.3548L6.97216 5.94085C7.36832 3.66293 9.34541 2 11.6575 2C13.1002 2 14.4125 2.64744 15.2916 3.68774L14.2254 4.75394C13.6248 3.98434 12.69 3.5 11.6575 3.5C10.0747 3.5 8.72118 4.63842 8.44998 6.19786L7.53808 11.4413ZM10.6991 19.0188C10.7101 19.0073 10.7257 19 10.7416 19H12.5735C12.5894 19 12.6045 19.0068 12.6155 19.0183C12.6184 19.0217 12.6255 19.0302 12.6356 19.0438C12.6586 19.0744 12.6965 19.13 12.7367 19.2104C12.8158 19.3687 12.9075 19.6296 12.9075 20C12.9075 20.6111 12.323 21.25 11.6575 21.25C10.992 21.25 10.4075 20.6111 10.4075 20C10.4075 19.6296 10.4992 19.3687 10.5783 19.2104C10.6185 19.13 10.6564 19.0744 10.6794 19.0438C10.6896 19.0302 10.6962 19.0222 10.6991 19.0188Z" fill="#0D1625"/>
<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.281 20C14.9447 20 14.7031 20.3279 14.7344 20.6628C14.7444 20.7703 14.7499 20.8827 14.7499 21C14.7499 22.3889 13.5436 23.75 11.9999 23.75C10.4563 23.75 9.24992 22.3889 9.24992 21C9.24992 20.8827 9.25542 20.7703 9.26547 20.6628C9.29677 20.3279 9.05515 20 8.71885 20H5.52103C3.78474 20 2.87319 17.9394 4.04115 16.6547L5.218 15.3601C5.72872 14.7983 6.069 14.1028 6.19909 13.3548L7.31456 6.94085C7.71072 4.66293 9.68781 3 11.9999 3C14.312 3 16.2891 4.66293 16.6853 6.94085L17.8008 13.3548C17.9308 14.1028 18.2711 14.7983 18.7818 15.3601L19.9587 16.6547C21.1266 17.9394 20.2151 20 18.4788 20H15.281ZM11.0322 20.0283L11.0313 20.0293L11.039 20.0214L11.0415 20.0188C11.0427 20.0175 11.0433 20.0168 11.0434 20.0167C11.0438 20.0163 11.0434 20.0167 11.0434 20.0167L11.0415 20.0188C11.0525 20.0073 11.0681 20 11.084 20H12.9159C12.9318 20 12.9469 20.0068 12.9579 20.0183C12.9608 20.0217 12.9679 20.0302 12.978 20.0438C13.001 20.0744 13.0389 20.13 13.0791 20.2104C13.1582 20.3687 13.2499 20.6296 13.2499 21C13.2499 21.6111 12.6654 22.25 11.9999 22.25C11.3344 22.25 10.7499 21.6111 10.7499 21C10.7499 20.6296 10.8416 20.3687 10.9207 20.2104C10.9609 20.13 10.9988 20.0744 11.0218 20.0438C11.032 20.0302 11.0386 20.0222 11.0415 20.0188L11.039 20.0214L11.0372 20.0233L11.034 20.0265L11.0322 20.0283ZM5.15106 17.6637L6.32791 16.3691C7.03015 15.5967 7.49804 14.6403 7.67691 13.6118L8.79238 7.19786C9.06358 5.63842 10.4171 4.5 11.9999 4.5C13.5828 4.5 14.9363 5.63842 15.2075 7.19786L16.3229 13.6118C16.5018 14.6403 16.9697 15.5967 17.6719 16.3691L18.8488 17.6637C19.1408 17.9849 18.9129 18.5 18.4788 18.5H5.52103C5.08696 18.5 4.85907 17.9849 5.15106 17.6637Z" fill="black"/>
<rect x="0.585786" y="20.7988" width="28" height="4" rx="2" transform="rotate(-45 0.585786 20.7988)" fill="black" stroke="white" stroke-width="2"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB