mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-11 06:47:01 +00:00
9490dbb57e
closes #16831 Moving the dapp popups to the global scope in order for them to be triggered on any view. There are a few changes required for this: 1. DAppsWorkflow has been split. Previously all popups were declared in the `DappsComboBox`. Now the DAppsWorkflow inherits the QObject instead and the `DappsComboBox` is used as is in the wallet header. 2. The DAppsWorkflow has been moved to AppMain. The DAppsWorkflow will be constructed in the scope of DAppsService and connected directly to the service signals 3. Updated tests and storybook with the new structure 4. Removed the `dAppsService` from `Global`. There's no reason to keep the `dAppsService` instance in the `Global` singleton.
67 lines
1.9 KiB
QML
67 lines
1.9 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import shared.stores 1.0
|
|
|
|
import AppLayouts.stores 1.0 as AppLayoutsStores
|
|
import AppLayouts.Communities.stores 1.0
|
|
import AppLayouts.Profile.stores 1.0 as ProfileStores
|
|
import AppLayouts.Wallet.stores 1.0 as WalletStores
|
|
import "../panels"
|
|
|
|
FocusScope {
|
|
id: root
|
|
|
|
property AppLayoutsStores.RootStore store
|
|
property ProfileStores.ContactsStore contactsStore
|
|
property CommunitiesStore communitiesStore
|
|
property NetworkConnectionStore networkConnectionStore
|
|
|
|
property bool swapEnabled
|
|
property bool dAppsEnabled
|
|
property bool walletConnectEnabled
|
|
property bool browserConnectEnabled
|
|
|
|
property var dAppsModel
|
|
|
|
property var sendModal
|
|
|
|
property alias header: header
|
|
property alias headerButton: header.headerButton
|
|
property alias networkFilter: header.networkFilter
|
|
|
|
default property alias content: contentWrapper.children
|
|
|
|
signal dappPairRequested()
|
|
signal dappDisconnectRequested(string dappUrl)
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
spacing: 0
|
|
|
|
WalletHeader {
|
|
id: header
|
|
Layout.fillWidth: true
|
|
overview: WalletStores.RootStore.overview
|
|
walletStore: WalletStores.RootStore
|
|
networkConnectionStore: root.networkConnectionStore
|
|
loginType: root.store.loginType
|
|
dAppsEnabled: root.dAppsEnabled
|
|
dAppsModel: root.dAppsModel
|
|
walletConnectEnabled: root.walletConnectEnabled
|
|
browserConnectEnabled: root.browserConnectEnabled
|
|
|
|
onDappPairRequested: root.dappPairRequested()
|
|
onDappDisconnectRequested: (dappUrl) =>root.dappDisconnectRequested(dappUrl)
|
|
}
|
|
|
|
Item {
|
|
id: contentWrapper
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
}
|
|
}
|
|
}
|