From 979423ea62c622a35886668f9aaabf5e7492300e Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Fri, 22 Mar 2024 11:03:44 +0100 Subject: [PATCH] chore(general): removing unneeded qml file --- .../popups/SharedAddressesPopup.qml | 186 ------------------ ui/app/AppLayouts/Communities/popups/qmldir | 1 - 2 files changed, 187 deletions(-) delete mode 100644 ui/app/AppLayouts/Communities/popups/SharedAddressesPopup.qml diff --git a/ui/app/AppLayouts/Communities/popups/SharedAddressesPopup.qml b/ui/app/AppLayouts/Communities/popups/SharedAddressesPopup.qml deleted file mode 100644 index 20f28d748d..0000000000 --- a/ui/app/AppLayouts/Communities/popups/SharedAddressesPopup.qml +++ /dev/null @@ -1,186 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQml.Models 2.15 - -import StatusQ.Controls 0.1 -import StatusQ.Popups.Dialog 0.1 -import StatusQ.Core.Theme 0.1 - -import AppLayouts.Communities.panels 1.0 - -import utils 1.0 - -/**************************************************** - This file is not in use any more. - - TODO: remove it - ****************************************************/ - -StatusDialog { - id: root - - property bool isEditMode - - property bool requirementsCheckPending - property var keypairSigningModel - - required property string communityName - required property string communityIcon - property int loginType: Constants.LoginType.Password - - property var walletAssetsModel - required property var walletAccountsModel // name, address, emoji, colorId, assets - required property var permissionsModel // id, key, permissionType, holdingsListModel, channelsListModel, isPrivate, tokenCriteriaMet - required property var assetsModel - required property var collectiblesModel - - property var getCurrencyAmount: function (balance, symbol){} - - signal shareSelectedAddressesClicked(string airdropAddress, var sharedAddresses) - signal sharedAddressesChanged(string airdropAddress, var sharedAddresses) - - signal prepareForSigning(string airdropAddress, var sharedAddresses) - signal editRevealedAddresses() - signal signProfileKeypairAndAllNonKeycardKeypairs() - signal signSharedAddressesForKeypair(string keyUid) - - function setOldSharedAddresses(oldSharedAddresses) { - if (!d.displaySigningPanel && !!loader.item) { - d.oldSharedAddresses = oldSharedAddresses - loader.item.setOldSharedAddresses(oldSharedAddresses) - } - } - - function setOldAirdropAddress(oldAirdropAddress) { - d.oldAirdropAddress = oldAirdropAddress - if (!d.displaySigningPanel && !!loader.item) { - loader.item.setOldAirdropAddress(oldAirdropAddress) - } - } - - function sharedAddressesForAllNonKeycardKeypairsSigned() { - if (d.displaySigningPanel && !!loader.item) { - loader.item.sharedAddressesForAllNonKeycardKeypairsSigned() - } - } - - title: !!loader.item? loader.item.title : "" - implicitWidth: 640 // by design - padding: 0 - - QtObject { - id: d - - property bool displaySigningPanel: false - property bool allSigned: false - - property var oldSharedAddresses - property string oldAirdropAddress - - property int selectedSharedAddressesCount - - property var selectAddressesPanelButtons: ObjectModel {} - readonly property var signingPanelButtons: ObjectModel { - StatusFlatButton { - visible: root.isEditMode - borderColor: Theme.palette.baseColor2 - text: qsTr("Cancel") - onClicked: root.close() - } - StatusButton { - text: qsTr("Save changes") - enabled: d.allSigned - onClicked: { - root.editRevealedAddresses() - root.close() - } - } - } - - readonly property var signingPanelBackButtons: ObjectModel { - StatusBackButton { - onClicked: { - d.displaySigningPanel = false - } - - Layout.minimumWidth: implicitWidth - } - } - } - - contentItem: Loader { - id: loader - sourceComponent: d.displaySigningPanel? sharedAddressesSigningPanelComponent : selectSharedAddressesPanelComponent - - onLoaded: { - if (!d.displaySigningPanel) { - if (!!d.oldSharedAddresses) { - root.setOldSharedAddresses(d.oldSharedAddresses) - } - if (!!d.oldAirdropAddress) { - root.setOldAirdropAddress(d.oldAirdropAddress) - } - d.selectAddressesPanelButtons = loader.item.buttons - } - } - } - - Component { - id: selectSharedAddressesPanelComponent - SharedAddressesPanel { - isEditMode: root.isEditMode - requirementsCheckPending: root.requirementsCheckPending - communityName: root.communityName - communityIcon: root.communityIcon - loginType: root.loginType - walletAccountsModel: root.walletAccountsModel - walletAssetsModel: root.walletAssetsModel - permissionsModel: root.permissionsModel - assetsModel: root.assetsModel - collectiblesModel: root.collectiblesModel - onShareSelectedAddressesClicked: root.shareSelectedAddressesClicked(airdropAddress, sharedAddresses) - onPrepareForSigning: { - root.prepareForSigning(airdropAddress, sharedAddresses) - d.displaySigningPanel = true - } - onSharedAddressesChanged: { - d.selectedSharedAddressesCount = sharedAddresses.length - root.sharedAddressesChanged(airdropAddress, sharedAddresses) - } - onClose: root.close() - getCurrencyAmount: function (balance, symbol){ - return root.getCurrencyAmount(balance, symbol) - } - } - } - - Component { - id: sharedAddressesSigningPanelComponent - SharedAddressesSigningPanel { - - totalNumOfAddressesForSharing: root.walletAccountsModel.count - numOfSelectedAddressesForSharing: d.selectedSharedAddressesCount - - communityName: root.communityName - keypairSigningModel: root.keypairSigningModel - - onSignProfileKeypairAndAllNonKeycardKeypairs: { - root.signProfileKeypairAndAllNonKeycardKeypairs() - } - - onSignSharedAddressesForKeypair: { - root.signSharedAddressesForKeypair(keyUid) - } - - onAllSignedChanged: { - d.allSigned = allSigned - } - } - } - - footer: StatusDialogFooter { - spacing: Style.current.padding - rightButtons: d.displaySigningPanel? d.signingPanelButtons : d.selectAddressesPanelButtons - leftButtons: d.displaySigningPanel? d.signingPanelBackButtons : null - } -} diff --git a/ui/app/AppLayouts/Communities/popups/qmldir b/ui/app/AppLayouts/Communities/popups/qmldir index 02e601f109..920589d3c4 100644 --- a/ui/app/AppLayouts/Communities/popups/qmldir +++ b/ui/app/AppLayouts/Communities/popups/qmldir @@ -20,7 +20,6 @@ MembersDropdown 1.0 MembersDropdown.qml PermissionsDropdown 1.0 PermissionsDropdown.qml RecipientTypeSelectionDropdown 1.0 RecipientTypeSelectionDropdown.qml RemotelyDestructPopup 1.0 RemotelyDestructPopup.qml -SharedAddressesPopup 1.0 SharedAddressesPopup.qml SignTransactionsPopup 1.0 SignTransactionsPopup.qml TokenMasterActionPopup 1.0 TokenMasterActionPopup.qml TokenPermissionsPopup 1.0 TokenPermissionsPopup.qml