From 663364452e7e4ac8ffdddcfccb5a819fa74d71a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Cie=C5=9Blak?= Date: Mon, 14 Oct 2024 17:40:22 +0200 Subject: [PATCH] DappPermissionsView and related sub-components removed Closes: #16517 --- .../AppLayouts/Profile/views/WalletView.qml | 4 - .../views/wallet/DappPermissionsView.qml | 30 -------- .../Profile/views/wallet/MainView.qml | 1 - .../views/wallet/PermissionsListView.qml | 73 ------------------- ui/app/AppLayouts/Profile/views/wallet/qmldir | 6 +- 5 files changed, 2 insertions(+), 112 deletions(-) delete mode 100644 ui/app/AppLayouts/Profile/views/wallet/DappPermissionsView.qml delete mode 100644 ui/app/AppLayouts/Profile/views/wallet/PermissionsListView.qml diff --git a/ui/app/AppLayouts/Profile/views/WalletView.qml b/ui/app/AppLayouts/Profile/views/WalletView.qml index 2f3e3fa76db..114582dc572 100644 --- a/ui/app/AppLayouts/Profile/views/WalletView.qml +++ b/ui/app/AppLayouts/Profile/views/WalletView.qml @@ -370,10 +370,6 @@ SettingsContentBase { sendModal: root.rootStore.sendModalPopup } - DappPermissionsView { - walletStore: root.walletStore - } - Component { id: addNewAccountButtonComponent StatusButton { diff --git a/ui/app/AppLayouts/Profile/views/wallet/DappPermissionsView.qml b/ui/app/AppLayouts/Profile/views/wallet/DappPermissionsView.qml deleted file mode 100644 index 74a84edf382..00000000000 --- a/ui/app/AppLayouts/Profile/views/wallet/DappPermissionsView.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.13 - -import shared.status 1.0 -import StatusQ.Controls 0.1 -import StatusQ.Core 0.1 -import StatusQ.Core.Theme 0.1 -import StatusQ.Components 0.1 -import utils 1.0 - -import "../../stores" -import "../../controls" - -Item { - id: root - - property WalletStore walletStore - - Column { - id: column - anchors.top: parent.top - anchors.left: parent.left - width: parent.width - - PermissionsListView { - id: permissionsList - width: parent.width - walletStore: root.walletStore - } - } -} diff --git a/ui/app/AppLayouts/Profile/views/wallet/MainView.qml b/ui/app/AppLayouts/Profile/views/wallet/MainView.qml index 9cbab3b882f..60e327a24d4 100644 --- a/ui/app/AppLayouts/Profile/views/wallet/MainView.qml +++ b/ui/app/AppLayouts/Profile/views/wallet/MainView.qml @@ -24,7 +24,6 @@ Column { signal goToNetworksView() signal goToAccountOrderView() signal goToAccountView(var account) - signal goToDappPermissionsView() signal goToManageTokensView() signal goToSavedAddressesView() diff --git a/ui/app/AppLayouts/Profile/views/wallet/PermissionsListView.qml b/ui/app/AppLayouts/Profile/views/wallet/PermissionsListView.qml deleted file mode 100644 index f16a192d918..00000000000 --- a/ui/app/AppLayouts/Profile/views/wallet/PermissionsListView.qml +++ /dev/null @@ -1,73 +0,0 @@ -import QtQuick 2.14 -import QtWebEngine 1.10 -import shared.status 1.0 -import StatusQ.Controls 0.1 -import StatusQ.Core 0.1 -import StatusQ.Core.Theme 0.1 -import StatusQ.Components 0.1 -import utils 1.0 - -import AppLayouts.Profile.stores 1.0 - -Column { - id: root - - property WalletStore walletStore - - Repeater { - id: permissionsList - model: walletStore.dappList - delegate: Item { - property string dappName: model.name - width: parent.width - height: listItem.height + spacer.height - WebEngineView { - id: webView - url: dappName.startsWith("http") ? dappName : `http://${dappName}` - visible: false - } - StatusListItem { - id: listItem - title: webView.title !== "" ? webView.title : dappName - subTitle: dappName - asset.name: webView.icon != "" ? webView.icon : Style.svg("compassActive") - asset.isImage: true - width: parent.width - highlighted: true - sensor.enabled: false - components: [ - StatusButton { - text: model.accounts.count > 1 ? qsTr("Disconnect All") : qsTr("Disconnect") - size: StatusBaseButton.Size.Small - type: StatusBaseButton.Type.Danger - onClicked: { - walletStore.disconnect(dappName) - } - } - ] - bottomModel: model.accounts - bottomDelegate: StatusListItemTag { - property int outerIndex: listItem.index || 0 - - title: model.name - - asset.emoji: !!model.emoji ? model.emoji: "" - asset.color: Utils.getColorForId(model.colorId) - asset.name: !model.emoji ? "filled-account": "" - asset.letterSize: 14 - asset.isLetterIdenticon: !!model.emoji - asset.bgColor: Theme.palette.indirectColor1 - onClicked: { - walletStore.disconnectAddress(dappName, model.address) - } - } - } - - Item { - id: spacer - height: Style.current.bigPadding - width: parent.width - } - } // Item - } // Repeater -} // Column diff --git a/ui/app/AppLayouts/Profile/views/wallet/qmldir b/ui/app/AppLayouts/Profile/views/wallet/qmldir index 6ed7d9b0556..442c256b024 100644 --- a/ui/app/AppLayouts/Profile/views/wallet/qmldir +++ b/ui/app/AppLayouts/Profile/views/wallet/qmldir @@ -1,10 +1,8 @@ AccountOrderView 1.0 AccountOrderView.qml AccountView 1.0 AccountView.qml -DappPermissionsView 1.0 DappPermissionsView.qml -EditNetworkView 1.0 EditNetworkView.qml EditNetworkForm 1.0 EditNetworkForm.qml +EditNetworkView 1.0 EditNetworkView.qml MainView 1.0 MainView.qml ManageTokensView 1.0 ManageTokensView.qml NetworksView 1.0 NetworksView.qml -PermissionsListView 1.0 PermissionsListView.qml -SavedAddressesView 1.0 SavedAddressesView.qml \ No newline at end of file +SavedAddressesView 1.0 SavedAddressesView.qml