chore(CommunitySettings): Remove outdated and unused SignTokenTransactionsPopup

This commit is contained in:
Michał Cieślak 2023-09-21 18:23:25 +02:00 committed by Michał
parent 1825658f01
commit 7dcb577c8b
3 changed files with 0 additions and 260 deletions

View File

@ -1,122 +0,0 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import Storybook 1.0
import Models 1.0
import AppLayouts.Communities.popups 1.0
SplitView {
Logs { id: logs }
SplitView {
orientation: Qt.Vertical
SplitView.fillWidth: true
Item {
SplitView.fillWidth: true
SplitView.fillHeight: true
PopupBackground {
anchors.fill: parent
}
Button {
anchors.centerIn: parent
text: "Reopen"
onClicked: dialog.open()
}
SignTokenTransactionsPopup {
id: dialog
anchors.centerIn: parent
title: qsTr("Sign transaction - Self-destruct %1 tokens").arg(dialog.tokenName)
accountName: editorAccount.text
tokenName: editorCollectible.text
networkName: editorNetwork.text
feeText: editorFee.text
isFeeLoading: editorFeeLoader.checked
onSignTransactionClicked: logs.logEvent("SignTokenTransactionsPopup::onSignTransactionClicked")
onCancelClicked: logs.logEvent("SignTokenTransactionsPopup::onCancelClicked")
}
}
LogsAndControlsPanel {
id: logsAndControlsPanel
SplitView.minimumHeight: 100
SplitView.preferredHeight: 150
logsView.logText: logs.logText
}
}
Pane {
SplitView.minimumWidth: 300
SplitView.preferredWidth: 300
ColumnLayout {
Label {
Layout.fillWidth: true
text: "Account name"
}
TextField {
id: editorAccount
background: Rectangle { border.color: 'lightgrey' }
Layout.preferredWidth: 200
text: "helloworld"
}
Label {
Layout.fillWidth: true
text: "Collectible name"
}
TextField {
id: editorCollectible
background: Rectangle { border.color: 'lightgrey' }
Layout.preferredWidth: 200
text: "Anniversary"
}
Label {
Layout.fillWidth: true
text: "Network name"
}
TextField {
id: editorNetwork
background: Rectangle { border.color: 'lightgrey' }
Layout.preferredWidth: 200
text: "Optimism"
}
Label {
Layout.fillWidth: true
text: "Network fee"
}
TextField {
id: editorFee
background: Rectangle { border.color: 'lightgrey' }
Layout.preferredWidth: 200
text: "0.0015 ETH ($75.34)"
}
Switch {
id: editorFeeLoader
text: "Is fee loading?"
checked: false
}
}
}
}
// category: Popups

View File

@ -1,137 +0,0 @@
import QtQuick 2.14
import QtQuick.Layouts 1.14
import QtQml.Models 2.14
import StatusQ.Core 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Popups.Dialog 0.1
import StatusQ.Core.Theme 0.1
import utils 1.0
StatusDialog {
id: root
property alias accountName: accountText.text
property alias feeText: feeText.text
property alias errorText: errorTxt.text
property alias isFeeLoading: feeLoading.visible
property string tokenName
property string networkName
signal signTransactionClicked()
signal cancelClicked()
QtObject {
id: d
property int minTextWidth: 50
}
implicitWidth: 520 // by design
topPadding: 2 * Style.current.padding // by design
bottomPadding: topPadding
contentItem: ColumnLayout {
id: column
spacing: Style.current.padding
RowLayout {
id: accountRow
Layout.fillWidth: true
StatusBaseText {
Layout.maximumWidth: accountRow.width - accountRow.spacing - accountText.implicitWidth
Layout.minimumWidth: d.minTextWidth
text: qsTr("Account:")
horizontalAlignment: Text.AlignLeft
font.pixelSize: Style.current.primaryTextFontSize
elide: Text.ElideMiddle
}
StatusBaseText {
id: accountText
Layout.fillWidth: true
Layout.minimumWidth: d.minTextWidth
horizontalAlignment: Text.AlignRight
elide: Text.ElideRight
font.pixelSize: Style.current.primaryTextFontSize
}
}
RowLayout {
id: feeRow
Layout.fillWidth: true
StatusBaseText {
Layout.maximumWidth: feeRow.width - feeRow.spacing - (root.isFeeLoading ? feeLoading.implicitWidth : feeText.implicitWidth)
Layout.minimumWidth: d.minTextWidth
text: qsTr("%1 transaction fee:").arg(root.networkName)
horizontalAlignment: Text.AlignLeft
font.pixelSize: Style.current.primaryTextFontSize
elide: Text.ElideMiddle
}
// Filler
Item {
visible: feeLoading.visible
Layout.fillWidth: true
}
StatusDotsLoadingIndicator {
id: feeLoading
}
StatusBaseText {
id: feeText
visible: !feeLoading.visible
Layout.fillWidth: true
Layout.minimumWidth: d.minTextWidth
horizontalAlignment: Text.AlignRight
color: Theme.palette.baseColor1
elide: Text.ElideRight
font.pixelSize: Style.current.primaryTextFontSize
}
}
StatusBaseText {
id: errorTxt
Layout.fillWidth: true
horizontalAlignment: Text.AlignLeft
elide: Text.ElideRight
font.pixelSize: Style.current.primaryTextFontSize
color: Theme.palette.dangerColor1
visible: root.errorText !== ""
}
}
footer: StatusDialogFooter {
spacing: Style.current.padding
rightButtons: ObjectModel {
StatusButton {
text: qsTr("Cancel")
type: StatusBaseButton.Type.Danger
onClicked: {
root.cancelClicked()
root.close()
}
}
StatusButton {
enabled: root.errorText === "" && !root.isFeeLoading
icon.name: "password"
text: qsTr("Sign transaction")
onClicked: {
root.signTransactionClicked()
root.close()
}
}
}
}
}

View File

@ -17,7 +17,6 @@ RecipientTypeSelectionDropdown 1.0 RecipientTypeSelectionDropdown.qml
RemotelyDestructPopup 1.0 RemotelyDestructPopup.qml
SharedAddressesPopup 1.0 SharedAddressesPopup.qml
SignMultiTokenTransactionsPopup 1.0 SignMultiTokenTransactionsPopup.qml
SignTokenTransactionsPopup 1.0 SignTokenTransactionsPopup.qml
TokenMasterActionPopup 1.0 TokenMasterActionPopup.qml
TokenPermissionsPopup 1.0 TokenPermissionsPopup.qml
TransferOwnershipPopup 1.0 TransferOwnershipPopup.qml