mirror of
https://github.com/status-im/status-desktop.git
synced 2025-03-01 23:11:09 +00:00
* feat(WalletConnect): Implement sign request modal 1. Implementing sign request modal based on SignTransactionModalBase 2. Adding storybook page 3. Integrate it in the app 4. Removing DAppRequestModal 5. Update RoundImageWithBadge to preserve aspect ratio between badge and main image * fix(WalletConnect): Remove unneeded properties from WalletConnectService API Removing `selectedAccountAddress` and `loginType`. These properties are now passed through DAppsWorkflow API * fix(WalletConnect): Removing unnecessary changes
86 lines
2.2 KiB
QML
86 lines
2.2 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Layouts 1.15
|
|
import QtGraphicalEffects 1.15
|
|
|
|
import StatusQ.Core 0.1
|
|
import StatusQ.Core.Theme 0.1
|
|
import StatusQ.Components 0.1
|
|
|
|
import utils 1.0
|
|
|
|
Item {
|
|
id: root
|
|
|
|
property url imageUrl: ""
|
|
property string badgeIcon: "walletConnect"
|
|
property string fallbackIcon: "dapp"
|
|
|
|
readonly property bool iconLoaded: !mainImage.isError && !mainImage.isLoading && mainImage.image.source !== ""
|
|
|
|
implicitWidth: mainImage.implicitWidth
|
|
implicitHeight: mainImage.implicitHeight
|
|
|
|
Item {
|
|
id: imageContainer
|
|
|
|
width: parent.width
|
|
height: width
|
|
|
|
StatusRoundedImage {
|
|
id: mainImage
|
|
|
|
width: parent.width
|
|
height: width
|
|
visible: !isError && !isLoading && root.imageUrl != ""
|
|
image.source: root.imageUrl
|
|
}
|
|
|
|
Loader {
|
|
anchors.fill: mainImage
|
|
active: !mainImage.visible
|
|
sourceComponent: StatusRoundedComponent {
|
|
id: imageWrapper
|
|
color: Theme.palette.primaryColor3
|
|
StatusIcon {
|
|
anchors.fill: imageWrapper
|
|
anchors.margins: imageWrapper.width / 4.5
|
|
color: Theme.palette.primaryColor1
|
|
icon: "dapp"
|
|
}
|
|
} }
|
|
|
|
layer.enabled: true
|
|
layer.effect: OpacityMask {
|
|
id: mask
|
|
invert: true
|
|
|
|
maskSource: Item {
|
|
width: mask.width + 2
|
|
height: mask.height + 2
|
|
|
|
Rectangle {
|
|
x: badge.x + 1
|
|
y: badge.y + 1
|
|
|
|
width: badge.width + 2
|
|
height: badge.width + 2
|
|
radius: badge.width / 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
StatusRoundIcon {
|
|
id: badge
|
|
width: root.width / 3.6
|
|
height: width
|
|
anchors.bottom: parent.bottom
|
|
anchors.right: parent.right
|
|
asset.name: root.badgeIcon
|
|
asset.color: "transparent"
|
|
asset.width: width
|
|
asset.height: height
|
|
asset.bgWidth: width
|
|
asset.bgHeight: height
|
|
}
|
|
} |