chore(general): removing unneeded qml file

This commit is contained in:
Sale Djenic 2024-03-22 11:03:44 +01:00 committed by Jonathan Rainville
parent 665d1cb949
commit c864e437aa
2 changed files with 0 additions and 187 deletions

View File

@ -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
}
}

View File

@ -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