feat(Chat/BlockedContacts) Add a Blocked bar for blocked user profile

Use new UI StatusBanner with Danger variant.
Modify StatusQ external to new master commit.
This commit is contained in:
Noelia Santos 2022-01-07 16:31:58 +01:00 committed by Noelia
parent f69db2c97b
commit b5f4e3783c
3 changed files with 17 additions and 31 deletions

@ -1 +1 @@
Subproject commit 5e19140c8b066b5058110fc27b20296726c40a87 Subproject commit 35d12f444d4e1dacc56f47e25853281477177063

View File

@ -89,12 +89,21 @@ StatusModal {
anchors.top: parent.top anchors.top: parent.top
width: parent.width width: parent.width
// Blocked User Status Bar
StatusBanner {
id: blockedUsrBar
width: parent.width
visible: isBlocked
type: StatusBanner.Type.Danger
statusText: qsTr("Blocked")
}
Item { Item {
height: 16 height: 16
width: parent.width width: parent.width
} }
StatusDescriptionListItem { StatusDescriptionListItem {
title: ((isCurrentUser && profileModel.ens.preferredUsername) || isEnsVerified) ? qsTr("ENS username") : qsTr("Username") title: ((isCurrentUser && profileModel.ens.preferredUsername) || isEnsVerified) ? qsTr("ENS username") : qsTr("Username")
subTitle: isCurrentUser ? profileModel.ens.preferredUsername || userName : userName subTitle: isCurrentUser ? profileModel.ens.preferredUsername || userName : userName
tooltip.text: qsTr("Copy to clipboard") tooltip.text: qsTr("Copy to clipboard")
@ -121,11 +130,6 @@ StatusModal {
width: parent.width width: parent.width
} }
StatusModalDivider {
topPadding: 12
bottomPadding: 16
}
StatusDescriptionListItem { StatusDescriptionListItem {
title: qsTr("Share Profile URL") title: qsTr("Share Profile URL")
subTitle: { subTitle: {
@ -163,12 +167,6 @@ StatusModal {
width: parent.width width: parent.width
} }
StatusModalDivider {
visible: !isCurrentUser
topPadding: 8
bottomPadding: 12
}
StatusDescriptionListItem { StatusDescriptionListItem {
visible: !isCurrentUser visible: !isCurrentUser
title: qsTr("Chat settings") title: qsTr("Chat settings")

View File

@ -261,25 +261,13 @@ Item {
} }
} }
Item { // Blocked User Status Bar
Layout.fillWidth: true StatusBanner {
Layout.preferredHeight: 40 id: blockedUsrBar
Layout.alignment: Qt.AlignHCenter width: parent.width
visible: isBlocked visible: isBlocked
type: StatusBanner.Type.Danger
Rectangle { statusText: qsTr("Blocked")
id: blockedBanner
anchors.fill: parent
color: Style.current.red
opacity: 0.1
}
Text {
id: blockedText
anchors.centerIn: blockedBanner
color: Style.current.red
text: qsTr("Blocked")
}
} }
StackLayout { StackLayout {