diff --git a/ui/app/AppLayouts/Browser/BrowserLayout.qml b/ui/app/AppLayouts/Browser/BrowserLayout.qml index 2180db38509..99ace921547 100644 --- a/ui/app/AppLayouts/Browser/BrowserLayout.qml +++ b/ui/app/AppLayouts/Browser/BrowserLayout.qml @@ -15,8 +15,11 @@ import shared.controls 1.0 import shared 1.0 import shared.status 1.0 import shared.popups.send 1.0 +import shared.stores 1.0 import shared.stores.send 1.0 +import "../Wallet/stores" + import "popups" import "controls" import "views" @@ -29,12 +32,11 @@ import "stores" StatusSectionLayout { id: root - property var globalStore property var sendTransactionModal required property TransactionStore transactionStore - required property var assetsStore - required property var currencyStore - required property var tokensStore + required property TokensStore tokensStore + required property WalletAssetsStore walletAssetsStore + required property CurrenciesStore currencyStore function openUrlInNewTab(url) { var tab = _internal.addNewTab() @@ -433,7 +435,7 @@ StatusSectionLayout { Component { id: browserWalletMenu BrowserWalletMenu { - assetsStore: root.assetsStore + walletAssetsStore: root.walletAssetsStore currencyStore: root.currencyStore tokensStore: root.tokensStore property point headerPoint: Qt.point(browserHeader.x, browserHeader.y) diff --git a/ui/app/AppLayouts/Browser/popups/BrowserWalletMenu.qml b/ui/app/AppLayouts/Browser/popups/BrowserWalletMenu.qml index 3fb39f73fd5..0c73a1f59a7 100644 --- a/ui/app/AppLayouts/Browser/popups/BrowserWalletMenu.qml +++ b/ui/app/AppLayouts/Browser/popups/BrowserWalletMenu.qml @@ -7,18 +7,20 @@ import StatusQ.Controls 0.1 import StatusQ.Core 0.1 import shared.controls 1.0 +import shared.stores 1.0 import shared.views 1.0 import utils 1.0 import "../stores" +import "../../Wallet/stores" // TODO: replace with StatusMenu Dialog { id: popup - required property var assetsStore - required property var currencyStore - required property var tokensStore + required property WalletAssetsStore walletAssetsStore + required property CurrenciesStore currencyStore + required property TokensStore tokensStore signal sendTriggered(var selectedAccount) signal disconnect() @@ -208,7 +210,7 @@ Dialog { AssetsView { id: assetsTab - controller: popup.assetsStore.assetsController + controller: popup.walletAssetsStore.assetsController currencyStore: popup.currencyStore tokensStore: popup.tokensStore } diff --git a/ui/app/AppLayouts/Chat/ChatLayout.qml b/ui/app/AppLayouts/Chat/ChatLayout.qml index 6c760051558..0f79e1abde1 100644 --- a/ui/app/AppLayouts/Chat/ChatLayout.qml +++ b/ui/app/AppLayouts/Chat/ChatLayout.qml @@ -13,8 +13,10 @@ import "stores" import AppLayouts.Communities.views 1.0 import AppLayouts.Communities.popups 1.0 import AppLayouts.Communities.helpers 1.0 +import AppLayouts.Communities.stores 1.0 as CommunitiesStores import AppLayouts.Chat.stores 1.0 +import AppLayouts.Profile.stores 1.0 import AppLayouts.Wallet.stores 1.0 as WalletStore import StatusQ.Core.Utils 0.1 @@ -23,10 +25,10 @@ StackLayout { id: root property RootStore rootStore - property var createChatPropertiesStore - readonly property var contactsStore: rootStore.contactsStore - readonly property var permissionsStore: rootStore.permissionsStore - property var communitiesStore + property CreateChatPropertiesStore createChatPropertiesStore + readonly property ContactsStore contactsStore: rootStore.contactsStore + readonly property PermissionsStore permissionsStore: rootStore.permissionsStore + property CommunitiesStores.CommunitiesStore communitiesStore required property WalletStore.TokensStore tokensStore required property TransactionStore transactionStore required property WalletStore.WalletAssetsStore walletAssetsStore diff --git a/ui/app/AppLayouts/Chat/panels/UserListPanel.qml b/ui/app/AppLayouts/Chat/panels/UserListPanel.qml index 5fbed89424c..64ef7233bc1 100644 --- a/ui/app/AppLayouts/Chat/panels/UserListPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/UserListPanel.qml @@ -15,10 +15,12 @@ import utils 1.0 import SortFilterProxyModel 0.2 +import "../stores" as ChatStores + Item { id: root - property var store + property ChatStores.RootStore store property var usersModel property string label property int communityMemberReevaluationStatus: Constants.CommunityMemberReevaluationStatus.None diff --git a/ui/app/AppLayouts/Chat/popups/PinnedMessagesPopup.qml b/ui/app/AppLayouts/Chat/popups/PinnedMessagesPopup.qml index f14f9c99af5..46d870bcaad 100644 --- a/ui/app/AppLayouts/Chat/popups/PinnedMessagesPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/PinnedMessagesPopup.qml @@ -13,11 +13,13 @@ import StatusQ.Popups.Dialog 0.1 import utils 1.0 import shared.views.chat 1.0 +import "../stores" + StatusDialog { id: root - property var store - property var messageStore + property RootStore store + property MessageStore messageStore property var pinnedMessagesModel //this doesn't belong to the messageStore, it is a part of the ChatContentStore, but we didn't introduce it yet. property string messageToPin property string messageToUnpin diff --git a/ui/app/AppLayouts/Chat/stores/RootStore.qml b/ui/app/AppLayouts/Chat/stores/RootStore.qml index b70484f318b..5b5edd78333 100644 --- a/ui/app/AppLayouts/Chat/stores/RootStore.qml +++ b/ui/app/AppLayouts/Chat/stores/RootStore.qml @@ -6,14 +6,17 @@ import SortFilterProxyModel 0.2 import StatusQ.Core.Utils 0.1 as StatusQUtils import shared.stores 1.0 +import AppLayouts.Profile.stores 1.0 +import AppLayouts.Wallet.stores 1.0 as WalletStore + QtObject { id: root - property var contactsStore - property var communityTokensStore - property var walletStore + property ContactsStore contactsStore + property CommunityTokensStore communityTokensStore + property WalletStore.RootStore walletStore - property var networkConnectionStore + property NetworkConnectionStore networkConnectionStore readonly property PermissionsStore permissionsStore: PermissionsStore { activeSectionId: mainModuleInst.activeSection.id @@ -202,7 +205,7 @@ QtObject { } } - property var messageStore: MessageStore { } + property MessageStore messageStore: MessageStore { } property var emojiReactionsModel @@ -231,7 +234,7 @@ QtObject { readonly property int loginType: getLoginType() - property var stickersStore: StickersStore { + property StickersStore stickersStore: StickersStore { stickersModule: stickersModuleInst } diff --git a/ui/app/AppLayouts/Chat/stores/qmldir b/ui/app/AppLayouts/Chat/stores/qmldir index bd91dc697b0..9dc51025b8e 100644 --- a/ui/app/AppLayouts/Chat/stores/qmldir +++ b/ui/app/AppLayouts/Chat/stores/qmldir @@ -4,3 +4,5 @@ RootStore 1.0 RootStore.qml StickerData 1.0 StickerData.qml StickerPackData 1.0 StickerPackData.qml StickersStore 1.0 StickersStore.qml +MessageStore 1.0 MessageStore.qml +UsersStore 1.0 UsersStore.qml diff --git a/ui/app/AppLayouts/Chat/views/ChatColumnView.qml b/ui/app/AppLayouts/Chat/views/ChatColumnView.qml index dbfb816a126..456fe00d13c 100644 --- a/ui/app/AppLayouts/Chat/views/ChatColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatColumnView.qml @@ -20,6 +20,7 @@ import SortFilterProxyModel 0.2 import AppLayouts.Communities.popups 1.0 import AppLayouts.Communities.panels 1.0 +import AppLayouts.Profile.stores 1.0 import "../helpers" import "../controls" @@ -35,9 +36,9 @@ Item { // don't follow struct we have on the backend. property var parentModule - property var rootStore - property var createChatPropertiesStore - property var contactsStore + property RootStore rootStore + property CreateChatPropertiesStore createChatPropertiesStore + property ContactsStore contactsStore property var emojiPopup property var stickersPopup diff --git a/ui/app/AppLayouts/Chat/views/ChatContentView.qml b/ui/app/AppLayouts/Chat/views/ChatContentView.qml index ecea602f8d5..875f29b2fba 100644 --- a/ui/app/AppLayouts/Chat/views/ChatContentView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatContentView.qml @@ -15,6 +15,8 @@ import shared.status 1.0 import shared.controls 1.0 import shared.views.chat 1.0 +import AppLayouts.Profile.stores 1.0 + import "../helpers" import "../controls" import "../popups" @@ -28,8 +30,8 @@ ColumnLayout { // Important: each chat/channel has its own ChatContentModule property var chatContentModule property var chatSectionModule - property var rootStore - property var contactsStore + property RootStore rootStore + property ContactsStore contactsStore property string chatId property int chatType: Constants.chatType.unknown @@ -45,7 +47,7 @@ ColumnLayout { property bool isUserAllowedToSendMessage: root.rootStore.isUserAllowedToSendMessage property bool stickersLoaded: false - readonly property var messageStore: MessageStore { + readonly property MessageStore messageStore: MessageStore { messageModule: chatContentModule ? chatContentModule.messagesModule : null chatSectionModule: root.rootStore.chatCommunitySectionModule } diff --git a/ui/app/AppLayouts/Chat/views/ChatHeaderContentView.qml b/ui/app/AppLayouts/Chat/views/ChatHeaderContentView.qml index ef5bdc62e3f..4ef68e43bfb 100644 --- a/ui/app/AppLayouts/Chat/views/ChatHeaderContentView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatHeaderContentView.qml @@ -21,7 +21,7 @@ Item { property alias membersButton: membersButton property alias searchButton: searchButton - property var rootStore + required property RootStore rootStore property var chatContentModule: root.rootStore.currentChatContentModule() || null property var emojiPopup property int padding: Style.current.halfPadding diff --git a/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml b/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml index 72968f4d52e..2091ed7d002 100644 --- a/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml @@ -18,17 +18,20 @@ import shared.status 1.0 import shared.controls 1.0 import shared.views.chat 1.0 +import AppLayouts.Profile.stores 1.0 + import "../controls" import "../panels" +import "../stores" Item { id: root property var chatContentModule - property var rootStore - property var messageStore - property var usersStore - property var contactsStore + property RootStore rootStore + property MessageStore messageStore + property UsersStore usersStore + property ContactsStore contactsStore property string channelEmoji property var emojiPopup diff --git a/ui/app/AppLayouts/Chat/views/ChatView.qml b/ui/app/AppLayouts/Chat/views/ChatView.qml index cc0d45af4b2..f0b183cfb3e 100644 --- a/ui/app/AppLayouts/Chat/views/ChatView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatView.qml @@ -21,9 +21,13 @@ import QtQuick.Layouts 1.15 import "." import "../panels" + +import AppLayouts.Communities.controls 1.0 import AppLayouts.Communities.panels 1.0 +import AppLayouts.Communities.stores 1.0 as CommunitiesStores import AppLayouts.Communities.views 1.0 -import AppLayouts.Communities.controls 1.0 + +import AppLayouts.Profile.stores 1.0 import AppLayouts.Wallet.stores 1.0 as WalletStore import "../popups" import "../helpers" @@ -33,13 +37,13 @@ import "../stores" StatusSectionLayout { id: root - property var contactsStore + property ContactsStore contactsStore property bool hasAddedContacts: contactsStore.myContactsModel.count > 0 property RootStore rootStore required property TransactionStore transactionStore - property var createChatPropertiesStore - property var communitiesStore + property CreateChatPropertiesStore createChatPropertiesStore + property CommunitiesStores.CommunitiesStore communitiesStore required property WalletStore.WalletAssetsStore walletAssetsStore required property CurrenciesStore currencyStore property var sectionItemModel diff --git a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml index 72378145ac6..9459cf20588 100644 --- a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml @@ -19,7 +19,9 @@ import SortFilterProxyModel 0.2 import "../panels" import "../popups" +import "../stores" import AppLayouts.Communities.popups 1.0 +import AppLayouts.Profile.stores 1.0 Item { id: root @@ -31,8 +33,8 @@ Item { // This module is set from `ChatLayout` (each `ChatLayout` has its own chatSectionModule) property var chatSectionModule - property var store - property var contactsStore + property RootStore store + property ContactsStore contactsStore property var emojiPopup signal openProfileClicked() diff --git a/ui/app/AppLayouts/Chat/views/CreateChatView.qml b/ui/app/AppLayouts/Chat/views/CreateChatView.qml index c8f298f8586..9619fa26678 100644 --- a/ui/app/AppLayouts/Chat/views/CreateChatView.qml +++ b/ui/app/AppLayouts/Chat/views/CreateChatView.qml @@ -13,11 +13,13 @@ import utils 1.0 import shared.status 1.0 import shared.controls.delegates 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores + Page { id: root - property var rootStore - property var createChatPropertiesStore + property ChatStores.RootStore rootStore + property ChatStores.CreateChatPropertiesStore createChatPropertiesStore property var emojiPopup: null property var stickersPopup: null diff --git a/ui/app/AppLayouts/Chat/views/MembersEditSelectorView.qml b/ui/app/AppLayouts/Chat/views/MembersEditSelectorView.qml index 75729dcd65b..cba6bd50aa1 100644 --- a/ui/app/AppLayouts/Chat/views/MembersEditSelectorView.qml +++ b/ui/app/AppLayouts/Chat/views/MembersEditSelectorView.qml @@ -19,7 +19,7 @@ import SortFilterProxyModel 0.2 MembersSelectorBase { id: root - property var usersStore + property UsersStore usersStore onConfirmed: { usersStore.updateGroupMembers() diff --git a/ui/app/AppLayouts/Chat/views/private/MembersSelectorBase.qml b/ui/app/AppLayouts/Chat/views/private/MembersSelectorBase.qml index 5e41cdcaa6d..d415c735760 100644 --- a/ui/app/AppLayouts/Chat/views/private/MembersSelectorBase.qml +++ b/ui/app/AppLayouts/Chat/views/private/MembersSelectorBase.qml @@ -9,6 +9,7 @@ import StatusQ.Controls 0.1 import StatusQ.Components 0.1 import "../../panels" +import "../../stores" as ChatStores import utils 1.0 import shared.controls.delegates 1.0 @@ -18,7 +19,7 @@ import SortFilterProxyModel 0.2 InlineSelectorPanel { id: root - property var rootStore + property ChatStores.RootStore rootStore readonly property int membersLimit: 20 // see: https://github.com/status-im/status-mobile/issues/13066 property bool limitReached: model.count >= membersLimit diff --git a/ui/app/AppLayouts/Communities/CommunitiesPortalLayout.qml b/ui/app/AppLayouts/Communities/CommunitiesPortalLayout.qml index 269cf5609b0..ba10718d850 100644 --- a/ui/app/AppLayouts/Communities/CommunitiesPortalLayout.qml +++ b/ui/app/AppLayouts/Communities/CommunitiesPortalLayout.qml @@ -22,11 +22,12 @@ import AppLayouts.Communities.controls 1.0 import AppLayouts.Communities.popups 1.0 import AppLayouts.Communities.views 1.0 import AppLayouts.Communities.panels 1.0 +import AppLayouts.Communities.stores 1.0 StatusSectionLayout { id: root - property var communitiesStore + property CommunitiesStore communitiesStore property var assetsModel property var collectiblesModel diff --git a/ui/app/AppLayouts/Communities/panels/MembersSettingsPanel.qml b/ui/app/AppLayouts/Communities/panels/MembersSettingsPanel.qml index aeb931521cb..207d1c71be7 100644 --- a/ui/app/AppLayouts/Communities/panels/MembersSettingsPanel.qml +++ b/ui/app/AppLayouts/Communities/panels/MembersSettingsPanel.qml @@ -4,13 +4,14 @@ import QtQuick.Layouts 1.15 import StatusQ.Controls 0.1 import utils 1.0 +import AppLayouts.Chat.stores 1.0 import AppLayouts.Communities.layouts 1.0 import AppLayouts.Communities.popups 1.0 SettingsPage { id: root - property var rootStore + property RootStore rootStore property var membersModel property var bannedMembersModel property var pendingMemberRequestsModel diff --git a/ui/app/AppLayouts/Communities/panels/MembersTabPanel.qml b/ui/app/AppLayouts/Communities/panels/MembersTabPanel.qml index 772f199b2ac..742bcfd23b3 100644 --- a/ui/app/AppLayouts/Communities/panels/MembersTabPanel.qml +++ b/ui/app/AppLayouts/Communities/panels/MembersTabPanel.qml @@ -13,6 +13,7 @@ import shared.views.chat 1.0 import shared.controls.chat 1.0 import shared.controls 1.0 +import AppLayouts.Chat.stores 1.0 import AppLayouts.Communities.layouts 1.0 Item { @@ -20,7 +21,7 @@ Item { property string placeholderText property var model - property var rootStore + property RootStore rootStore property int memberRole: Constants.memberRole.none readonly property bool isOwner: memberRole === Constants.memberRole.owner diff --git a/ui/app/AppLayouts/Communities/panels/ProfilePopupInviteFriendsPanel.qml b/ui/app/AppLayouts/Communities/panels/ProfilePopupInviteFriendsPanel.qml index 492d54baaf8..0a4284ee697 100644 --- a/ui/app/AppLayouts/Communities/panels/ProfilePopupInviteFriendsPanel.qml +++ b/ui/app/AppLayouts/Communities/panels/ProfilePopupInviteFriendsPanel.qml @@ -12,14 +12,17 @@ import shared.panels 1.0 import shared.views 1.0 import shared.status 1.0 +import AppLayouts.stores 1.0 as AppLayoutStores +import AppLayouts.Profile.stores 1.0 as ProfileStores + ColumnLayout { id: root objectName: "CommunityProfilePopupInviteFrindsPanel_ColumnLayout" property string headerTitle: "" - property var rootStore - property var contactsStore + property AppLayoutStores.RootStore rootStore + property ProfileStores.ContactsStore contactsStore property var community property var pubKeys: ([]) diff --git a/ui/app/AppLayouts/Communities/panels/ProfilePopupInviteMessagePanel.qml b/ui/app/AppLayouts/Communities/panels/ProfilePopupInviteMessagePanel.qml index 28369dc9244..694282038dc 100644 --- a/ui/app/AppLayouts/Communities/panels/ProfilePopupInviteMessagePanel.qml +++ b/ui/app/AppLayouts/Communities/panels/ProfilePopupInviteMessagePanel.qml @@ -12,14 +12,15 @@ import shared.panels 1.0 import shared.views 1.0 import shared.status 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores + ColumnLayout { id: root objectName: "CommunityProfilePopupInviteMessagePanel_ColumnLayout" property var pubKeys: ([]) - property var rootStore - property var contactsStore + property ProfileStores.ContactsStore contactsStore property alias inviteMessage: messageInput.text diff --git a/ui/app/AppLayouts/Communities/panels/WelcomeBannerPanel.qml b/ui/app/AppLayouts/Communities/panels/WelcomeBannerPanel.qml index 3c2eb4534d4..59f8d747161 100644 --- a/ui/app/AppLayouts/Communities/panels/WelcomeBannerPanel.qml +++ b/ui/app/AppLayouts/Communities/panels/WelcomeBannerPanel.qml @@ -4,6 +4,8 @@ import StatusQ.Core 0.1 import StatusQ.Core.Theme 0.1 import StatusQ.Controls 0.1 +import AppLayouts.Chat.stores 1.0 + import shared.panels 1.0 import shared.status 1.0 @@ -13,7 +15,7 @@ Rectangle { id: root property var activeCommunity - property var store + property RootStore store property var communitySectionModule property bool hasAddedContacts diff --git a/ui/app/AppLayouts/Communities/popups/CommunityMemberMessagesPopup.qml b/ui/app/AppLayouts/Communities/popups/CommunityMemberMessagesPopup.qml index 3a38d8ea920..637ce720e45 100644 --- a/ui/app/AppLayouts/Communities/popups/CommunityMemberMessagesPopup.qml +++ b/ui/app/AppLayouts/Communities/popups/CommunityMemberMessagesPopup.qml @@ -13,10 +13,12 @@ import StatusQ.Popups.Dialog 0.1 import utils 1.0 import shared.views.chat 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores + StatusDialog { id: root - property var store + property ChatStores.RootStore rootStore property var chatCommunitySectionModule property var memberMessagesModel: chatCommunitySectionModule.memberMessagesModel property string memberPubKey: "" diff --git a/ui/app/AppLayouts/Communities/popups/CommunityProfilePopup.qml b/ui/app/AppLayouts/Communities/popups/CommunityProfilePopup.qml index 77ccb3fd4fa..31539c9ebac 100644 --- a/ui/app/AppLayouts/Communities/popups/CommunityProfilePopup.qml +++ b/ui/app/AppLayouts/Communities/popups/CommunityProfilePopup.qml @@ -13,9 +13,7 @@ import AppLayouts.Communities.panels 1.0 StatusModal { id: root - property var store property var community - property var contactsStore property bool hasAddedContacts property var communitySectionModule diff --git a/ui/app/AppLayouts/Communities/popups/CreateCategoryPopup.qml b/ui/app/AppLayouts/Communities/popups/CreateCategoryPopup.qml index af7bedded6f..eb2d9b09ab7 100644 --- a/ui/app/AppLayouts/Communities/popups/CreateCategoryPopup.qml +++ b/ui/app/AppLayouts/Communities/popups/CreateCategoryPopup.qml @@ -15,10 +15,12 @@ import shared.popups 1.0 import SortFilterProxyModel 0.2 +import AppLayouts.Chat.stores 1.0 + StatusModal { id: root - property var store + property RootStore store property string communityId property string categoryId property string categoryName: "" diff --git a/ui/app/AppLayouts/Communities/popups/CreateChannelPopup.qml b/ui/app/AppLayouts/Communities/popups/CreateChannelPopup.qml index bff0d6d6239..d4bdf610ebc 100644 --- a/ui/app/AppLayouts/Communities/popups/CreateChannelPopup.qml +++ b/ui/app/AppLayouts/Communities/popups/CreateChannelPopup.qml @@ -22,11 +22,12 @@ import AppLayouts.Communities.views 1.0 import AppLayouts.Communities.panels 1.0 import AppLayouts.Communities.models 1.0 import AppLayouts.Communities.controls 1.0 +import AppLayouts.Communities.stores 1.0 as CommunitiesStores StatusStackModal { id: root - property var communitiesStore + property CommunitiesStores.CommunitiesStore communitiesStore property bool isDiscordImport // creating new or importing from discord? property bool isEdit: false diff --git a/ui/app/AppLayouts/Communities/popups/CreateCommunityPopup.qml b/ui/app/AppLayouts/Communities/popups/CreateCommunityPopup.qml index 4f7d3eff2f7..381b746c8dd 100644 --- a/ui/app/AppLayouts/Communities/popups/CreateCommunityPopup.qml +++ b/ui/app/AppLayouts/Communities/popups/CreateCommunityPopup.qml @@ -17,11 +17,12 @@ import StatusQ.Popups 0.1 import AppLayouts.Communities.controls 1.0 import AppLayouts.Communities.panels 1.0 +import AppLayouts.Communities.stores 1.0 StatusStackModal { id: root - property var store + property CommunitiesStore store property bool isDiscordImport // creating new or importing from discord? property bool isDevBuild diff --git a/ui/app/AppLayouts/Communities/popups/DiscordImportProgressContents.qml b/ui/app/AppLayouts/Communities/popups/DiscordImportProgressContents.qml index b3015b47d04..a12a7a0a764 100644 --- a/ui/app/AppLayouts/Communities/popups/DiscordImportProgressContents.qml +++ b/ui/app/AppLayouts/Communities/popups/DiscordImportProgressContents.qml @@ -13,12 +13,14 @@ import StatusQ.Popups.Dialog 0.1 import SortFilterProxyModel 0.2 +import AppLayouts.Communities.stores 1.0 + import "../controls" StatusScrollView { id: root - property var store + property CommunitiesStore store property bool importingSingleChannel diff --git a/ui/app/AppLayouts/Communities/popups/DiscordImportProgressDialog.qml b/ui/app/AppLayouts/Communities/popups/DiscordImportProgressDialog.qml index 43d920ad83e..fee3ce8394b 100644 --- a/ui/app/AppLayouts/Communities/popups/DiscordImportProgressDialog.qml +++ b/ui/app/AppLayouts/Communities/popups/DiscordImportProgressDialog.qml @@ -5,10 +5,12 @@ import StatusQ.Core 0.1 import StatusQ.Core.Theme 0.1 import StatusQ.Popups.Dialog 0.1 +import AppLayouts.Communities.stores 1.0 + StatusDialog { id: root - property var store + property CommunitiesStore store property bool importingSingleChannel diff --git a/ui/app/AppLayouts/Communities/popups/ExportControlNodePopup.qml b/ui/app/AppLayouts/Communities/popups/ExportControlNodePopup.qml index 4e777161b8b..02d6d6e7cdd 100644 --- a/ui/app/AppLayouts/Communities/popups/ExportControlNodePopup.qml +++ b/ui/app/AppLayouts/Communities/popups/ExportControlNodePopup.qml @@ -12,13 +12,15 @@ import StatusQ.Core.Utils 0.1 as SQUtils import utils 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores + import SortFilterProxyModel 0.2 StatusDialog { id: root required property var community - property var devicesStore + property ProfileStores.DevicesStore devicesStore width: 640 diff --git a/ui/app/AppLayouts/Communities/popups/FirstTokenReceivedPopup.qml b/ui/app/AppLayouts/Communities/popups/FirstTokenReceivedPopup.qml index 2aa15bc2357..e472afcc50c 100644 --- a/ui/app/AppLayouts/Communities/popups/FirstTokenReceivedPopup.qml +++ b/ui/app/AppLayouts/Communities/popups/FirstTokenReceivedPopup.qml @@ -11,6 +11,7 @@ import StatusQ.Core.Theme 0.1 import StatusQ.Core.Utils 0.1 import AppLayouts.Communities.panels 1.0 +import AppLayouts.Communities.stores 1.0 import utils 1.0 @@ -18,7 +19,7 @@ StatusDialog { id: root // Community related props: - required property var communitiesStore + required property CommunitiesStore communitiesStore required property string communityId required property string communityName required property string communityLogo diff --git a/ui/app/AppLayouts/Communities/popups/InviteFriendsToCommunityPopup.qml b/ui/app/AppLayouts/Communities/popups/InviteFriendsToCommunityPopup.qml index b94c7d35588..ff3fd6c8a30 100644 --- a/ui/app/AppLayouts/Communities/popups/InviteFriendsToCommunityPopup.qml +++ b/ui/app/AppLayouts/Communities/popups/InviteFriendsToCommunityPopup.qml @@ -9,12 +9,14 @@ import utils 1.0 import shared.panels 1.0 import AppLayouts.Communities.panels 1.0 +import AppLayouts.stores 1.0 as AppLayoutStores +import AppLayouts.Profile.stores 1.0 as ProfileStores StatusStackModal { id: root - property var rootStore - property var contactsStore + property AppLayoutStores.RootStore rootStore + property ProfileStores.ContactsStore contactsStore property var community property var communitySectionModule diff --git a/ui/app/AppLayouts/Communities/views/CommunityColumnView.qml b/ui/app/AppLayouts/Communities/views/CommunityColumnView.qml index 69a5229d71c..cd367f50eb0 100644 --- a/ui/app/AppLayouts/Communities/views/CommunityColumnView.qml +++ b/ui/app/AppLayouts/Communities/views/CommunityColumnView.qml @@ -19,9 +19,11 @@ import shared.panels 1.0 import shared.stores 1.0 import shared.views.chat 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores import AppLayouts.Communities.popups 1.0 import AppLayouts.Communities.panels 1.0 -import AppLayouts.Wallet.stores 1.0 as WalletStore +import AppLayouts.Communities.stores 1.0 as CommunitiesStores +import AppLayouts.Wallet.stores 1.0 as WalletStores // FIXME: Rework me to use ColumnLayout instead of anchors!! Item { @@ -36,9 +38,9 @@ Item { property var communitySectionModule property var emojiPopup - property var store - property var communitiesStore - required property WalletStore.WalletAssetsStore walletAssetsStore + property ChatStores.RootStore store + property CommunitiesStores.CommunitiesStore communitiesStore + required property WalletStores.WalletAssetsStore walletAssetsStore required property CurrenciesStore currencyStore property bool hasAddedContacts: false property var communityData diff --git a/ui/app/AppLayouts/Communities/views/CommunitySettingsView.qml b/ui/app/AppLayouts/Communities/views/CommunitySettingsView.qml index f8d758ac233..07298a5520f 100644 --- a/ui/app/AppLayouts/Communities/views/CommunitySettingsView.qml +++ b/ui/app/AppLayouts/Communities/views/CommunitySettingsView.qml @@ -14,8 +14,8 @@ import StatusQ.Layout 0.1 import shared.panels 1.0 import shared.popups 1.0 import shared.stores 1.0 -import shared.views.chat 1.0 import shared.stores.send 1.0 +import shared.views.chat 1.0 import utils 1.0 import AppLayouts.Communities.controls 1.0 @@ -23,6 +23,7 @@ import AppLayouts.Communities.panels 1.0 import AppLayouts.Communities.popups 1.0 import AppLayouts.Communities.helpers 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores import AppLayouts.Wallet.stores 1.0 StatusSectionLayout { @@ -32,11 +33,11 @@ StatusSectionLayout { hasUnseenNotifications: activityCenterStore.hasUnseenNotifications onNotificationButtonClicked: Global.openActivityCenterPopup() - property var rootStore + property ChatStores.RootStore rootStore property var chatCommunitySectionModule required property TokensStore tokensStore property var community - required property var transactionStore + required property TransactionStore transactionStore property bool communitySettingsDisabled property var sendModalPopup diff --git a/ui/app/AppLayouts/Onboarding/OnboardingLayout.qml b/ui/app/AppLayouts/Onboarding/OnboardingLayout.qml index e855a0d5bc9..b7afbf13e59 100644 --- a/ui/app/AppLayouts/Onboarding/OnboardingLayout.qml +++ b/ui/app/AppLayouts/Onboarding/OnboardingLayout.qml @@ -17,7 +17,7 @@ import "../Profile/stores" OnboardingBasePage { id: root - property var startupStore: StartupStore {} + property StartupStore startupStore: StartupStore {} backButtonVisible: root.startupStore.currentStartupState ? root.startupStore.currentStartupState.displayBackButton : false diff --git a/ui/app/AppLayouts/Profile/ProfileLayout.qml b/ui/app/AppLayouts/Profile/ProfileLayout.qml index 56690ee9608..e4f32c50ca1 100644 --- a/ui/app/AppLayouts/Profile/ProfileLayout.qml +++ b/ui/app/AppLayouts/Profile/ProfileLayout.qml @@ -28,6 +28,7 @@ import StatusQ.Popups.Dialog 0.1 import StatusQ.Core.Utils 0.1 as SQUtils import SortFilterProxyModel 0.2 +import AppLayouts.stores 1.0 as AppLayoutsStores StatusSectionLayout { id: root @@ -35,10 +36,10 @@ StatusSectionLayout { objectName: "profileStatusSectionLayout" property ProfileSectionStore store - property var globalStore + property AppLayoutsStores.RootStore globalStore property var systemPalette property var emojiPopup - property var networkConnectionStore + property SharedStores.NetworkConnectionStore networkConnectionStore required property TokensStore tokensStore required property TransactionStore transactionStore required property WalletAssetsStore walletAssetsStore diff --git a/ui/app/AppLayouts/Profile/controls/FleetRadioSelector.qml b/ui/app/AppLayouts/Profile/controls/FleetRadioSelector.qml index 3e8705d5101..5b65129b595 100644 --- a/ui/app/AppLayouts/Profile/controls/FleetRadioSelector.qml +++ b/ui/app/AppLayouts/Profile/controls/FleetRadioSelector.qml @@ -6,10 +6,12 @@ import utils 1.0 import shared.popups 1.0 import shared.controls 1.0 +import AppLayouts.Profile.stores 1.0 + RadioButtonSelector { id: root - property var advancedStore + property AdvancedStore advancedStore property string fleetName: "" property string newFleet: "" diff --git a/ui/app/AppLayouts/Profile/panels/CommunitiesListPanel.qml b/ui/app/AppLayouts/Profile/panels/CommunitiesListPanel.qml index 27fd8c58fc9..a1a90e7fae4 100644 --- a/ui/app/AppLayouts/Profile/panels/CommunitiesListPanel.qml +++ b/ui/app/AppLayouts/Profile/panels/CommunitiesListPanel.qml @@ -9,11 +9,12 @@ import StatusQ.Popups 0.1 import utils 1.0 import shared.controls.chat.menuItems 1.0 +import AppLayouts.stores 1.0 as AppLayoutsStores StatusListView { id: root - property var rootStore + property AppLayoutsStores.RootStore rootStore signal inviteFriends(var communityData) diff --git a/ui/app/AppLayouts/Profile/panels/ContactPanel.qml b/ui/app/AppLayouts/Profile/panels/ContactPanel.qml index 25c1b8ddfc7..0187f7954e4 100644 --- a/ui/app/AppLayouts/Profile/panels/ContactPanel.qml +++ b/ui/app/AppLayouts/Profile/panels/ContactPanel.qml @@ -16,6 +16,8 @@ import shared.views 1.0 import shared.controls.chat 1.0 import shared.controls.chat.menuItems 1.0 +import AppLayouts.Profile.stores 1.0 + StatusListItem { id: root @@ -23,7 +25,7 @@ StatusListItem { height: visible ? implicitHeight : 0 title: root.name - property var contactsStore + property ContactsStore contactsStore property string name property string publicKey diff --git a/ui/app/AppLayouts/Profile/panels/ContactsListPanel.qml b/ui/app/AppLayouts/Profile/panels/ContactsListPanel.qml index ea0901cd29a..47daa4dd76e 100644 --- a/ui/app/AppLayouts/Profile/panels/ContactsListPanel.qml +++ b/ui/app/AppLayouts/Profile/panels/ContactsListPanel.qml @@ -13,13 +13,15 @@ import shared.panels 1.0 import "../../Chat/popups" import "." +import AppLayouts.Profile.stores 1.0 + import SortFilterProxyModel 0.2 Item { id: root implicitHeight: (title.height + contactsList.height) - property var contactsStore + property ContactsStore contactsStore property var contactsModel property int panelUsage: Constants.contactsPanelUsage.unknownPosition diff --git a/ui/app/AppLayouts/Profile/popups/AddWakuNodeModal.qml b/ui/app/AppLayouts/Profile/popups/AddWakuNodeModal.qml index 641ffaf8eec..9448b938641 100644 --- a/ui/app/AppLayouts/Profile/popups/AddWakuNodeModal.qml +++ b/ui/app/AppLayouts/Profile/popups/AddWakuNodeModal.qml @@ -8,14 +8,15 @@ import StatusQ.Controls 0.1 import StatusQ.Controls.Validators 0.1 import StatusQ.Popups 0.1 - import utils 1.0 +import AppLayouts.Profile.stores 1.0 + StatusModal { id: root - property var messagingStore - property var advancedStore + property MessagingStore messagingStore + property AdvancedStore advancedStore height: 560 padding: 8 diff --git a/ui/app/AppLayouts/Profile/popups/BackupSeedModal.qml b/ui/app/AppLayouts/Profile/popups/BackupSeedModal.qml index a869497b2f1..5a732bab760 100644 --- a/ui/app/AppLayouts/Profile/popups/BackupSeedModal.qml +++ b/ui/app/AppLayouts/Profile/popups/BackupSeedModal.qml @@ -12,12 +12,14 @@ import StatusQ.Popups 0.1 import StatusQ.Controls 0.1 import StatusQ.Core.Theme 0.1 +import AppLayouts.Profile.stores 1.0 as ProfileStores + import "backupseed" StatusStackModal { id: root - property var privacyStore + property ProfileStores.PrivacyStore privacyStore onCurrentIndexChanged: { //StatusAnimatedStack doesn't handle well items' visibility, diff --git a/ui/app/AppLayouts/Profile/popups/ENSPopup.qml b/ui/app/AppLayouts/Profile/popups/ENSPopup.qml index 87fc02897cf..28e42a391f9 100644 --- a/ui/app/AppLayouts/Profile/popups/ENSPopup.qml +++ b/ui/app/AppLayouts/Profile/popups/ENSPopup.qml @@ -13,10 +13,12 @@ import shared 1.0 import shared.panels 1.0 import shared.popups 1.0 +import AppLayouts.Profile.stores 1.0 + StatusDialog { id: root - property var ensUsernamesStore + property EnsUsernamesStore ensUsernamesStore title: qsTr("Primary username") standardButtons: Dialog.ApplyRole diff --git a/ui/app/AppLayouts/Profile/popups/ExemptionNotificationsModal.qml b/ui/app/AppLayouts/Profile/popups/ExemptionNotificationsModal.qml index 197754fc4c0..052f576714b 100644 --- a/ui/app/AppLayouts/Profile/popups/ExemptionNotificationsModal.qml +++ b/ui/app/AppLayouts/Profile/popups/ExemptionNotificationsModal.qml @@ -12,11 +12,12 @@ import utils 1.0 import shared.panels 1.0 import "../controls" +import "../stores" StatusModal { id: root - property var notificationsStore + property NotificationsStore notificationsStore property var item: ({ name: "", image: "", diff --git a/ui/app/AppLayouts/Profile/popups/FleetsModal.qml b/ui/app/AppLayouts/Profile/popups/FleetsModal.qml index 4569fe5bf73..3f6fc352463 100644 --- a/ui/app/AppLayouts/Profile/popups/FleetsModal.qml +++ b/ui/app/AppLayouts/Profile/popups/FleetsModal.qml @@ -7,6 +7,8 @@ import shared 1.0 import shared.popups 1.0 import shared.status 1.0 +import AppLayouts.Profile.stores 1.0 + import "../controls" // TODO: replace with StatusModal @@ -14,7 +16,7 @@ ModalPopup { id: popup title: qsTr("Fleet") - property var advancedStore + property AdvancedStore advancedStore property string newFleet: ""; diff --git a/ui/app/AppLayouts/Profile/popups/SendContactRequestModal.qml b/ui/app/AppLayouts/Profile/popups/SendContactRequestModal.qml index 8463b6ab532..8c0c17ff4aa 100644 --- a/ui/app/AppLayouts/Profile/popups/SendContactRequestModal.qml +++ b/ui/app/AppLayouts/Profile/popups/SendContactRequestModal.qml @@ -10,10 +10,12 @@ import StatusQ.Controls 0.1 import StatusQ.Controls.Validators 0.1 import StatusQ.Popups 0.1 +import "../stores" + StatusModal { id: root - property var contactsStore + property ContactsStore contactsStore headerSettings.title: qsTr("Send Contact Request to chat key") padding: d.contentMargins diff --git a/ui/app/AppLayouts/Profile/popups/SyncDeviceCustomizationPopup.qml b/ui/app/AppLayouts/Profile/popups/SyncDeviceCustomizationPopup.qml index c462eeb8aa6..a53869e247b 100644 --- a/ui/app/AppLayouts/Profile/popups/SyncDeviceCustomizationPopup.qml +++ b/ui/app/AppLayouts/Profile/popups/SyncDeviceCustomizationPopup.qml @@ -19,8 +19,8 @@ import "../stores" StatusDialog { id: root - property var devicesStore - property var advancedStore + property DevicesStore devicesStore + property AdvancedStore advancedStore property var deviceModel readonly property string deviceName: d.deviceName diff --git a/ui/app/AppLayouts/Profile/popups/WakuNodesModal.qml b/ui/app/AppLayouts/Profile/popups/WakuNodesModal.qml index f221c1751d0..c3f111be5d3 100644 --- a/ui/app/AppLayouts/Profile/popups/WakuNodesModal.qml +++ b/ui/app/AppLayouts/Profile/popups/WakuNodesModal.qml @@ -17,6 +17,8 @@ import shared.popups 1.0 import shared.status 1.0 import shared.controls 1.0 +import AppLayouts.Profile.stores 1.0 + StatusModal { id: root @@ -25,8 +27,8 @@ StatusModal { padding: 8 headerSettings.title: qsTr("Waku nodes") - property var messagingStore - property var advancedStore + property MessagingStore messagingStore + property AdvancedStore advancedStore onClosed: { destroy() diff --git a/ui/app/AppLayouts/Profile/popups/WakuStoreModal.qml b/ui/app/AppLayouts/Profile/popups/WakuStoreModal.qml index 87a055b9e9c..f56ef32f739 100644 --- a/ui/app/AppLayouts/Profile/popups/WakuStoreModal.qml +++ b/ui/app/AppLayouts/Profile/popups/WakuStoreModal.qml @@ -17,6 +17,8 @@ import shared.popups 1.0 import shared.status 1.0 import shared.controls 1.0 +import AppLayouts.Profile.stores 1.0 + StatusModal { id: root @@ -25,8 +27,8 @@ StatusModal { padding: 8 headerSettings.title: qsTr("History Nodes") - property var messagingStore - property var advancedStore + property MessagingStore messagingStore + property AdvancedStore advancedStore property string nameValidationError: "" property string enodeValidationError: "" diff --git a/ui/app/AppLayouts/Profile/popups/backupseed/ConfirmSeedPhrasePanel.qml b/ui/app/AppLayouts/Profile/popups/backupseed/ConfirmSeedPhrasePanel.qml index da6eefc2046..50185863912 100644 --- a/ui/app/AppLayouts/Profile/popups/backupseed/ConfirmSeedPhrasePanel.qml +++ b/ui/app/AppLayouts/Profile/popups/backupseed/ConfirmSeedPhrasePanel.qml @@ -9,12 +9,14 @@ import StatusQ.Controls 0.1 import shared.panels 1.0 import utils 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores + BackupSeedStepBase { id: root property var seedPhrase: [] property bool hideSeed: true - property var privacyStore + property ProfileStores.PrivacyStore privacyStore titleText: qsTr("Write down your 12-word seed phrase to keep offline") diff --git a/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml b/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml index 2e3d7561223..07e9fa85192 100644 --- a/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml +++ b/ui/app/AppLayouts/Profile/stores/ProfileSectionStore.qml @@ -73,7 +73,7 @@ QtObject { } property var stickersModuleInst: stickersModule - property var stickersStore: StickersStore { + property StickersStore stickersStore: StickersStore { stickersModule: stickersModuleInst } diff --git a/ui/app/AppLayouts/Profile/stores/qmldir b/ui/app/AppLayouts/Profile/stores/qmldir index 4b4a8cb32c6..d61a283d91c 100644 --- a/ui/app/AppLayouts/Profile/stores/qmldir +++ b/ui/app/AppLayouts/Profile/stores/qmldir @@ -5,3 +5,8 @@ NotificationsStore 1.0 NotificationsStore.qml DevicesStore 1.0 DevicesStore.qml ProfileSectionStore 1.0 ProfileSectionStore.qml WalletStore 1.0 WalletStore.qml +ContactsStore 1.0 ContactsStore.qml +AdvancedStore 1.0 AdvancedStore.qml +MessagingStore 1.0 MessagingStore.qml +PrivacyStore 1.0 PrivacyStore.qml +EnsUsernamesStore 1.0 EnsUsernamesStore.qml diff --git a/ui/app/AppLayouts/Profile/views/AboutView.qml b/ui/app/AppLayouts/Profile/views/AboutView.qml index 074aa663fe6..2be7127d115 100644 --- a/ui/app/AppLayouts/Profile/views/AboutView.qml +++ b/ui/app/AppLayouts/Profile/views/AboutView.qml @@ -15,7 +15,7 @@ import shared.status 1.0 SettingsContentBase { id: root - property var store + property QtObject store // TODO when we re-implement check for updates, put isProduction back titleRowComponentLoader.active: false //root.store.isProduction diff --git a/ui/app/AppLayouts/Profile/views/ChangePasswordView.qml b/ui/app/AppLayouts/Profile/views/ChangePasswordView.qml index 789217b5388..423d665323d 100644 --- a/ui/app/AppLayouts/Profile/views/ChangePasswordView.qml +++ b/ui/app/AppLayouts/Profile/views/ChangePasswordView.qml @@ -17,11 +17,12 @@ import StatusQ.Popups 0.1 import StatusQ.Popups.Dialog 0.1 import AppLayouts.Profile.popups 1.0 +import AppLayouts.Profile.stores 1.0 SettingsContentBase { id: root - property var privacyStore + property PrivacyStore privacyStore readonly property bool biometricsEnabled: localAccountSettings.storeToKeychainValue === Constants.keychain.storedValue.store diff --git a/ui/app/AppLayouts/Profile/views/CommunitiesView.qml b/ui/app/AppLayouts/Profile/views/CommunitiesView.qml index dd399092618..294e26a1658 100644 --- a/ui/app/AppLayouts/Profile/views/CommunitiesView.qml +++ b/ui/app/AppLayouts/Profile/views/CommunitiesView.qml @@ -22,12 +22,13 @@ import AppLayouts.Communities.panels 1.0 import AppLayouts.Profile.stores 1.0 import AppLayouts.Wallet.stores 1.0 as WalletStore import AppLayouts.Chat.stores 1.0 as ChatStore +import AppLayouts.stores 1.0 as AppLayoutsStores SettingsContentBase { id: root property ProfileSectionStore profileSectionStore - property var rootStore + property AppLayoutsStores.RootStore rootStore required property WalletStore.WalletAssetsStore walletAssetsStore required property CurrenciesStore currencyStore diff --git a/ui/app/AppLayouts/Profile/views/EnsDetailsView.qml b/ui/app/AppLayouts/Profile/views/EnsDetailsView.qml index 2eb3723ce59..10eb7999a1f 100644 --- a/ui/app/AppLayouts/Profile/views/EnsDetailsView.qml +++ b/ui/app/AppLayouts/Profile/views/EnsDetailsView.qml @@ -13,10 +13,12 @@ import shared.popups 1.0 import shared.popups.send 1.0 import shared.stores.send 1.0 +import "../stores" + Item { id: root - property var ensUsernamesStore - property var contactsStore + property EnsUsernamesStore ensUsernamesStore + property ContactsStore contactsStore required property TransactionStore transactionStore property string username: "" property string chainId: "" diff --git a/ui/app/AppLayouts/Profile/views/EnsListView.qml b/ui/app/AppLayouts/Profile/views/EnsListView.qml index 98f65cf6ad2..d766dfe95ed 100644 --- a/ui/app/AppLayouts/Profile/views/EnsListView.qml +++ b/ui/app/AppLayouts/Profile/views/EnsListView.qml @@ -13,12 +13,14 @@ import shared.views.chat 1.0 import shared.controls.chat 1.0 import utils 1.0 +import AppLayouts.Profile.stores 1.0 + import "../popups" Item { id: root - property var ensUsernamesStore + property EnsUsernamesStore ensUsernamesStore property int profileContentWidth diff --git a/ui/app/AppLayouts/Profile/views/EnsSearchView.qml b/ui/app/AppLayouts/Profile/views/EnsSearchView.qml index e14052791d2..d9c9b858dd6 100644 --- a/ui/app/AppLayouts/Profile/views/EnsSearchView.qml +++ b/ui/app/AppLayouts/Profile/views/EnsSearchView.qml @@ -15,11 +15,13 @@ import shared.controls 1.0 import shared.popups.send 1.0 import shared.stores.send 1.0 +import "../stores" + Item { id: root - property var ensUsernamesStore - property var contactsStore + property EnsUsernamesStore ensUsernamesStore + property ContactsStore contactsStore required property TransactionStore transactionStore property int profileContentWidth diff --git a/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml b/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml index c487f9dafb3..a51f0c9042c 100644 --- a/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml +++ b/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml @@ -18,11 +18,13 @@ import StatusQ.Components 0.1 import AppLayouts.Wallet.stores 1.0 +import "../stores" + Item { id: root - property var ensUsernamesStore - property var contactsStore + property EnsUsernamesStore ensUsernamesStore + property ContactsStore contactsStore required property TransactionStore transactionStore property WalletAssetsStore walletAssetsStore property string username: "" diff --git a/ui/app/AppLayouts/Profile/views/EnsView.qml b/ui/app/AppLayouts/Profile/views/EnsView.qml index 03ca979de82..8106a13fd81 100644 --- a/ui/app/AppLayouts/Profile/views/EnsView.qml +++ b/ui/app/AppLayouts/Profile/views/EnsView.qml @@ -17,7 +17,7 @@ Item { property EnsUsernamesStore ensUsernamesStore property WalletAssetsStore walletAssetsStore - property var contactsStore + property ContactsStore contactsStore property var networkConnectionStore required property TransactionStore transactionStore diff --git a/ui/app/AppLayouts/Profile/views/LeftTabView.qml b/ui/app/AppLayouts/Profile/views/LeftTabView.qml index 53076ea340d..6722f749dac 100644 --- a/ui/app/AppLayouts/Profile/views/LeftTabView.qml +++ b/ui/app/AppLayouts/Profile/views/LeftTabView.qml @@ -9,11 +9,12 @@ import shared 1.0 import shared.popups 1.0 import "../panels" +import "../stores" Item { id: root - property var store + property ProfileSectionStore store signal menuItemClicked(var event) diff --git a/ui/app/AppLayouts/Profile/views/SyncingView.qml b/ui/app/AppLayouts/Profile/views/SyncingView.qml index 6a2449fd39d..3ca5214bb14 100644 --- a/ui/app/AppLayouts/Profile/views/SyncingView.qml +++ b/ui/app/AppLayouts/Profile/views/SyncingView.qml @@ -28,10 +28,10 @@ import "../../stores" SettingsContentBase { id: root - property var devicesStore + property DevicesStore devicesStore property ProfileStore profileStore property PrivacyStore privacyStore - property var advancedStore + property AdvancedStore advancedStore required property bool isProduction diff --git a/ui/app/AppLayouts/Wallet/WalletLayout.qml b/ui/app/AppLayouts/Wallet/WalletLayout.qml index 6e1a5850081..cafbaf653eb 100644 --- a/ui/app/AppLayouts/Wallet/WalletLayout.qml +++ b/ui/app/AppLayouts/Wallet/WalletLayout.qml @@ -8,6 +8,7 @@ import StatusQ.Core.Utils 0.1 as StatusQUtils import utils 1.0 import shared.controls 1.0 import shared.popups.keypairimport 1.0 +import shared.stores 1.0 import "popups" import "panels" @@ -25,7 +26,7 @@ Item { property var communitiesStore property var emojiPopup: null property var sendModalPopup - property var networkConnectionStore + property NetworkConnectionStore networkConnectionStore property bool appMainVisible onAppMainVisibleChanged: { diff --git a/ui/app/AppLayouts/Wallet/controls/SavedAddressesDelegate.qml b/ui/app/AppLayouts/Wallet/controls/SavedAddressesDelegate.qml index 9bdd8a3042c..7ac49c7e239 100644 --- a/ui/app/AppLayouts/Wallet/controls/SavedAddressesDelegate.qml +++ b/ui/app/AppLayouts/Wallet/controls/SavedAddressesDelegate.qml @@ -18,8 +18,6 @@ import ".." StatusListItem { id: root - property var store - property var contactsStore property var networkConnectionStore property string name property string address @@ -178,7 +176,7 @@ StatusListItem { timeout: 1500 autoDismissMenu: true onTriggered: { - store.copyToClipboard(d.visibleAddress) + RootStore.copyToClipboard(d.visibleAddress) } } diff --git a/ui/app/AppLayouts/Wallet/panels/ActivityFilterPanel.qml b/ui/app/AppLayouts/Wallet/panels/ActivityFilterPanel.qml index c3f646884de..87d7a2fcd08 100644 --- a/ui/app/AppLayouts/Wallet/panels/ActivityFilterPanel.qml +++ b/ui/app/AppLayouts/Wallet/panels/ActivityFilterPanel.qml @@ -11,12 +11,12 @@ import shared.panels 1.0 import "../controls" import "../popups" +import "../stores" as WalletStores Column { id: root property var activityFilterStore - property var store property bool isLoading: false property bool hideNoResults: false @@ -198,7 +198,7 @@ Column { delegate: Loader { active: parent.visible sourceComponent: ActivityFilterTagItem { - tagPrimaryLabel.text: root.store.getNameForAddress(modelData) || StatusQUtils.Utils.elideText(modelData,6,4) + tagPrimaryLabel.text: WalletStores.RootStore.getNameForAddress(modelData) || StatusQUtils.Utils.elideText(modelData,6,4) onClosed: activityFilterStore.toggleRecents(modelData) } } @@ -208,7 +208,7 @@ Column { model: activityFilterStore.savedAddressFilters delegate: ActivityFilterTagItem { tagPrimaryLabel.text: { - let savedAddress = root.store.getSavedAddress(modelData) + let savedAddress = WalletStores.RootStore.getSavedAddress(modelData) return savedAddress.name } onClosed: activityFilterStore.toggleSavedAddress(modelData) @@ -265,7 +265,6 @@ Column { onUpdateTokensFilter: activityFilterStore.toggleToken(tokenSymbol) onUpdateCollectiblesFilter: activityFilterStore.toggleCollectibles(uid) - store: root.store recentsList: activityFilterStore.recentsList loadingRecipients: activityFilterStore.loadingRecipients loadingCollectibles: activityFilterStore.loadingCollectibles diff --git a/ui/app/AppLayouts/Wallet/panels/WalletHeader.qml b/ui/app/AppLayouts/Wallet/panels/WalletHeader.qml index 6c1fe580efe..18739155640 100644 --- a/ui/app/AppLayouts/Wallet/panels/WalletHeader.qml +++ b/ui/app/AppLayouts/Wallet/panels/WalletHeader.qml @@ -11,6 +11,8 @@ import StatusQ.Popups 0.1 import SortFilterProxyModel 0.2 +import shared.stores 1.0 + import utils 1.0 import "../controls" @@ -18,9 +20,8 @@ import "../controls" Item { id: root - property var networkConnectionStore + property NetworkConnectionStore networkConnectionStore property var overview - property var store property var walletStore property alias headerButton: headerButton @@ -113,10 +114,10 @@ Item { Layout.alignment: Qt.AlignTop - flatNetworks: walletStore.filteredFlatModel + flatNetworks: root.walletStore.filteredFlatModel onToggleNetwork: (network) => { - walletStore.toggleNetwork(network.chainId) + root.walletStore.toggleNetwork(network.chainId) } } } diff --git a/ui/app/AppLayouts/Wallet/popups/ActivityFilterMenu.qml b/ui/app/AppLayouts/Wallet/popups/ActivityFilterMenu.qml index dd0bbbf41a3..2cf833e1ce4 100644 --- a/ui/app/AppLayouts/Wallet/popups/ActivityFilterMenu.qml +++ b/ui/app/AppLayouts/Wallet/popups/ActivityFilterMenu.qml @@ -8,8 +8,6 @@ import "./filterSubMenus" StatusMenu { id: root - property var store - // Time filter property int selectedTime: ActivityFilterMenu.All signal setSelectedTime(int selectedTime) @@ -106,7 +104,6 @@ StatusMenu { id: counterPartyMenu height: 439 onBack: root.open() - store: root.store recentsList: root.recentsList loadingRecipients: root.loadingRecipients recentsFilters: root.recentsFilters diff --git a/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml b/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml index 7456ddace3b..18e7985ced2 100644 --- a/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml +++ b/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml @@ -20,7 +20,7 @@ import SortFilterProxyModel 0.2 import AppLayouts.stores 1.0 -import "../stores" +import "../stores" as WalletStores import "../controls" import ".." @@ -33,7 +33,7 @@ StatusModal { width: 477 - headerSettings.title: d.editMode? qsTr("Edit saved address") : qsTr("Add new saved address") + headerSettings.title: d.editMode? qsTr("Edit saved addres") : qsTr("Add new saved address") headerSettings.subTitle: d.editMode? d.name : "" property var store: RootStore @@ -129,7 +129,7 @@ StatusModal { property int contactsWithSameAddress: 0 function checkIfAddressIsAlreadyAddedToWallet(address) { - let account = root.store.getWalletAccount(address) + let account = WalletStores.RootStore.getWalletAccount(address) d.cardsModel.clear() d.addressAlreadyAddedToWalletError = !!account.name if (!d.addressAlreadyAddedToWalletError) { @@ -146,7 +146,7 @@ StatusModal { } function checkIfAddressIsAlreadyAddedToSavedAddresses(address) { - let savedAddress = root.store.getSavedAddress(address) + let savedAddress = WalletStores.RootStore.getSavedAddress(address) d.cardsModel.clear() d.addressAlreadyAddedToSavedAddressesError = !!savedAddress.address if (!d.addressAlreadyAddedToSavedAddressesError) { @@ -262,7 +262,7 @@ StatusModal { || event !== undefined && event.key !== Qt.Key_Return && event.key !== Qt.Key_Enter) return - root.store.createOrUpdateSavedAddress(d.name, d.address, d.ens, d.colorId, d.chainShortNames) + WalletStores.RootStore.createOrUpdateSavedAddress(d.name, d.address, d.ens, d.colorId, d.chainShortNames) root.close() } } @@ -380,7 +380,7 @@ StatusModal { StatusValidator { name: "check-saved-address-existence" validate: (value) => { - return !root.store.savedAddressNameExists(value) + return !WalletStores.RootStore.savedAddressNameExists(value) || d.editMode && d.storedName == value } errorMessage: qsTr("Name already in use") diff --git a/ui/app/AppLayouts/Wallet/popups/ReceiveModal.qml b/ui/app/AppLayouts/Wallet/popups/ReceiveModal.qml index 8f4e46fa3ee..d7e33c9865f 100644 --- a/ui/app/AppLayouts/Wallet/popups/ReceiveModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/ReceiveModal.qml @@ -21,7 +21,7 @@ import AppLayouts.stores 1.0 import AppLayouts.Wallet.controls 1.0 import ".." -import "../stores" +import "../stores" as WalletStores StatusModal { id: root @@ -32,12 +32,11 @@ StatusModal { property bool switchingAccounsEnabled: true property bool changingPreferredChainsEnabled: true - property string qrImageSource: store.getQrCode(d.visibleAddress) + property string qrImageSource: WalletStores.RootStore.getQrCode(d.visibleAddress) property var getNetworkShortNames: function(chainIDsString) { - return store.getNetworkShortNames(chainIDsString) + return WalletStores.RootStore.getNetworkShortNames(chainIDsString) } - property var store: RootStore signal selectedAccountIndexChanged(int selectedIndex) signal updatePreferredChains(string address, string preferredChains) @@ -131,7 +130,7 @@ StatusModal { } onOpened: { - store.addressWasShown(root.selectedAccount.address) + WalletStores.RootStore.addressWasShown(root.selectedAccount.address) } QtObject { @@ -251,7 +250,7 @@ StatusModal { spacing: 5 Repeater { - model: root.store.filteredFlatModel + model: WalletStores.RootStore.filteredFlatModel delegate: StatusNetworkListItemTag { enabled: false button.visible: false @@ -283,7 +282,7 @@ StatusModal { margins: -1 // to allow positioning outside the bounds of the dialog - flatNetworks: root.store.filteredFlatModel + flatNetworks: WalletStores.RootStore.filteredFlatModel preferredNetworksMode: true preferredSharingNetworks: d.preferredChainIdsArray @@ -292,7 +291,7 @@ StatusModal { closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside onToggleNetwork: (network, index) => { - d.preferredChainIdsArray = store.processPreferredSharingNetworkToggle(d.preferredChainIdsArray, network) + d.preferredChainIdsArray = WalletStores.RootStore.processPreferredSharingNetworkToggle(d.preferredChainIdsArray, network) } onClosed: { diff --git a/ui/app/AppLayouts/Wallet/popups/SavedAddressActivityPopup.qml b/ui/app/AppLayouts/Wallet/popups/SavedAddressActivityPopup.qml index 0eda33cc2b2..c1006753e81 100644 --- a/ui/app/AppLayouts/Wallet/popups/SavedAddressActivityPopup.qml +++ b/ui/app/AppLayouts/Wallet/popups/SavedAddressActivityPopup.qml @@ -145,8 +145,6 @@ StatusModal { asset.letterSize: 32 bgColor: Theme.palette.statusListItem.backgroundColor - store: WalletStore.RootStore - contactsStore: root.contactsStore networkConnectionStore: root.networkConnectionStore name: d.name diff --git a/ui/app/AppLayouts/Wallet/popups/filterSubMenus/ActivityCounterpartyFilterSubMenu.qml b/ui/app/AppLayouts/Wallet/popups/filterSubMenus/ActivityCounterpartyFilterSubMenu.qml index bdd4cd6c3b6..e51c843e781 100644 --- a/ui/app/AppLayouts/Wallet/popups/filterSubMenus/ActivityCounterpartyFilterSubMenu.qml +++ b/ui/app/AppLayouts/Wallet/popups/filterSubMenus/ActivityCounterpartyFilterSubMenu.qml @@ -15,13 +15,12 @@ import SortFilterProxyModel 0.2 import utils 1.0 import "../../../Wallet" +import "../../../Wallet/stores" as WalletStores import "../../controls" StatusMenu { id: root - property var store - property var recentsList property bool loadingRecipients: false property var recentsFilters @@ -143,14 +142,14 @@ StatusMenu { if (!searchValue) return true const address = model.address.toLowerCase() - return address.startsWith(searchValue) || store.getNameForAddress(address).toLowerCase().indexOf(searchValue) !== -1 + return address.startsWith(searchValue) || WalletStores.RootStore.getNameForAddress(address).toLowerCase().indexOf(searchValue) !== -1 } } } reuseItems: true delegate: ActivityTypeCheckBox { - readonly property string name: store.getNameForAddress(model.address) + readonly property string name: WalletStores.RootStore.getNameForAddress(model.address) width: ListView.view.width height: 44 title: name || StatusQUtils.Utils.elideText(model.address,6,4) diff --git a/ui/app/AppLayouts/Wallet/views/RightTabBaseView.qml b/ui/app/AppLayouts/Wallet/views/RightTabBaseView.qml index 98894876f5f..907d2893ba5 100644 --- a/ui/app/AppLayouts/Wallet/views/RightTabBaseView.qml +++ b/ui/app/AppLayouts/Wallet/views/RightTabBaseView.qml @@ -3,6 +3,8 @@ import QtQuick.Layouts 1.14 import StatusQ.Core 0.1 +import shared.stores 1.0 + import "../stores" import "../panels" @@ -12,7 +14,7 @@ FocusScope { property var store property var contactsStore property var communitiesStore - property var networkConnectionStore + property NetworkConnectionStore networkConnectionStore property var sendModal @@ -30,7 +32,6 @@ FocusScope { id: header Layout.fillWidth: true overview: RootStore.overview - store: root.store walletStore: RootStore networkConnectionStore: root.networkConnectionStore } diff --git a/ui/app/AppLayouts/Wallet/views/SavedAddresses.qml b/ui/app/AppLayouts/Wallet/views/SavedAddresses.qml index 8b6ef97cc4e..79bcf2be47d 100644 --- a/ui/app/AppLayouts/Wallet/views/SavedAddresses.qml +++ b/ui/app/AppLayouts/Wallet/views/SavedAddresses.qml @@ -147,8 +147,6 @@ ColumnLayout { chainShortNames: model.chainShortNames ens: model.ens colorId: model.colorId - store: RootStore - contactsStore: root.contactsStore networkConnectionStore: root.networkConnectionStore areTestNetworksEnabled: RootStore.areTestNetworksEnabled isGoerliEnabled: RootStore.isGoerliEnabled diff --git a/ui/app/AppLayouts/Wallet/views/collectibles/CollectibleDetailView.qml b/ui/app/AppLayouts/Wallet/views/collectibles/CollectibleDetailView.qml index 17608b4f257..c587fa5fc83 100644 --- a/ui/app/AppLayouts/Wallet/views/collectibles/CollectibleDetailView.qml +++ b/ui/app/AppLayouts/Wallet/views/collectibles/CollectibleDetailView.qml @@ -15,6 +15,7 @@ import utils 1.0 import shared.controls 1.0 import shared.views 1.0 import shared.popups 1.0 +import shared.stores 1.0 as SharedStores import "../../stores" import "../../controls" @@ -24,7 +25,7 @@ Item { signal launchTransactionDetail(string txID) - required property var rootStore + required property SharedStores.RootStore rootStore required property var walletRootStore required property var communitiesStore diff --git a/ui/app/mainui/AppMain.qml b/ui/app/mainui/AppMain.qml index 4f84fd41e74..919f853d98a 100644 --- a/ui/app/mainui/AppMain.qml +++ b/ui/app/mainui/AppMain.qml @@ -41,7 +41,7 @@ import AppLayouts.Browser.stores 1.0 as BrowserStores import AppLayouts.stores 1.0 import AppLayouts.Chat.stores 1.0 as ChatStores import AppLayouts.Communities.stores 1.0 -import AppLayouts.Wallet.stores 1.0 as WalletStore +import AppLayouts.Wallet.stores 1.0 as WalletStores import AppLayouts.Wallet.popups 1.0 as WalletPopups import mainui.activitycenter.stores 1.0 @@ -58,21 +58,21 @@ Item { property RootStore rootStore: RootStore { profileSectionStore.sendModalPopup: sendModal } - property var rootChatStore: ChatStores.RootStore { + property ChatStores.RootStore rootChatStore: ChatStores.RootStore { contactsStore: appMain.rootStore.contactStore communityTokensStore: appMain.communityTokensStore emojiReactionsModel: appMain.rootStore.emojiReactionsModel openCreateChat: createChatView.opened networkConnectionStore: appMain.networkConnectionStore } - property var createChatPropertiesStore: ChatStores.CreateChatPropertiesStore {} + property ChatStores.CreateChatPropertiesStore createChatPropertiesStore: ChatStores.CreateChatPropertiesStore {} property ActivityCenterStore activityCenterStore: ActivityCenterStore {} property NetworkConnectionStore networkConnectionStore: NetworkConnectionStore {} property CommunityTokensStore communityTokensStore: CommunityTokensStore {} property CommunitiesStore communitiesStore: CommunitiesStore {} - readonly property WalletStore.TokensStore tokensStore: WalletStore.RootStore.tokensStore - readonly property WalletStore.WalletAssetsStore walletAssetsStore: WalletStore.RootStore.walletAssetsStore - readonly property WalletStore.CollectiblesStore walletCollectiblesStore: WalletStore.RootStore.collectiblesStore + readonly property WalletStores.TokensStore tokensStore: WalletStores.RootStore.tokensStore + readonly property WalletStores.WalletAssetsStore walletAssetsStore: WalletStores.RootStore.walletAssetsStore + readonly property WalletStores.CollectiblesStore walletCollectiblesStore: WalletStores.RootStore.collectiblesStore readonly property CurrenciesStore currencyStore: CurrenciesStore {} readonly property TransactionStore transactionStore: TransactionStore { walletAssetStore: appMain.walletAssetsStore @@ -1298,10 +1298,9 @@ Item { active: appView.currentIndex === Constants.appViewStackIndex.browser asynchronous: true sourceComponent: BrowserLayout { - globalStore: appMain.rootStore sendTransactionModal: sendModal transactionStore: appMain.transactionStore - assetsStore: appMain.walletAssetsStore + walletAssetsStore: appMain.walletAssetsStore currencyStore: appMain.currencyStore tokensStore: appMain.tokensStore } @@ -1481,7 +1480,7 @@ Item { communityTokensStore: appMain.communityTokensStore emojiReactionsModel: appMain.rootStore.emojiReactionsModel openCreateChat: createChatView.opened - walletStore: WalletStore.RootStore + walletStore: WalletStores.RootStore chatCommunitySectionModule: appMain.rootStore.mainModuleInst.getChatSectionModule() } activityCenterStore: appMain.activityCenterStore @@ -1787,7 +1786,7 @@ Item { } sourceComponent: WalletPopups.AddEditSavedAddressPopup { - flatNetworks: WalletStore.RootStore.filteredFlatModel + flatNetworks: WalletStores.RootStore.filteredFlatModel onClosed: { addEditSavedAddress.close() @@ -1795,11 +1794,11 @@ Item { } Connections { - target: WalletStore.RootStore.walletSectionSavedAddressesInst + target: WalletStores.RootStore.walletSectionSavedAddressesInst function onSavedAddressAddedOrUpdated(added: bool, name: string, address: string, errorMsg: string) { - WalletStore.RootStore.addingSavedAddress = false - WalletStore.RootStore.lastCreatedSavedAddress = { address: address, error: errorMsg } + WalletStores.RootStore.addingSavedAddress = false + WalletStores.RootStore.lastCreatedSavedAddress = { address: address, error: errorMsg } if (!!errorMsg) { let mode = qsTr("adding") @@ -1865,16 +1864,16 @@ Item { } onRemoveSavedAddress: { - WalletStore.RootStore.deleteSavedAddress(address) + WalletStores.RootStore.deleteSavedAddress(address) close() } } Connections { - target: WalletStore.RootStore.walletSectionSavedAddressesInst + target: WalletStores.RootStore.walletSectionSavedAddressesInst function onSavedAddressDeleted(name: string, address: string, errorMsg: string) { - WalletStore.RootStore.deletingSavedAddress = false + WalletStores.RootStore.deletingSavedAddress = false if (!!errorMsg) { @@ -1949,30 +1948,30 @@ Item { if (showQR.showSingleAccount || showQR.showForSavedAddress) { return null } - return WalletStore.RootStore.receiveAccounts + return WalletStores.RootStore.receiveAccounts } selectedAccount: { if (showQR.showSingleAccount || showQR.showForSavedAddress) { return showQR.selectedAccount } - return WalletStore.RootStore.selectedReceiveAccount + return WalletStores.RootStore.selectedReceiveAccount } onSelectedAccountIndexChanged: { if (showQR.showSingleAccount || showQR.showForSavedAddress) { return } - WalletStore.RootStore.switchReceiveAccount(selectedIndex) + WalletStores.RootStore.switchReceiveAccount(selectedIndex) } onUpdatePreferredChains: { if (showQR.showForSavedAddress) { - let shortNames = WalletStore.RootStore.getNetworkShortNames(preferredChains) - WalletStore.RootStore.updatePreferredChains(address, shortNames) + let shortNames = WalletStores.RootStore.getNetworkShortNames(preferredChains) + WalletStores.RootStore.updatePreferredChains(address, shortNames) return } - WalletStore.RootStore.updateWalletAccountPreferredChains(address, preferredChains) + WalletStores.RootStore.updateWalletAccountPreferredChains(address, preferredChains) } onClosed: { @@ -2039,9 +2038,9 @@ Item { id: walletConnectService wcSDK: WalletConnectSDK { - active: WalletStore.RootStore.walletSectionInst.walletReady + active: WalletStores.RootStore.walletSectionInst.walletReady - projectId: WalletStore.RootStore.appSettings.walletConnectProjectID + projectId: WalletStores.RootStore.appSettings.walletConnectProjectID } store: DAppsStore { controller: WalletStore.RootStore.walletConnectController diff --git a/ui/app/mainui/Popups.qml b/ui/app/mainui/Popups.qml index 1736b6aab0b..6abf99065a3 100644 --- a/ui/app/mainui/Popups.qml +++ b/ui/app/mainui/Popups.qml @@ -11,12 +11,15 @@ import StatusQ.Popups 0.1 import StatusQ.Core.Theme 0.1 import StatusQ.Core.Utils 0.1 as SQUtils +import AppLayouts.stores 1.0 as AppLayoutStores import AppLayouts.Chat.popups 1.0 import AppLayouts.Profile.popups 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores import AppLayouts.Communities.popups 1.0 import AppLayouts.Communities.helpers 1.0 import AppLayouts.Wallet.popups.swap 1.0 import AppLayouts.Wallet.popups 1.0 +import AppLayouts.Communities.stores 1.0 import AppLayouts.Wallet.stores 1.0 as WalletStore import AppLayouts.Chat.stores 1.0 as ChatStore @@ -31,10 +34,10 @@ QtObject { id: root required property var popupParent - required property var rootStore + required property AppLayoutStores.RootStore rootStore required property var communityTokensStore - property var communitiesStore - property var devicesStore + property CommunitiesStore communitiesStore + property ProfileStores.DevicesStore devicesStore property CurrenciesStore currencyStore property WalletStore.WalletAssetsStore walletAssetsStore property WalletStore.CollectiblesStore walletCollectiblesStore @@ -255,7 +258,9 @@ QtObject { } } - function openPinnedMessagesPopup(store, messageStore, pinnedMessagesModel, messageToPin, chatId) { + function openPinnedMessagesPopup(store: ChatStores.RootStore, + messageStore : ChatStores.MessageStore, + pinnedMessagesModel, messageToPin, chatId) { openPopup(pinnedMessagesPopup, { store: store, messageStore: messageStore, @@ -630,7 +635,6 @@ QtObject { id: communityProfilePopup CommunityProfilePopup { - contactsStore: rootStore.contactStore hasAddedContacts: rootStore.hasAddedContacts onClosed: destroy() @@ -964,7 +968,7 @@ QtObject { CommunityMembershipSetupDialog { id: editSharedAddressesPopup - readonly property var chatStore: ChatStore.RootStore { + readonly property ChatStore.RootStore chatStore: ChatStore.RootStore { contactsStore: root.rootStore.contactStore chatCommunitySectionModule: { root.rootStore.mainModuleInst.prepareCommunitySectionModuleForCommunityId(editSharedAddressesPopup.communityId) diff --git a/ui/imports/shared/controls/TransactionDelegate.qml b/ui/imports/shared/controls/TransactionDelegate.qml index b4768fbc7b6..54431cb0cd1 100644 --- a/ui/imports/shared/controls/TransactionDelegate.qml +++ b/ui/imports/shared/controls/TransactionDelegate.qml @@ -12,6 +12,7 @@ import AppLayouts.Wallet 1.0 import utils 1.0 import shared 1.0 +import shared.stores 1.0 as SharedStores /*! \qmltype TransactionDelegate @@ -46,7 +47,7 @@ StatusListItem { property bool showAllAccounts: false property bool displayValues: true - required property var rootStore + required property SharedStores.RootStore rootStore required property var walletRootStore readonly property bool isModelDataValid: modelData !== undefined && !!modelData diff --git a/ui/imports/shared/popups/ContactVerificationRequestPopup.qml b/ui/imports/shared/popups/ContactVerificationRequestPopup.qml index f44dc71d13f..433bb24fa61 100644 --- a/ui/imports/shared/popups/ContactVerificationRequestPopup.qml +++ b/ui/imports/shared/popups/ContactVerificationRequestPopup.qml @@ -10,10 +10,12 @@ import StatusQ.Core.Utils 0.1 as SQUtils import utils 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores + CommonContactDialog { id: root - required property var contactsStore + required property ProfileStores.ContactsStore contactsStore signal verificationRefused(string senderPublicKey) signal responseSent(string senderPublicKey, string response) diff --git a/ui/imports/shared/popups/SendContactRequestModal.qml b/ui/imports/shared/popups/SendContactRequestModal.qml index 974d590ee39..302ee0eca1c 100644 --- a/ui/imports/shared/popups/SendContactRequestModal.qml +++ b/ui/imports/shared/popups/SendContactRequestModal.qml @@ -10,10 +10,12 @@ import StatusQ.Controls 0.1 import StatusQ.Controls.Validators 0.1 import StatusQ.Popups.Dialog 0.1 +import AppLayouts.stores 1.0 as AppLayoutStores + CommonContactDialog { id: root - property var rootStore + property AppLayoutStores.RootStore rootStore property string labelText: qsTr("Why should they accept your contact request?") property string challengeText: qsTr("Write a short message telling them who you are...") diff --git a/ui/imports/shared/status/StatusChatInput.qml b/ui/imports/shared/status/StatusChatInput.qml index b9a44015602..f601740ab32 100644 --- a/ui/imports/shared/status/StatusChatInput.qml +++ b/ui/imports/shared/status/StatusChatInput.qml @@ -13,6 +13,7 @@ import shared.stores 1.0 //TODO remove this dependency import AppLayouts.Chat.panels 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores import StatusQ 0.1 import StatusQ.Core 0.1 @@ -35,8 +36,8 @@ Rectangle { signal dismissLinkPreviewSettings() signal dismissLinkPreview(int index) - property var usersStore - property var store + property ChatStores.UsersStore usersStore + property ChatStores.RootStore store property var emojiPopup: null property var stickersPopup: null diff --git a/ui/imports/shared/views/AssetsView.qml b/ui/imports/shared/views/AssetsView.qml index be2d47a6f62..5716eb04323 100644 --- a/ui/imports/shared/views/AssetsView.qml +++ b/ui/imports/shared/views/AssetsView.qml @@ -23,6 +23,7 @@ import shared.controls 1.0 import shared.popups 1.0 import AppLayouts.Wallet.controls 1.0 +import AppLayouts.Wallet.stores 1.0 as WalletStores ColumnLayout { id: root @@ -30,9 +31,9 @@ ColumnLayout { // expected roles: name, symbol, balances, currencyPrice, changePct24hour, communityId, communityName, communityImage required property var controller - property var currencyStore + required property CurrenciesStore currencyStore property var networkConnectionStore - required property var tokensStore + required property WalletStores.TokensStore tokensStore property var overview property bool assetDetailsLaunched: false property bool filterVisible diff --git a/ui/imports/shared/views/ExistingContacts.qml b/ui/imports/shared/views/ExistingContacts.qml index f7d15acd111..b365142c65b 100644 --- a/ui/imports/shared/views/ExistingContacts.qml +++ b/ui/imports/shared/views/ExistingContacts.qml @@ -12,14 +12,16 @@ import shared.status 1.0 import shared.stores 1.0 // TODO move Contact into shared to get rid of that import import AppLayouts.Chat.controls 1.0 +import AppLayouts.stores 1.0 as AppLayoutStores +import AppLayouts.Profile.stores 1.0 as ProfileStores import SortFilterProxyModel 0.2 Item { id: root - property var rootStore - property var contactsStore + property AppLayoutStores.RootStore rootStore + property ProfileStores.ContactsStore contactsStore property string communityId property string filterText: "" diff --git a/ui/imports/shared/views/HistoryView.qml b/ui/imports/shared/views/HistoryView.qml index 63da428ef28..e7911042f95 100644 --- a/ui/imports/shared/views/HistoryView.qml +++ b/ui/imports/shared/views/HistoryView.qml @@ -135,7 +135,6 @@ ColumnLayout { Layout.fillWidth: true sourceComponent: ActivityFilterPanel { activityFilterStore: WalletStores.RootStore.currentActivityFiltersStore - store: WalletStores.RootStore hideNoResults: newTransactions.visible isLoading: d.isInitialLoading } diff --git a/ui/imports/shared/views/PickedContacts.qml b/ui/imports/shared/views/PickedContacts.qml index 2a1660b4505..79127b8d464 100644 --- a/ui/imports/shared/views/PickedContacts.qml +++ b/ui/imports/shared/views/PickedContacts.qml @@ -11,13 +11,14 @@ import shared.status 1.0 import shared.stores 1.0 // TODO move Contact into shared to get rid of that import import AppLayouts.Chat.controls 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores import SortFilterProxyModel 0.2 Item { id: root - property var contactsStore + property ProfileStores.ContactsStore contactsStore property var pubKeys: ([]) diff --git a/ui/imports/shared/views/chat/MessageView.qml b/ui/imports/shared/views/chat/MessageView.qml index b2af940a775..d43e4ccd331 100644 --- a/ui/imports/shared/views/chat/MessageView.qml +++ b/ui/imports/shared/views/chat/MessageView.qml @@ -16,12 +16,14 @@ import StatusQ.Core.Utils 0.1 as StatusQUtils import StatusQ.Controls 0.1 import StatusQ.Components 0.1 +import AppLayouts.Chat.stores 1.0 as ChatStores + Loader { id: root - property var rootStore - property var messageStore - property var usersStore + property ChatStores.RootStore rootStore + property ChatStores.MessageStore messageStore + property ChatStores.UsersStore usersStore property var contactsStore property var chatContentModule property var chatCommunitySectionModule diff --git a/ui/imports/shared/views/chat/ProfileContextMenu.qml b/ui/imports/shared/views/chat/ProfileContextMenu.qml index 51b6cc63228..9afe9f3bcc2 100644 --- a/ui/imports/shared/views/chat/ProfileContextMenu.qml +++ b/ui/imports/shared/views/chat/ProfileContextMenu.qml @@ -4,6 +4,8 @@ import StatusQ.Popups 0.1 import StatusQ.Components 0.1 import StatusQ.Core.Utils 0.1 as StatusQUtils +import AppLayouts.Chat.stores 1.0 as ChatStores + import utils 1.0 import shared 1.0 import shared.panels 1.0 @@ -12,10 +14,11 @@ import shared.status 1.0 import shared.controls.chat 1.0 import shared.controls.chat.menuItems 1.0 + StatusMenu { id: root - property var store + property ChatStores.RootStore store property string myPublicKey: "" diff --git a/ui/imports/shared/views/profile/ProfileShowcaseAccountsView.qml b/ui/imports/shared/views/profile/ProfileShowcaseAccountsView.qml index 5b8c723cb67..b55b842ed0b 100644 --- a/ui/imports/shared/views/profile/ProfileShowcaseAccountsView.qml +++ b/ui/imports/shared/views/profile/ProfileShowcaseAccountsView.qml @@ -11,13 +11,15 @@ import StatusQ.Popups 0.1 import shared.controls.delegates 1.0 import utils 1.0 +import AppLayouts.Wallet.stores 1.0 as WalletStores + Item { id: root required property string mainDisplayName required property bool sendToAccountEnabled required property var accountsModel - required property var walletStore + required property WalletStores.RootStore walletStore property alias cellWidth: accountsView.cellWidth property alias cellHeight: accountsView.cellHeight diff --git a/ui/imports/shared/views/profile/ProfileShowcaseCollectiblesView.qml b/ui/imports/shared/views/profile/ProfileShowcaseCollectiblesView.qml index 25c80a130db..fe6d9c31f70 100644 --- a/ui/imports/shared/views/profile/ProfileShowcaseCollectiblesView.qml +++ b/ui/imports/shared/views/profile/ProfileShowcaseCollectiblesView.qml @@ -14,12 +14,14 @@ import StatusQ.Popups 0.1 import shared.controls 1.0 import utils 1.0 +import AppLayouts.Wallet.stores 1.0 as WalletStores + Item { id: root required property string mainDisplayName required property var collectiblesModel - required property var walletStore + required property WalletStores.RootStore walletStore property alias cellWidth: collectiblesView.cellWidth property alias cellHeight: collectiblesView.cellHeight @@ -206,4 +208,4 @@ Item { } } } -} \ No newline at end of file +} diff --git a/ui/imports/shared/views/profile/ProfileShowcaseView.qml b/ui/imports/shared/views/profile/ProfileShowcaseView.qml index c8fbe3748d9..5b6beee535c 100644 --- a/ui/imports/shared/views/profile/ProfileShowcaseView.qml +++ b/ui/imports/shared/views/profile/ProfileShowcaseView.qml @@ -15,6 +15,8 @@ import SortFilterProxyModel 0.2 import utils 1.0 +import AppLayouts.Wallet.stores 1.0 as WalletStores + Control { id: root @@ -31,7 +33,7 @@ Control { property var globalAssetsModel property var globalCollectiblesModel - property var walletStore + property WalletStores.RootStore walletStore required property string mainDisplayName required property bool readOnly diff --git a/ui/imports/utils/Audio.qml b/ui/imports/utils/Audio.qml index 2f0000cdb1a..d0480e31446 100644 --- a/ui/imports/utils/Audio.qml +++ b/ui/imports/utils/Audio.qml @@ -1,10 +1,12 @@ import QtQuick 2.14 import QtMultimedia 5.14 as T +import AppLayouts.stores 1.0 + T.Audio { id: audio - property var store + property RootStore store audioRole: Audio.NotificationRole volume: T.QtMultimedia.convertVolume(store.volume,