fix(@desktop/wallet): notification centre item relating to import of keypair to another of the user's synced devices (point 1)
Point 1 of #11968
This commit is contained in:
parent
365fd37f99
commit
6b570d1114
|
@ -20,6 +20,7 @@ type ActivityCenterNotificationType* {.pure.}= enum
|
|||
CommunityKicked = 9,
|
||||
ContactVerification = 10
|
||||
ContactRemoved = 11
|
||||
NewKeypairAddedToPairedDevice = 12
|
||||
|
||||
type ActivityCenterGroup* {.pure.}= enum
|
||||
All = 0,
|
||||
|
@ -144,7 +145,8 @@ proc activityCenterNotificationTypesByGroup*(group: ActivityCenterGroup) : seq[i
|
|||
ActivityCenterNotificationType.CommunityMembershipRequest.int,
|
||||
ActivityCenterNotificationType.CommunityKicked.int,
|
||||
ActivityCenterNotificationType.ContactVerification.int,
|
||||
ActivityCenterNotificationType.ContactRemoved.int
|
||||
ActivityCenterNotificationType.ContactRemoved.int,
|
||||
ActivityCenterNotificationType.NewKeypairAddedToPairedDevice.int
|
||||
]
|
||||
of ActivityCenterGroup.Mentions:
|
||||
return @[ActivityCenterNotificationType.Mention.int]
|
||||
|
|
|
@ -113,6 +113,8 @@ Popup {
|
|||
return communityKickedNotificationComponent
|
||||
case ActivityCenterStore.ActivityCenterNotificationType.ContactRemoved:
|
||||
return contactRemovedComponent
|
||||
case ActivityCenterStore.ActivityCenterNotificationType.NewKeypairAddedToPairedDevice:
|
||||
return newKeypairFromPairedDeviceComponent
|
||||
default:
|
||||
return null
|
||||
}
|
||||
|
@ -220,4 +222,14 @@ Popup {
|
|||
onCloseActivityCenter: root.close()
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: newKeypairFromPairedDeviceComponent
|
||||
|
||||
ActivityNotificationNewKeypairFromPairedDevice {
|
||||
filteredIndex: parent.filteredIndex
|
||||
notification: parent.notification
|
||||
onCloseActivityCenter: root.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,8 @@ QtObject {
|
|||
CommunityMembershipRequest = 8,
|
||||
CommunityKicked = 9,
|
||||
ContactVerification = 10,
|
||||
ContactRemoved = 11
|
||||
ContactRemoved = 11,
|
||||
NewKeypairAddedToPairedDevice = 12
|
||||
}
|
||||
|
||||
enum ActivityCenterReadType {
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
ActivityNotificationBase {
|
||||
id: root
|
||||
|
||||
ctaComponent: StatusLinkText {
|
||||
text: qsTr("View keypair import options")
|
||||
color: Theme.palette.primaryColor1
|
||||
font.pixelSize: Theme.primaryTextFontSize
|
||||
font.weight: Font.Normal
|
||||
onClicked: {
|
||||
Global.changeAppSectionBySectionType(Constants.appSection.profile, Constants.settingsSubsection.wallet)
|
||||
root.closeActivityCenter()
|
||||
}
|
||||
}
|
||||
|
||||
bodyComponent: RowLayout {
|
||||
implicitWidth: parent.width
|
||||
|
||||
spacing: 8
|
||||
|
||||
StatusSmartIdenticon {
|
||||
Layout.preferredWidth: 40
|
||||
Layout.preferredHeight: 40
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.leftMargin: Style.current.padding
|
||||
Layout.topMargin: 2
|
||||
|
||||
asset {
|
||||
width: 24
|
||||
height: 24
|
||||
name: "wallet"
|
||||
color: Theme.palette.primaryColor1
|
||||
bgWidth: 40
|
||||
bgHeight: 40
|
||||
bgColor: Theme.palette.primaryColor3
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 2
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
|
||||
StatusMessageHeader {
|
||||
displayNameLabel.text: qsTr("New keypair added")
|
||||
timestamp: root.notification.timestamp
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("%1 keypair was added to one of your synced devices").arg(root.notification.message.unparsedText)
|
||||
font.italic: true
|
||||
wrapMode: Text.WordWrap
|
||||
color: Theme.palette.baseColor1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
Subproject commit e732000d3168888a3fb3b0c1aa1e56bf75c09d27
|
||||
Subproject commit abe43a83ae700337a72b3ca2e199bcd4c1034365
|
Loading…
Reference in New Issue