Skip to content

Commit

Permalink
transaction settings added to sign send modal
Browse files Browse the repository at this point in the history
  • Loading branch information
saledjenic committed Jan 23, 2025
1 parent 3b9e852 commit 79e9c9a
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ui/StatusQ/src/StatusQ/Popups/Dialog/StatusDialogHeader.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ Rectangle {

property alias leftComponent: leftComponentLoader.sourceComponent

property bool internalPopupActive
property color internalOverlayColor
property int popupFullHeight
property Component internalPopupComponent

signal closeInternalPopup()

color: Theme.palette.statusModal.backgroundColor
radius: 8

Expand Down Expand Up @@ -73,4 +80,29 @@ Rectangle {
samples: 37
color: Theme.palette.dropShadow
}

Rectangle {
id: internalOverlay
anchors.fill: parent
anchors.bottomMargin: -1 * root.popupFullHeight + root.height
visible: root.internalPopupActive
radius: root.radius
color: root.internalOverlayColor

MouseArea {
anchors.fill: parent
anchors.bottomMargin: popupLoader.height
onClicked: {
root.closeInternalPopup()
}
}
}

Loader {
id: popupLoader
anchors.bottom: parent.bottom
anchors.bottomMargin: internalOverlay.anchors.bottomMargin
active: root.internalPopupActive
sourceComponent: root.internalPopupComponent
}
}
1 change: 1 addition & 0 deletions ui/StatusQ/src/assets.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@
<file>assets/img/icons/security.svg</file>
<file>assets/img/icons/seed-phrase.svg</file>
<file>assets/img/icons/send.svg</file>
<file>assets/img/icons/settings-advance.svg</file>
<file>assets/img/icons/settings-advanced.svg</file>
<file>assets/img/icons/settings.svg</file>
<file>assets/img/icons/share-android.svg</file>
Expand Down
6 changes: 6 additions & 0 deletions ui/StatusQ/src/assets/img/icons/settings-advance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions ui/app/AppLayouts/Wallet/popups/SignTransactionModalBase.qml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ StatusDialog {

default property alias contents: contentsLayout.data

property bool internalPopupActive: false
property color internalOverlayColor: Theme.palette.backdropColor
property Component internalPopupComponent

signal closeInternalPopup()

width: 480
padding: 0

Expand All @@ -113,6 +119,13 @@ StatusDialog {
actions.closeButton.visible: false // Close hidden explicitely until we have persistent notifications in place to reopen this dialog from outside

leftComponent: root.headerIconComponent

internalPopupActive: root.internalPopupActive
internalOverlayColor: root.internalOverlayColor
popupFullHeight: root.height
internalPopupComponent: root.internalPopupComponent

onCloseInternalPopup: root.closeInternalPopup()
}

footer: StatusDialogFooter {
Expand Down
23 changes: 23 additions & 0 deletions ui/app/AppLayouts/Wallet/popups/simpleSend/SendSignModal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import StatusQ.Controls 0.1
import StatusQ.Components 0.1

import AppLayouts.Wallet.panels 1.0
import AppLayouts.Wallet.views 1.0
import AppLayouts.Wallet.popups 1.0

import utils 1.0
Expand Down Expand Up @@ -164,8 +165,27 @@ SignTransactionModalBase {
loading: root.feesLoading
}
}
StatusFlatButton {
icon.name: "settings-advance"
textColor: hovered? Theme.palette.directColor1 : Theme.palette.baseColor1
onClicked: {
root.internalPopupActive = true
}
}
}
}

property Component internalPopup: TransactionSettings {

onCancelClicked: {
root.internalPopupActive = false
}
}
internalPopupComponent: internalPopup

onCloseInternalPopup: {
root.internalPopupActive = false
}

// Send Asset
SignInfoBox {
Expand Down Expand Up @@ -194,6 +214,7 @@ SignTransactionModalBase {
}
]
visible: !root.isCollectible
enabled: !root.internalPopupActive
}

// Send Collectible
Expand All @@ -220,6 +241,7 @@ SignTransactionModalBase {
onOpenLink: (link) => root.openLinkWithConfirmation(link)
}
visible: root.isCollectible
enabled: !root.internalPopupActive
}

// From
Expand Down Expand Up @@ -261,6 +283,7 @@ SignTransactionModalBase {
onOpenLink: (link) => root.openLinkWithConfirmation(link)
}
]
enabled: !root.internalPopupActive
}

// Network
Expand Down

0 comments on commit 79e9c9a

Please sign in to comment.