diff --git a/storybook/pages/ActivityNotificationCommunityTokenReceivedPage.qml b/storybook/pages/ActivityNotificationCommunityTokenReceivedPage.qml index aaabcc5f4b..92b6c72c04 100644 --- a/storybook/pages/ActivityNotificationCommunityTokenReceivedPage.qml +++ b/storybook/pages/ActivityNotificationCommunityTokenReceivedPage.qml @@ -8,6 +8,9 @@ import mainui 1.0 import Storybook 1.0 import Models 1.0 +import AppLayouts.stores 1.0 as AppLayoutStores +import shared.stores 1.0 + SplitView { id: root @@ -20,8 +23,8 @@ SplitView { Popups { popupParent: root - rootStore: QtObject {} - communityTokensStore: QtObject {} + rootStore: AppLayoutStores.RootStore {} + communityTokensStore: CommunityTokensStore {} } QtObject { diff --git a/storybook/pages/AddEditSavedAddressPopupPage.qml b/storybook/pages/AddEditSavedAddressPopupPage.qml index 9001deb6f9..f1b176b532 100644 --- a/storybook/pages/AddEditSavedAddressPopupPage.qml +++ b/storybook/pages/AddEditSavedAddressPopupPage.qml @@ -7,6 +7,7 @@ import SortFilterProxyModel 0.2 import Storybook 1.0 import Models 1.0 +import AppLayouts.stores 1.0 import AppLayouts.Wallet.popups 1.0 import utils 1.0 diff --git a/storybook/pages/AssetsViewPage.qml b/storybook/pages/AssetsViewPage.qml index b3078470d4..c52de78050 100644 --- a/storybook/pages/AssetsViewPage.qml +++ b/storybook/pages/AssetsViewPage.qml @@ -9,6 +9,12 @@ import Storybook 1.0 import Qt.labs.settings 1.1 +import Models 1.0 + +import AppLayouts.stores 1.0 as AppLayoutStores +import AppLayouts.Wallet.views 1.0 +import AppLayouts.Wallet.stores 1.0 + SplitView { id: root diff --git a/storybook/pages/ChangePasswordViewPage.qml b/storybook/pages/ChangePasswordViewPage.qml index 89ff89b882..8b0d179c91 100644 --- a/storybook/pages/ChangePasswordViewPage.qml +++ b/storybook/pages/ChangePasswordViewPage.qml @@ -4,6 +4,7 @@ import QtQuick.Layouts 1.15 import QtQuick.Extras 1.4 import shared.views 1.0 +import AppLayouts.Profile.stores 1.0 import AppLayouts.Profile.views 1.0 import utils 1.0 @@ -31,7 +32,7 @@ SplitView { passwordStrengthScoreFunction: (newPass) => Math.min(newPass.length, 4) - privacyStore: QtObject{ + privacyStore: PrivacyStore { property QtObject privacyModule: QtObject { signal passwordChanged(success: bool, errorMsg: string) signal storeToKeychainError(errorDescription: string) diff --git a/storybook/pages/CollectibleDetailViewPage.qml b/storybook/pages/CollectibleDetailViewPage.qml index 51fc8c04cc..7ab1ef3c64 100644 --- a/storybook/pages/CollectibleDetailViewPage.qml +++ b/storybook/pages/CollectibleDetailViewPage.qml @@ -4,6 +4,7 @@ import QtQuick.Layouts 1.15 import Storybook 1.0 +import AppLayouts.Communities.stores 1.0 as CommunitiesStores import AppLayouts.Wallet 1.0 import AppLayouts.Wallet.stores 1.0 as WalletStores import AppLayouts.Wallet.views.collectibles 1.0 @@ -11,7 +12,7 @@ import AppLayouts.Wallet.views.collectibles 1.0 import StatusQ.Core.Utils 0.1 import shared.controls 1.0 -import shared.stores 1.0 +import shared.stores 1.0 as SharedStores import Models 1.0 import utils 1.0 @@ -85,8 +86,8 @@ SplitView { isCollectibleLoading: isLoadingCheckbox.checked activityModel: d.transactionsModel addressFilters: d.addressesSelected - rootStore: QtObject { - readonly property string currentCurrency: "EUR" + rootStore: SharedStores.RootStore { + currentCurrency: "EUR" function getFiatValue(cryptoValue, symbol) { return cryptoValue * 0.1; @@ -96,7 +97,7 @@ SplitView { return "%L1 %2".arg(cryptoValue).arg(symbol) } } - walletRootStore: QtObject { + walletRootStore: WalletStores.RootStore { function getNameForAddress(address) { return "NAMEFOR: %1".arg(address) } @@ -127,7 +128,7 @@ SplitView { return "%1/assets/%2/%3/%4".arg(baseLink).arg(networkShortName).arg(contractAddress).arg(tokenId) } } - communitiesStore: QtObject { + communitiesStore: CommunitiesStores.CommunitiesStore { function getCommunityDetailsAsJson(communityId) { if (communityId.indexOf("unknown") >= 0) { return { name : "", image : "", color : "" } diff --git a/storybook/pages/CollectiblesViewPage.qml b/storybook/pages/CollectiblesViewPage.qml index a868e8d32c..895521ca55 100644 --- a/storybook/pages/CollectiblesViewPage.qml +++ b/storybook/pages/CollectiblesViewPage.qml @@ -12,9 +12,12 @@ import StatusQ.Core.Utils 0.1 as SQUtils import mainui 1.0 import utils 1.0 +import AppLayouts.stores 1.0 as AppLayoutStores +import AppLayouts.Communities.stores 1.0 as CommunitiesStore import AppLayouts.Wallet.views 1.0 import AppLayouts.Wallet.stores 1.0 +import shared.stores 1.0 import shared.views 1.0 import Storybook 1.0 @@ -47,8 +50,8 @@ SplitView { Popups { popupParent: root - rootStore: QtObject {} - communityTokensStore: QtObject {} + rootStore: AppLayoutStores.RootStore + communityTokensStore: CommunityTokensStore {} walletCollectiblesStore: CollectiblesStore { collectiblesController: collectiblesView.controller } diff --git a/storybook/pages/CommunitiesPortalLayoutPage.qml b/storybook/pages/CommunitiesPortalLayoutPage.qml index 03e967b2a1..104c760830 100644 --- a/storybook/pages/CommunitiesPortalLayoutPage.qml +++ b/storybook/pages/CommunitiesPortalLayoutPage.qml @@ -1,9 +1,11 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 +import AppLayouts.stores 1.0 as AppLayoutStores import AppLayouts.Communities 1.0 import AppLayouts.Communities.stores 1.0 +import StatusQ 0.1 import SortFilterProxyModel 0.2 import Storybook 1.0 @@ -19,7 +21,7 @@ SplitView { Popups { popupParent: root - rootStore: QtObject {} + rootStore: AppLayoutStores.RootStore communityTokensStore: CommunityTokensStore {} } diff --git a/storybook/pages/CommunitiesViewPage.qml b/storybook/pages/CommunitiesViewPage.qml index 33319ed425..e080591e73 100644 --- a/storybook/pages/CommunitiesViewPage.qml +++ b/storybook/pages/CommunitiesViewPage.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 2.15 import StatusQ.Core 0.1 +import AppLayouts.stores 1.0 as AppLayoutsStores import AppLayouts.Profile.views 1.0 import AppLayouts.Wallet.stores 1.0 import AppLayouts.Profile.stores 1.0 @@ -28,7 +29,7 @@ SplitView { Popups { popupParent: root - rootStore: QtObject {} + rootStore: AppLayoutsStores.RootStore communityTokensStore: CommunityTokensStore {} } @@ -56,7 +57,7 @@ SplitView { } property var communitiesList: ctrlEmptyView.checked ? emptyModel : communitiesModel } - rootStore: QtObject { + rootStore: AppLayoutsStores.RootStore { function isMyCommunityRequestPending(communityId) { return communityId === "0x0006" } diff --git a/storybook/pages/CreateChannelPopupPage.qml b/storybook/pages/CreateChannelPopupPage.qml index 2644ce3f79..94ed764443 100644 --- a/storybook/pages/CreateChannelPopupPage.qml +++ b/storybook/pages/CreateChannelPopupPage.qml @@ -10,6 +10,7 @@ import Storybook 1.0 import Models 1.0 import AppLayouts.Communities.popups 1.0 +import AppLayouts.Communities.stores 1.0 as CommunitiesStores SplitView { id: root @@ -77,7 +78,7 @@ SplitView { } } - communitiesStore: QtObject { + communitiesStore: CommunitiesStores.CommunitiesStore { property string discordImportChannelName readonly property bool discordImportInProgress: false readonly property bool discordDataExtractionInProgress: false diff --git a/storybook/pages/EditSettingsPanelPage.qml b/storybook/pages/EditSettingsPanelPage.qml index ee981ee8c8..dada080978 100644 --- a/storybook/pages/EditSettingsPanelPage.qml +++ b/storybook/pages/EditSettingsPanelPage.qml @@ -4,6 +4,7 @@ import QtQuick.Layouts 1.15 import mainui 1.0 import shared.stores 1.0 +import AppLayouts.stores 1.0 as AppLayoutsStores import AppLayouts.Communities.panels 1.0 import Storybook 1.0 @@ -14,7 +15,7 @@ SplitView { Popups { popupParent: root - rootStore: QtObject {} + rootStore: AppLayoutsStores.RootStore {} communityTokensStore: CommunityTokensStore {} } diff --git a/storybook/pages/ExportControlNodePopupPage.qml b/storybook/pages/ExportControlNodePopupPage.qml index 33a5fe920e..79691d8fba 100644 --- a/storybook/pages/ExportControlNodePopupPage.qml +++ b/storybook/pages/ExportControlNodePopupPage.qml @@ -2,6 +2,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import AppLayouts.Communities.popups 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores import utils 1.0 @@ -91,7 +92,7 @@ SplitView { property string image: Style.png("tokens/UNI") property string color: "orchid" } - devicesStore: QtObject { + devicesStore: ProfileStores.DevicesStore { function loadDevices() {} property bool isDeviceSetup: true diff --git a/storybook/pages/FirstTokenReceivedPopupPage.qml b/storybook/pages/FirstTokenReceivedPopupPage.qml index 2914f4af8b..505acc547b 100644 --- a/storybook/pages/FirstTokenReceivedPopupPage.qml +++ b/storybook/pages/FirstTokenReceivedPopupPage.qml @@ -7,6 +7,7 @@ import Models 1.0 import AppLayouts.Communities.popups 1.0 import AppLayouts.Communities.helpers 1.0 +import AppLayouts.Communities.stores 1.0 as CommunitiesStores import utils 1.0 @@ -43,7 +44,7 @@ SplitView { communityId: "123" communityName: communityNameText.text communityLogo: ModelsData.collectibles.doodles - communitiesStore: QtObject { + communitiesStore: CommunitiesStores.CommunitiesStore { function navigateToCommunity(id) { logs.logEvent("FirstTokenReceivedPopup::onNavigateToCommunity: " + id) } diff --git a/storybook/pages/InviteFriendsToCommunityPopupPage.qml b/storybook/pages/InviteFriendsToCommunityPopupPage.qml index 0add803a1c..1ba3ee2f83 100644 --- a/storybook/pages/InviteFriendsToCommunityPopupPage.qml +++ b/storybook/pages/InviteFriendsToCommunityPopupPage.qml @@ -1,7 +1,9 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 +import AppLayouts.stores 1.0 as AppLayoutStores import AppLayouts.Communities.popups 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores import utils 1.0 import Storybook 1.0 @@ -106,7 +108,7 @@ SplitView { name: "community-name" }) - rootStore: QtObject { + rootStore: AppLayoutStores.RootStore { function communityHasMember(communityId, pubKey) { return false } @@ -119,7 +121,7 @@ SplitView { } } - contactsStore: QtObject { + contactsStore: ProfileStores.ContactsStore { readonly property ListModel myContactsModel: ListModel { Component.onCompleted: { for (let i = 0; i < 20; i++) { diff --git a/storybook/pages/LanguageViewPage.qml b/storybook/pages/LanguageViewPage.qml index d334b885bb..f7ddc9a70c 100644 --- a/storybook/pages/LanguageViewPage.qml +++ b/storybook/pages/LanguageViewPage.qml @@ -2,6 +2,7 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 import QtQuick.Layouts 1.14 +import AppLayouts.stores 1.0 as AppLayoutStores import AppLayouts.Profile.views 1.0 import AppLayouts.Profile.stores 1.0 @@ -10,6 +11,8 @@ import Storybook 1.0 import utils 1.0 import mainui 1.0 +import shared.stores 1.0 + SplitView { id: root @@ -17,8 +20,8 @@ SplitView { Popups { popupParent: root - rootStore: QtObject {} - communityTokensStore: QtObject {} + rootStore: AppLayoutStores.RootStore {} + communityTokensStore: CommunityTokensStore {} } SplitView { @@ -67,7 +70,7 @@ SplitView { } } - currencyStore: QtObject { + currencyStore: CurrenciesStore { property string currentCurrency: "USD" property string currentCurrencySymbol: "$" diff --git a/storybook/pages/MembersSelectorPage.qml b/storybook/pages/MembersSelectorPage.qml index 76b0583f8c..113181fcd6 100644 --- a/storybook/pages/MembersSelectorPage.qml +++ b/storybook/pages/MembersSelectorPage.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 2.14 import QtQuick.Layouts 1.14 import AppLayouts.Chat.views 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores import Storybook 1.0 import utils 1.0 @@ -63,7 +64,7 @@ SplitView { } } - QtObject { + ChatStores.RootStore { id: rootStoreMock readonly property var contactsModel: ListModel { diff --git a/storybook/pages/OverviewSettingsPanelPage.qml b/storybook/pages/OverviewSettingsPanelPage.qml index 7ee23018ff..be0269cc68 100644 --- a/storybook/pages/OverviewSettingsPanelPage.qml +++ b/storybook/pages/OverviewSettingsPanelPage.qml @@ -3,16 +3,19 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 import mainui 1.0 +import AppLayouts.stores 1.0 as AppLayoutStores import AppLayouts.Communities.panels 1.0 +import shared.stores 1.0 + SplitView { id: root SplitView.fillWidth: true Popups { popupParent: root - rootStore: QtObject {} - communityTokensStore: QtObject {} + rootStore: AppLayoutStores.RootStore {} + communityTokensStore: CommunityTokensStore {} } OverviewSettingsPanel { diff --git a/storybook/pages/ProfileDialogViewPage.qml b/storybook/pages/ProfileDialogViewPage.qml index 71e24c1427..431f53fae1 100644 --- a/storybook/pages/ProfileDialogViewPage.qml +++ b/storybook/pages/ProfileDialogViewPage.qml @@ -10,6 +10,8 @@ import mainui 1.0 import StatusQ 0.1 import StatusQ.Core.Utils 0.1 as StatusQUtils +import AppLayouts.stores 1.0 as AppLayoutStores +import AppLayouts.Profile.stores 1.0 as ProfileStores import AppLayouts.Wallet.stores 1.0 import Storybook 1.0 @@ -174,7 +176,7 @@ SplitView { Popups { popupParent: root - rootStore: QtObject { + rootStore: AppLayoutStores.RootStore { property var contactStore: QtObject { property var contactsModule: null @@ -352,7 +354,7 @@ SplitView { assetsModel: AssetsModel {} collectiblesModel: CollectiblesModel {} - profileStore: QtObject { + profileStore: ProfileStores.ProfileStore { readonly property string pubkey: "0xdeadbeef" readonly property string ensName: name.text @@ -364,7 +366,7 @@ SplitView { } } - contactsStore: QtObject { + contactsStore: ProfileStores.ContactsStore { readonly property string myPublicKey: "0xdeadbeef" function joinPrivateChat(publicKey) { diff --git a/storybook/pages/ProfilePopupInviteFriendsPanelPage.qml b/storybook/pages/ProfilePopupInviteFriendsPanelPage.qml index 195dceaea1..657a169150 100644 --- a/storybook/pages/ProfilePopupInviteFriendsPanelPage.qml +++ b/storybook/pages/ProfilePopupInviteFriendsPanelPage.qml @@ -1,7 +1,10 @@ -import QtQuick 2.14 -import QtQuick.Controls 2.14 +import QtQuick 2.15 +import QtQuick.Controls 2.15 import AppLayouts.Communities.panels 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores +import AppLayouts.stores 1.0 as AppLayoutStores + import utils 1.0 Item { @@ -56,13 +59,13 @@ Item { community: ({ id: "communityId" }) - rootStore: QtObject { + rootStore: AppLayoutStores.RootStore { function communityHasMember(communityId, pubKey) { return false } } - contactsStore: QtObject { + contactsStore: ProfileStores.ContactsStore { readonly property ListModel myContactsModel: ListModel { Component.onCompleted: { const keys = [] diff --git a/storybook/pages/ProfilePopupInviteMessagePanelPage.qml b/storybook/pages/ProfilePopupInviteMessagePanelPage.qml index 2efab72510..cb9a527168 100644 --- a/storybook/pages/ProfilePopupInviteMessagePanelPage.qml +++ b/storybook/pages/ProfilePopupInviteMessagePanelPage.qml @@ -2,6 +2,8 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 import AppLayouts.Communities.panels 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores + import utils 1.0 Item { @@ -63,7 +65,7 @@ Item { sourceComponent: ProfilePopupInviteMessagePanel { id: panel - contactsStore: QtObject { + contactsStore: ProfileStores.ContactsStore { readonly property ListModel myContactsModel: ListModel { Component.onCompleted: { const keys = [] diff --git a/storybook/pages/ProfileSocialLinksPanelPage.qml b/storybook/pages/ProfileSocialLinksPanelPage.qml index 9932ab3f9e..204d692b9f 100644 --- a/storybook/pages/ProfileSocialLinksPanelPage.qml +++ b/storybook/pages/ProfileSocialLinksPanelPage.qml @@ -5,6 +5,7 @@ import StatusQ.Core 0.1 import StatusQ.Core.Utils 0.1 as CoreUtils import mainui 1.0 +import AppLayouts.stores 1.0 as AppLayoutStores import AppLayouts.Profile.panels 1.0 import shared.stores 1.0 @@ -21,7 +22,7 @@ SplitView { Popups { popupParent: root - rootStore: QtObject {} + rootStore: AppLayoutStores.RootStore {} communityTokensStore: CommunityTokensStore {} } diff --git a/storybook/pages/ReceiveModalPage.qml b/storybook/pages/ReceiveModalPage.qml index 9da6d5f568..7dc08a7b49 100644 --- a/storybook/pages/ReceiveModalPage.qml +++ b/storybook/pages/ReceiveModalPage.qml @@ -9,6 +9,7 @@ import StatusQ.Core.Utils 0.1 import Storybook 1.0 import Models 1.0 import AppLayouts.Wallet.popups 1.0 +import AppLayouts.Wallet.stores 1.0 as WalletStores SplitView { orientation: Qt.Horizontal @@ -59,7 +60,7 @@ SplitView { property string networksNames: "oeth:arb1:eth:" - store: QtObject { + store: WalletStores.RootStore { property var filteredFlatModel: SortFilterProxyModel { sourceModel: NetworksModel.flatNetworks filters: ValueFilter { roleName: "isTest"; value: false } diff --git a/storybook/pages/StatusChatInputPage.qml b/storybook/pages/StatusChatInputPage.qml index 204f05b9d3..533536f9d9 100644 --- a/storybook/pages/StatusChatInputPage.qml +++ b/storybook/pages/StatusChatInputPage.qml @@ -11,6 +11,8 @@ import shared.stores 1.0 import StatusQ.Core.Utils 0.1 +import AppLayouts.Chat.stores 1.0 as ChatStores + SplitView { id: root @@ -129,7 +131,7 @@ SplitView { d.loadLinkPreviews(unformattedText) } } - usersStore: QtObject { + usersStore: ChatStores.UsersStore { readonly property var usersModel: fakeUsersModel } onSendMessage: { diff --git a/storybook/pages/SyncingEnterCodePage.qml b/storybook/pages/SyncingEnterCodePage.qml index f68b299aaf..7d0c8004d4 100644 --- a/storybook/pages/SyncingEnterCodePage.qml +++ b/storybook/pages/SyncingEnterCodePage.qml @@ -8,6 +8,8 @@ import mainui 1.0 import shared.views 1.0 import shared.stores 1.0 +import AppLayouts.stores 1.0 as AppLayoutStores + SplitView { id: root orientation: Qt.Vertical @@ -16,7 +18,7 @@ SplitView { Popups { popupParent: root - rootStore: QtObject {} + rootStore: AppLayoutStores.RootStore {} communityTokensStore: CommunityTokensStore {} } diff --git a/storybook/pages/SyncingViewPage.qml b/storybook/pages/SyncingViewPage.qml index 03ea9c7b01..8dddfe5932 100644 --- a/storybook/pages/SyncingViewPage.qml +++ b/storybook/pages/SyncingViewPage.qml @@ -6,7 +6,10 @@ import Storybook 1.0 import mainui 1.0 import utils 1.0 + +import AppLayouts.stores 1.0 as AppLayoutStores import AppLayouts.Profile.views 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores import shared.stores 1.0 SplitView { @@ -17,7 +20,7 @@ SplitView { Popups { popupParent: root - rootStore: QtObject {} + rootStore: AppLayoutStores.RootStore {} communityTokensStore: CommunityTokensStore {} } @@ -30,11 +33,11 @@ SplitView { isProduction: ctrlIsProduction.checked - advancedStore: QtObject { + advancedStore: ProfileStores.AdvancedStore { readonly property bool isDebugEnabled: ctrlDebugEnabled.checked } - devicesStore: QtObject { + devicesStore: ProfileStores.DevicesStore { function generateConnectionStringAndRunSetupSyncingPopup() { logs.logEvent("devicesStore::generateConnectionStringAndRunSetupSyncingPopup()") } diff --git a/storybook/pages/TransactionDelegatePage.qml b/storybook/pages/TransactionDelegatePage.qml index bbb7ddd77b..12d6123a93 100644 --- a/storybook/pages/TransactionDelegatePage.qml +++ b/storybook/pages/TransactionDelegatePage.qml @@ -7,6 +7,9 @@ import Storybook 1.0 import utils 1.0 import shared.controls 1.0 +import shared.stores 1.0 as SharedStores + +import AppLayouts.Wallet.stores 1.0 as WalletStores import Models 1.0 @@ -73,7 +76,7 @@ SplitView { id: delegate Layout.fillWidth: true modelData: root.mockupModelData - rootStore: QtObject { + rootStore: SharedStores.RootStore { readonly property string currentCurrency: "EUR" function getFiatValue(cryptoValue, symbol) { @@ -86,7 +89,7 @@ SplitView { property var flatNetworks: NetworksModel.flatNetworks } - walletRootStore: QtObject { + walletRootStore: WalletStores.RootStore { function getNameForAddress(address) { return "NAMEFOR: %1".arg(address) } diff --git a/storybook/qmlTests/tests/tst_StatusChatInput.qml b/storybook/qmlTests/tests/tst_StatusChatInput.qml index 89f062d47e..9cfe4b087f 100644 --- a/storybook/qmlTests/tests/tst_StatusChatInput.qml +++ b/storybook/qmlTests/tests/tst_StatusChatInput.qml @@ -9,6 +9,8 @@ import utils 1.0 import shared.status 1.0 import shared.stores 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores + import TextUtils 1.0 Item { @@ -24,7 +26,7 @@ Item { width: parent.width height: implicitHeight anchors.bottom: parent.bottom - usersStore: QtObject { + usersStore: ChatStores.UsersStore { property var usersModel: ListModel {} } } diff --git a/storybook/stubs/AppLayouts/Chat/stores/MessageStore.qml b/storybook/stubs/AppLayouts/Chat/stores/MessageStore.qml new file mode 100644 index 0000000000..6d75698900 --- /dev/null +++ b/storybook/stubs/AppLayouts/Chat/stores/MessageStore.qml @@ -0,0 +1,5 @@ +import QtQuick 2.15 + +QtObject { + +} \ No newline at end of file diff --git a/storybook/stubs/AppLayouts/Chat/stores/UsersStore.qml b/storybook/stubs/AppLayouts/Chat/stores/UsersStore.qml new file mode 100644 index 0000000000..6d75698900 --- /dev/null +++ b/storybook/stubs/AppLayouts/Chat/stores/UsersStore.qml @@ -0,0 +1,5 @@ +import QtQuick 2.15 + +QtObject { + +} \ No newline at end of file diff --git a/storybook/stubs/AppLayouts/Chat/stores/qmldir b/storybook/stubs/AppLayouts/Chat/stores/qmldir index 881c77968a..e896443de6 100644 --- a/storybook/stubs/AppLayouts/Chat/stores/qmldir +++ b/storybook/stubs/AppLayouts/Chat/stores/qmldir @@ -1,2 +1,4 @@ RootStore 1.0 RootStore.qml StickersStore 1.0 StickersStore.qml +MessageStore 1.0 MessageStore.qml +UsersStore 1.0 UsersStore.qml diff --git a/storybook/stubs/AppLayouts/Profile/stores/AdvancedStore.qml b/storybook/stubs/AppLayouts/Profile/stores/AdvancedStore.qml new file mode 100644 index 0000000000..52d5a7a7f7 --- /dev/null +++ b/storybook/stubs/AppLayouts/Profile/stores/AdvancedStore.qml @@ -0,0 +1,4 @@ +import QtQuick 2.15 + +QtObject { +} diff --git a/storybook/stubs/AppLayouts/Profile/stores/DevicesStore.qml b/storybook/stubs/AppLayouts/Profile/stores/DevicesStore.qml new file mode 100644 index 0000000000..2074b535ed --- /dev/null +++ b/storybook/stubs/AppLayouts/Profile/stores/DevicesStore.qml @@ -0,0 +1,5 @@ +import QtQuick 2.15 + +QtObject { + +} diff --git a/storybook/stubs/AppLayouts/Profile/stores/PrivacyStore.qml b/storybook/stubs/AppLayouts/Profile/stores/PrivacyStore.qml new file mode 100644 index 0000000000..dcece8a991 --- /dev/null +++ b/storybook/stubs/AppLayouts/Profile/stores/PrivacyStore.qml @@ -0,0 +1,28 @@ +import QtQuick 2.15 + +QtObject { + property QtObject privacyModule: QtObject { + signal passwordChanged(success: bool, errorMsg: string) + signal storeToKeychainError(errorDescription: string) + signal storeToKeychainSuccess() + } + + function tryStoreToKeyChain(errorDescription) { + if (generateMacKeyChainStoreError.checked) { + privacyModule.storeToKeychainError(errorDescription) + } else { + passwordView.localAccountSettings.storeToKeychainValue = Constants.keychain.storedValue.store + privacyModule.storeToKeychainSuccess() + privacyModule.passwordChanged(true, "") + } + } + + function tryRemoveFromKeyChain() { + if (generateMacKeyChainStoreError.checked) { + privacyModule.storeToKeychainError("Error removing from keychain") + } else { + passwordView.localAccountSettings.storeToKeychainValue = Constants.keychain.storedValue.notNow + privacyModule.storeToKeychainSuccess() + } + } +} diff --git a/storybook/stubs/AppLayouts/Profile/stores/qmldir b/storybook/stubs/AppLayouts/Profile/stores/qmldir index be7dded159..9ea56701bc 100644 --- a/storybook/stubs/AppLayouts/Profile/stores/qmldir +++ b/storybook/stubs/AppLayouts/Profile/stores/qmldir @@ -1,5 +1,8 @@ LanguageStore 1.0 LanguageStore.qml ProfileSectionStore 1.0 ProfileSectionStore.qml WalletStore 1.0 WalletStore.qml +DevicesStore 1.0 DevicesStore.qml ContactsStore 1.0 ContactsStore.qml +PrivacyStore 1.0 PrivacyStore.qml ProfileStore 1.0 ProfileStore.qml +AdvancedStore 1.0 AdvancedStore.qml diff --git a/storybook/stubs/AppLayouts/Wallet/stores/RootStore.qml b/storybook/stubs/AppLayouts/Wallet/stores/RootStore.qml new file mode 100644 index 0000000000..6d75698900 --- /dev/null +++ b/storybook/stubs/AppLayouts/Wallet/stores/RootStore.qml @@ -0,0 +1,5 @@ +import QtQuick 2.15 + +QtObject { + +} \ No newline at end of file diff --git a/storybook/stubs/AppLayouts/Wallet/stores/qmldir b/storybook/stubs/AppLayouts/Wallet/stores/qmldir index 9be18ea7ec..675ffd3a0f 100644 --- a/storybook/stubs/AppLayouts/Wallet/stores/qmldir +++ b/storybook/stubs/AppLayouts/Wallet/stores/qmldir @@ -3,3 +3,4 @@ WalletAssetsStore 1.0 WalletAssetsStore.qml TokensStore 1.0 TokensStore.qml ActivityFiltersStore 1.0 ActivityFiltersStore.qml SwapStore 1.0 SwapStore.qml +RootStore 1.0 RootStore.qml diff --git a/storybook/stubs/AppLayouts/stores/RootStore.qml b/storybook/stubs/AppLayouts/stores/RootStore.qml new file mode 100644 index 0000000000..52d5a7a7f7 --- /dev/null +++ b/storybook/stubs/AppLayouts/stores/RootStore.qml @@ -0,0 +1,4 @@ +import QtQuick 2.15 + +QtObject { +} diff --git a/storybook/stubs/AppLayouts/stores/qmldir b/storybook/stubs/AppLayouts/stores/qmldir new file mode 100644 index 0000000000..a68f6e3bc9 --- /dev/null +++ b/storybook/stubs/AppLayouts/stores/qmldir @@ -0,0 +1,2 @@ +RootStore 1.0 RootStore.qml +CloneModel 1.0 ../../../../ui/app/AppLayouts/stores/CloneModel.qml diff --git a/storybook/stubs/shared/stores/PermissionsStore.qml b/storybook/stubs/shared/stores/PermissionsStore.qml new file mode 100644 index 0000000000..6d75698900 --- /dev/null +++ b/storybook/stubs/shared/stores/PermissionsStore.qml @@ -0,0 +1,5 @@ +import QtQuick 2.15 + +QtObject { + +} \ No newline at end of file diff --git a/storybook/stubs/shared/stores/RootStore.qml b/storybook/stubs/shared/stores/RootStore.qml index 2acd669d32..b9304fd093 100644 --- a/storybook/stubs/shared/stores/RootStore.qml +++ b/storybook/stubs/shared/stores/RootStore.qml @@ -1,6 +1,4 @@ -pragma Singleton - -import QtQuick 2.14 +import QtQuick 2.15 QtObject { property var userProfileInst diff --git a/storybook/stubs/shared/stores/TokenMarketValuesStore.qml b/storybook/stubs/shared/stores/TokenMarketValuesStore.qml new file mode 100644 index 0000000000..52d5a7a7f7 --- /dev/null +++ b/storybook/stubs/shared/stores/TokenMarketValuesStore.qml @@ -0,0 +1,4 @@ +import QtQuick 2.15 + +QtObject { +} diff --git a/storybook/stubs/shared/stores/qmldir b/storybook/stubs/shared/stores/qmldir index 78051a2dbd..682f93f57a 100644 --- a/storybook/stubs/shared/stores/qmldir +++ b/storybook/stubs/shared/stores/qmldir @@ -1,8 +1,10 @@ CommunityTokensStore 1.0 CommunityTokensStore.qml CurrenciesStore 1.0 CurrenciesStore.qml NetworkConnectionStore 1.0 NetworkConnectionStore.qml -singleton RootStore 1.0 RootStore.qml +RootStore 1.0 RootStore.qml TokenBalanceHistoryStore 1.0 TokenBalanceHistoryStore.qml BIP39_en 1.0 BIP39_en.qml DAppsStore 1.0 DAppsStore.qml ProfileStore 1.0 ProfileStore.qml +PermissionsStore 1.0 PermissionsStore.qml +TokenMarketValuesStore 1.0 TokenMarketValuesStore.qml diff --git a/ui/app/AppLayouts/Browser/BrowserLayout.qml b/ui/app/AppLayouts/Browser/BrowserLayout.qml index 2180db3850..99ace92154 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 2b9a8b23b2..1babccfce6 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() @@ -210,7 +212,7 @@ Dialog { // integration but the old version was not working properly neither. //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 6c76005155..0f79e1abde 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 5fbed89424..adbbc887f9 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 AppLayouts.Chat.stores 1.0 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 f14f9c99af..c53f4636ab 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 AppLayouts.Chat.stores 1.0 + 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 503f25e341..0311580b57 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 bd91dc697b..9dc51025b8 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 358fb35fde..75b55826bb 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 ecea602f8d..875f29b2fb 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 ef5bdc62e3..a17bd6394d 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 + 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 b158747736..286e186d80 100644 --- a/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatMessagesView.qml @@ -18,6 +18,9 @@ import shared.status 1.0 import shared.controls 1.0 import shared.views.chat 1.0 +import AppLayouts.Chat.stores 1.0 +import AppLayouts.Profile.stores 1.0 + import "../controls" import "../panels" @@ -25,10 +28,10 @@ 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 a24961dc4c..eab73e7291 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.panels 1.0 -import AppLayouts.Communities.views 1.0 + 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.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 72378145ac..8f91f1d4c4 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 AppLayouts.Chat.stores 1.0 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 c8f298f858..9619fa2667 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 75729dcd65..cba6bd50aa 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 5e41cdcaa6..b2979c8fb2 100644 --- a/ui/app/AppLayouts/Chat/views/private/MembersSelectorBase.qml +++ b/ui/app/AppLayouts/Chat/views/private/MembersSelectorBase.qml @@ -10,6 +10,8 @@ import StatusQ.Components 0.1 import "../../panels" +import AppLayouts.Chat.stores 1.0 as ChatStores + import utils 1.0 import shared.controls.delegates 1.0 @@ -18,7 +20,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 269cf5609b..ba10718d85 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 aeb931521c..207d1c71be 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 a462b63f9d..3361322b4b 100644 --- a/ui/app/AppLayouts/Communities/panels/MembersTabPanel.qml +++ b/ui/app/AppLayouts/Communities/panels/MembersTabPanel.qml @@ -14,6 +14,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 import SortFilterProxyModel 0.2 @@ -23,7 +24,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 492d54baaf..0a4284ee69 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 28369dc924..694282038d 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 3c2eb4534d..59f8d74716 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 3a38d8ea92..637ce720e4 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 77ccb3fd4f..31539c9eba 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 af7bedded6..eb2d9b09ab 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 bff0d6d623..d4bdf610eb 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 4f7d3eff2f..381b746c8d 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 b3015b47d0..a12a7a0a76 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 43d920ad83..fee3ce8394 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 4e777161b8..02d6d6e7cd 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 2aa15bc235..e472afcc50 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 b94c7d3558..ff3fd6c8a3 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 69a5229d71..cd367f50eb 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 1d858f9922..8679d82be9 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 e855a0d5bc..b7afbf13e5 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 56690ee960..e4f32c50ca 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 3e8705d510..5b65129b59 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 27fd8c58fc..a1a90e7fae 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 25c1b8ddfc..0187f7954e 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 ea0901cd29..47daa4dd76 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 641ffaf8ee..9448b93864 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 a869497b2f..5a732bab76 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 87fc02897c..28e42a391f 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 197754fc4c..052f576714 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 4569fe5bf7..3f6fc35246 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 8463b6ab53..8c0c17ff4a 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 c462eeb8aa..a53869e247 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 f221c1751d..c3f111be5d 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 5a8f2cebe6..a0b22ebaa0 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 da6eefc204..5018586391 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 2e3d756122..07e9fa8519 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 017c64b5fd..d61a283d91 100644 --- a/ui/app/AppLayouts/Profile/stores/qmldir +++ b/ui/app/AppLayouts/Profile/stores/qmldir @@ -6,3 +6,7 @@ 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 074aa663fe..2be7127d11 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 789217b538..423d665323 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 dd39909261..294e26a165 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 2eb3723ce5..853fa8eca2 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 AppLayouts.Profile.stores 1.0 + 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 98f65cf6ad..d766dfe95e 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 e14052791d..bfe19b8d16 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 AppLayouts.Profile.stores 1.0 + 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 c487f9dafb..a51f0c9042 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 03ca979de8..08931d317a 100644 --- a/ui/app/AppLayouts/Profile/views/EnsView.qml +++ b/ui/app/AppLayouts/Profile/views/EnsView.qml @@ -5,6 +5,7 @@ import QtQml.StateMachine 1.14 as DSM import utils 1.0 import shared 1.0 +import shared.stores 1.0 as SharedStores import shared.stores.send 1.0 import AppLayouts.Wallet.stores 1.0 @@ -17,8 +18,8 @@ Item { property EnsUsernamesStore ensUsernamesStore property WalletAssetsStore walletAssetsStore - property var contactsStore - property var networkConnectionStore + property ContactsStore contactsStore + property SharedStores.NetworkConnectionStore networkConnectionStore required property TransactionStore transactionStore property int profileContentWidth diff --git a/ui/app/AppLayouts/Profile/views/LanguageView.qml b/ui/app/AppLayouts/Profile/views/LanguageView.qml index 31c0064b2a..ae9fa6b727 100644 --- a/ui/app/AppLayouts/Profile/views/LanguageView.qml +++ b/ui/app/AppLayouts/Profile/views/LanguageView.qml @@ -5,6 +5,7 @@ import QtQuick.Layouts 1.15 import utils 1.0 import shared.panels 1.0 import shared.popups 1.0 +import shared.stores 1.0 as SharedStores import StatusQ 0.1 import StatusQ.Core 0.1 @@ -23,7 +24,7 @@ SettingsContentBase { id: root property LanguageStore languageStore - property var currencyStore + property SharedStores.CurrenciesStore currencyStore property bool languageSelectionEnabled objectName: "languageView" diff --git a/ui/app/AppLayouts/Profile/views/LeftTabView.qml b/ui/app/AppLayouts/Profile/views/LeftTabView.qml index 53076ea340..82c0b2b652 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 AppLayouts.Profile.stores 1.0 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 6a2449fd39..66ff68c041 100644 --- a/ui/app/AppLayouts/Profile/views/SyncingView.qml +++ b/ui/app/AppLayouts/Profile/views/SyncingView.qml @@ -20,7 +20,7 @@ import shared.controls.chat 1.0 import SortFilterProxyModel 0.2 -import "../stores" +import AppLayouts.Profile.stores 1.0 as ProfileStores import "../popups" import "../controls" import "../../stores" @@ -28,10 +28,10 @@ import "../../stores" SettingsContentBase { id: root - property var devicesStore - property ProfileStore profileStore - property PrivacyStore privacyStore - property var advancedStore + property ProfileStores.DevicesStore devicesStore + property ProfileStores.ProfileStore profileStore + property ProfileStores.PrivacyStore privacyStore + property ProfileStores.AdvancedStore advancedStore required property bool isProduction diff --git a/ui/app/AppLayouts/Profile/views/WalletView.qml b/ui/app/AppLayouts/Profile/views/WalletView.qml index 711fa26329..934d04da19 100644 --- a/ui/app/AppLayouts/Profile/views/WalletView.qml +++ b/ui/app/AppLayouts/Profile/views/WalletView.qml @@ -15,6 +15,7 @@ import shared.panels 1.0 import shared.popups 1.0 import shared.popups.keypairimport 1.0 import shared.status 1.0 +import shared.stores 1.0 as SharedStores import "../stores" import "../controls" @@ -31,9 +32,9 @@ SettingsContentBase { property var emojiPopup property ProfileSectionStore rootStore - property var walletStore: rootStore.walletStore + property WalletStore walletStore: rootStore.walletStore required property TokensStore tokensStore - property var networkConnectionStore + property SharedStores.NetworkConnectionStore networkConnectionStore required property WalletAssetsStore assetsStore required property CollectiblesStore collectiblesStore diff --git a/ui/app/AppLayouts/Profile/views/wallet/AccountView.qml b/ui/app/AppLayouts/Profile/views/wallet/AccountView.qml index f04c4a0211..ce5166e1e9 100644 --- a/ui/app/AppLayouts/Profile/views/wallet/AccountView.qml +++ b/ui/app/AppLayouts/Profile/views/wallet/AccountView.qml @@ -10,6 +10,7 @@ import StatusQ.Core.Utils 0.1 as StatusQUtils import AppLayouts.Wallet 1.0 import AppLayouts.Wallet.controls 1.0 import AppLayouts.Profile.popups 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores import shared.controls 1.0 import shared.popups 1.0 @@ -33,7 +34,7 @@ ColumnLayout { property var account property var keyPair - property var walletStore + property ProfileStores.WalletStore walletStore property var emojiPopup property string userProfilePublicKey diff --git a/ui/app/AppLayouts/Profile/views/wallet/SavedAddressesView.qml b/ui/app/AppLayouts/Profile/views/wallet/SavedAddressesView.qml index 0575891d96..624eadff31 100644 --- a/ui/app/AppLayouts/Profile/views/wallet/SavedAddressesView.qml +++ b/ui/app/AppLayouts/Profile/views/wallet/SavedAddressesView.qml @@ -3,13 +3,15 @@ import QtQuick.Layouts 1.15 import AppLayouts.Wallet.views 1.0 +import shared.stores 1.0 as SharedStores + import "../../stores" ColumnLayout { id: root property ContactsStore contactsStore - property var networkConnectionStore + property SharedStores.NetworkConnectionStore networkConnectionStore property var sendModal SavedAddresses { diff --git a/ui/app/AppLayouts/Wallet/WalletLayout.qml b/ui/app/AppLayouts/Wallet/WalletLayout.qml index 8972f199bb..a10aeeaa54 100644 --- a/ui/app/AppLayouts/Wallet/WalletLayout.qml +++ b/ui/app/AppLayouts/Wallet/WalletLayout.qml @@ -8,6 +8,11 @@ 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 AppLayouts.stores 1.0 as AppLayoutsStores +import AppLayouts.Communities.stores 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores import "popups" import "panels" @@ -20,12 +25,12 @@ Item { id: root property bool hideSignPhraseModal: false - property var store - property var contactsStore - property var communitiesStore + property AppLayoutsStores.RootStore store + property ProfileStores.ContactsStore contactsStore + property CommunitiesStore 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 9bdd8a3042..956bd55579 100644 --- a/ui/app/AppLayouts/Wallet/controls/SavedAddressesDelegate.qml +++ b/ui/app/AppLayouts/Wallet/controls/SavedAddressesDelegate.qml @@ -8,7 +8,9 @@ import StatusQ.Components 0.1 import StatusQ.Core 0.1 import StatusQ.Core.Theme 0.1 import StatusQ.Popups 0.1 + import shared.controls 1.0 +import shared.stores 1.0 as SharedStores import "../popups" import "../controls" @@ -18,9 +20,7 @@ import ".." StatusListItem { id: root - property var store - property var contactsStore - property var networkConnectionStore + property SharedStores.NetworkConnectionStore networkConnectionStore property string name property string address property string ens @@ -178,7 +178,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 c3f646884d..e7f324b660 100644 --- a/ui/app/AppLayouts/Wallet/panels/ActivityFilterPanel.qml +++ b/ui/app/AppLayouts/Wallet/panels/ActivityFilterPanel.qml @@ -11,12 +11,13 @@ import shared.panels 1.0 import "../controls" import "../popups" +import "../stores" as WalletStores Column { id: root property var activityFilterStore - property var store + property WalletStores.RootStore store property bool isLoading: false property bool hideNoResults: false diff --git a/ui/app/AppLayouts/Wallet/panels/WalletFooter.qml b/ui/app/AppLayouts/Wallet/panels/WalletFooter.qml index bfdbb0c721..b6e9036695 100644 --- a/ui/app/AppLayouts/Wallet/panels/WalletFooter.qml +++ b/ui/app/AppLayouts/Wallet/panels/WalletFooter.qml @@ -8,6 +8,9 @@ import StatusQ.Core.Theme 0.1 import utils 1.0 import shared.controls 1.0 +import shared.stores 1.0 as SharedStores + +import AppLayouts.Wallet.stores 1.0 as WalletStores import "../controls" import "../popups" @@ -15,8 +18,8 @@ import "../popups" Rectangle { id: root - property var walletStore - property var networkConnectionStore + property WalletStores.RootStore walletStore + property SharedStores.NetworkConnectionStore networkConnectionStore // Community-token related properties: required property bool isCommunityOwnershipTransfer diff --git a/ui/app/AppLayouts/Wallet/panels/WalletHeader.qml b/ui/app/AppLayouts/Wallet/panels/WalletHeader.qml index 7e1055db32..0f27382842 100644 --- a/ui/app/AppLayouts/Wallet/panels/WalletHeader.qml +++ b/ui/app/AppLayouts/Wallet/panels/WalletHeader.qml @@ -11,6 +11,10 @@ import StatusQ.Popups 0.1 import SortFilterProxyModel 0.2 +import shared.stores 1.0 + +import AppLayouts.Wallet.stores 1.0 as WalletStores + import utils 1.0 import "../controls" @@ -18,10 +22,9 @@ import "../controls" Item { id: root - property var networkConnectionStore + property NetworkConnectionStore networkConnectionStore property var overview - property var store - property var walletStore + property WalletStores.RootStore walletStore property alias headerButton: headerButton property alias networkFilter: networkFilter @@ -123,8 +126,8 @@ Item { Layout.alignment: Qt.AlignTop - flatNetworks: walletStore.filteredFlatModel - onToggleNetwork: walletStore.toggleNetwork(chainId) + flatNetworks: root.walletStore.filteredFlatModel + onToggleNetwork: root.walletStore.toggleNetwork(chainId) Binding on selection { value: chainIdsAggregator.value diff --git a/ui/app/AppLayouts/Wallet/popups/ActivityFilterMenu.qml b/ui/app/AppLayouts/Wallet/popups/ActivityFilterMenu.qml index dd0bbbf41a..9ada727289 100644 --- a/ui/app/AppLayouts/Wallet/popups/ActivityFilterMenu.qml +++ b/ui/app/AppLayouts/Wallet/popups/ActivityFilterMenu.qml @@ -5,10 +5,12 @@ import StatusQ.Popups 0.1 import "../controls" import "./filterSubMenus" +import AppLayouts.Wallet.stores 1.0 as WalletStores + StatusMenu { id: root - property var store + property WalletStores.RootStore store // Time filter property int selectedTime: ActivityFilterMenu.All diff --git a/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml b/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml index 16a3b73115..6e2455dd45 100644 --- a/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml +++ b/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml @@ -22,7 +22,7 @@ import SortFilterProxyModel 0.2 import AppLayouts.stores 1.0 -import "../stores" +import AppLayouts.Wallet.stores 1.0 as WalletStores import "../controls" import ".." @@ -35,7 +35,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 @@ -139,7 +139,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) { @@ -156,7 +156,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) { @@ -272,7 +272,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() } } @@ -390,7 +390,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 8911b4b17f..cca6742a4c 100644 --- a/ui/app/AppLayouts/Wallet/popups/ReceiveModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/ReceiveModal.qml @@ -23,7 +23,7 @@ import AppLayouts.Wallet 1.0 import AppLayouts.Wallet.controls 1.0 import ".." -import "../stores" +import AppLayouts.Wallet.stores 1.0 as WalletStores StatusModal { id: root @@ -34,12 +34,12 @@ StatusModal { property bool switchingAccounsEnabled: true property bool changingPreferredChainsEnabled: true - property string qrImageSource: store.getQrCode(d.visibleAddress) + property string qrImageSource: root.store.getQrCode(d.visibleAddress) property var getNetworkShortNames: function(chainIDsString) { - return store.getNetworkShortNames(chainIDsString) + return root.store.getNetworkShortNames(chainIDsString) } - property var store: RootStore + property WalletStores.RootStore store: WalletStores.RootStore signal updateSelectedAddress(string address) signal updatePreferredChains(string address, string preferredChains) @@ -149,7 +149,7 @@ StatusModal { } onOpened: { - store.addressWasShown(root.selectedAccount.address) + root.store.addressWasShown(root.selectedAccount.address) } QtObject { diff --git a/ui/app/AppLayouts/Wallet/popups/SavedAddressActivityPopup.qml b/ui/app/AppLayouts/Wallet/popups/SavedAddressActivityPopup.qml index 0eda33cc2b..efe1422468 100644 --- a/ui/app/AppLayouts/Wallet/popups/SavedAddressActivityPopup.qml +++ b/ui/app/AppLayouts/Wallet/popups/SavedAddressActivityPopup.qml @@ -8,10 +8,12 @@ import StatusQ.Controls 0.1 import StatusQ.Popups 0.1 import AppLayouts.stores 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores import AppLayouts.Wallet.stores 1.0 as WalletStore import utils 1.0 import shared.views 1.0 +import shared.stores 1.0 as SharedStores import "../controls" import ".." @@ -19,8 +21,8 @@ import ".." StatusModal { id: root - property var networkConnectionStore - property var contactsStore + property SharedStores.NetworkConnectionStore networkConnectionStore + property ProfileStores.ContactsStore contactsStore property var sendModalPopup closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside @@ -145,8 +147,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/TransactionAddressMenu.qml b/ui/app/AppLayouts/Wallet/popups/TransactionAddressMenu.qml index 2ac8a2bfbd..725a532083 100644 --- a/ui/app/AppLayouts/Wallet/popups/TransactionAddressMenu.qml +++ b/ui/app/AppLayouts/Wallet/popups/TransactionAddressMenu.qml @@ -15,6 +15,8 @@ import shared.stores 1.0 import "../stores" as WalletStores +import AppLayouts.Profile.stores 1.0 as ProfileStores + //////////////////////////////////////////////////////////////////////////////// // NOTE: // @@ -30,8 +32,8 @@ import "../stores" as WalletStores StatusMenu { id: root - property var contactsStore - property var networkConnectionStore + property ProfileStores.ContactsStore contactsStore + property NetworkConnectionStore networkConnectionStore property bool areTestNetworksEnabled: false property bool isGoerliEnabled: false diff --git a/ui/app/AppLayouts/Wallet/popups/filterSubMenus/ActivityCounterpartyFilterSubMenu.qml b/ui/app/AppLayouts/Wallet/popups/filterSubMenus/ActivityCounterpartyFilterSubMenu.qml index bdd4cd6c3b..16d7e0820b 100644 --- a/ui/app/AppLayouts/Wallet/popups/filterSubMenus/ActivityCounterpartyFilterSubMenu.qml +++ b/ui/app/AppLayouts/Wallet/popups/filterSubMenus/ActivityCounterpartyFilterSubMenu.qml @@ -15,12 +15,13 @@ import SortFilterProxyModel 0.2 import utils 1.0 import "../../../Wallet" +import "../../../Wallet/stores" as WalletStores import "../../controls" StatusMenu { id: root - property var store + property WalletStores.RootStore store property var recentsList property bool loadingRecipients: false @@ -143,14 +144,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) || root.store.getNameForAddress(address).toLowerCase().indexOf(searchValue) !== -1 } } } reuseItems: true delegate: ActivityTypeCheckBox { - readonly property string name: store.getNameForAddress(model.address) + readonly property string name: root.store.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/stores/RootStore.qml b/ui/app/AppLayouts/Wallet/stores/RootStore.qml index f89c2744e1..824a4ae2d5 100644 --- a/ui/app/AppLayouts/Wallet/stores/RootStore.qml +++ b/ui/app/AppLayouts/Wallet/stores/RootStore.qml @@ -3,7 +3,7 @@ pragma Singleton import QtQuick 2.13 // Aliasing not to conflict with the shared.stores.RootStore -import shared.stores 1.0 as Stores +import shared.stores 1.0 as SharedStores import utils 1.0 @@ -284,7 +284,7 @@ QtObject { isTest: false, } - const jsonObj = root.walletSectionSavedAddressesInst.getSavedAddressAsJson(address) + const jsonObj = walletSectionSavedAddresses.getSavedAddressAsJson(address) try { return JSON.parse(jsonObj) @@ -445,7 +445,7 @@ QtObject { walletSectionAccounts.updateWatchAccountHiddenFromTotalBalance(address, hideFromTotalBalance) } - property Stores.CurrenciesStore currencyStore: Stores.CurrenciesStore {} + property SharedStores.CurrenciesStore currencyStore: SharedStores.CurrenciesStore {} function addressWasShown(address) { return d.mainModuleInst.addressWasShown(address) diff --git a/ui/app/AppLayouts/Wallet/views/AssetsDetailView.qml b/ui/app/AppLayouts/Wallet/views/AssetsDetailView.qml index bed55cd37d..0dc68744a6 100644 --- a/ui/app/AppLayouts/Wallet/views/AssetsDetailView.qml +++ b/ui/app/AppLayouts/Wallet/views/AssetsDetailView.qml @@ -26,8 +26,8 @@ Item { id: root property var token: ({}) - property var currencyStore - property var networkConnectionStore + property CurrenciesStore currencyStore + property NetworkConnectionStore networkConnectionStore property var allNetworksModel property var networkFilters /*required*/ property string address: "" @@ -35,7 +35,7 @@ Item { QtObject { id: d - property var marketValueStore : RootStore.marketValueStore + property TokenMarketValuesStore marketValueStore : RootStore.marketValueStore readonly property string symbol: !!root.token? root.token.symbol?? "" : "" property bool marketDetailsLoading: !!root.token? root.token.marketDetailsLoading?? false : false property bool tokenDetailsLoading: !!root.token? root.token.detailsLoading?? false: false @@ -130,7 +130,7 @@ Item { id: graphDetail property int selectedGraphType: AssetsDetailView.GraphType.Price - property var selectedStore: d.marketValueStore + property TokenMarketValuesStore selectedStore: d.marketValueStore function dataReady() { return typeof selectedStore != "undefined" diff --git a/ui/app/AppLayouts/Wallet/views/LeftTabView.qml b/ui/app/AppLayouts/Wallet/views/LeftTabView.qml index 1dfcf000d2..372564b8ef 100644 --- a/ui/app/AppLayouts/Wallet/views/LeftTabView.qml +++ b/ui/app/AppLayouts/Wallet/views/LeftTabView.qml @@ -27,7 +27,7 @@ Rectangle { id: root objectName: "walletLeftTab" - property var networkConnectionStore + property NetworkConnectionStore networkConnectionStore property var selectAllAccounts: function(){} property var changeSelectedAccount: function(){} property var selectSavedAddresses: function(){} diff --git a/ui/app/AppLayouts/Wallet/views/RightTabBaseView.qml b/ui/app/AppLayouts/Wallet/views/RightTabBaseView.qml index 98894876f5..397007fded 100644 --- a/ui/app/AppLayouts/Wallet/views/RightTabBaseView.qml +++ b/ui/app/AppLayouts/Wallet/views/RightTabBaseView.qml @@ -3,16 +3,21 @@ import QtQuick.Layouts 1.14 import StatusQ.Core 0.1 -import "../stores" +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 var store - property var contactsStore - property var communitiesStore - property var networkConnectionStore + property AppLayoutsStores.RootStore store + property ProfileStores.ContactsStore contactsStore + property CommunitiesStore communitiesStore + property NetworkConnectionStore networkConnectionStore property var sendModal @@ -29,9 +34,8 @@ FocusScope { WalletHeader { id: header Layout.fillWidth: true - overview: RootStore.overview - store: root.store - walletStore: RootStore + overview: WalletStores.RootStore.overview + walletStore: WalletStores.RootStore networkConnectionStore: root.networkConnectionStore } diff --git a/ui/app/AppLayouts/Wallet/views/SavedAddresses.qml b/ui/app/AppLayouts/Wallet/views/SavedAddresses.qml index 8b6ef97cc4..d1e39df054 100644 --- a/ui/app/AppLayouts/Wallet/views/SavedAddresses.qml +++ b/ui/app/AppLayouts/Wallet/views/SavedAddresses.qml @@ -11,6 +11,8 @@ import SortFilterProxyModel 0.2 import utils 1.0 import shared.controls 1.0 +import shared.stores 1.0 as SharedStores +import AppLayouts.Profile.stores 1.0 as ProfileStores import "../stores" import "../controls" @@ -19,8 +21,8 @@ ColumnLayout { id: root property var sendModal - property var contactsStore - property var networkConnectionStore + property ProfileStores.ContactsStore contactsStore + property SharedStores.NetworkConnectionStore networkConnectionStore QtObject { id: d @@ -147,8 +149,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/TransactionDetailView.qml b/ui/app/AppLayouts/Wallet/views/TransactionDetailView.qml index adc4d2bef4..aed732538b 100644 --- a/ui/app/AppLayouts/Wallet/views/TransactionDetailView.qml +++ b/ui/app/AppLayouts/Wallet/views/TransactionDetailView.qml @@ -17,6 +17,9 @@ import shared.stores 1.0 import utils 1.0 import shared.popups.send 1.0 +import AppLayouts.Communities.stores 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores + import "../controls" import "../popups" import "../stores" as WalletStores @@ -27,9 +30,9 @@ Item { id: root property var overview: WalletStores.RootStore.overview - property var contactsStore - property var communitiesStore - property var networkConnectionStore + property ProfileStores.ContactsStore contactsStore + property CommunitiesStore communitiesStore + property NetworkConnectionStore networkConnectionStore property var controller property var sendModal property bool showAllAccounts: false diff --git a/ui/app/AppLayouts/Wallet/views/collectibles/CollectibleDetailView.qml b/ui/app/AppLayouts/Wallet/views/collectibles/CollectibleDetailView.qml index 17608b4f25..5793ccecfe 100644 --- a/ui/app/AppLayouts/Wallet/views/collectibles/CollectibleDetailView.qml +++ b/ui/app/AppLayouts/Wallet/views/collectibles/CollectibleDetailView.qml @@ -10,13 +10,16 @@ import StatusQ.Controls 0.1 import StatusQ.Core.Utils 0.1 as StatusQUtils import AppLayouts.Communities.panels 1.0 +import AppLayouts.Communities.stores 1.0 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 AppLayouts.Wallet.stores 1.0 -import "../../stores" import "../../controls" Item { @@ -24,9 +27,9 @@ Item { signal launchTransactionDetail(string txID) - required property var rootStore - required property var walletRootStore - required property var communitiesStore + required property SharedStores.RootStore rootStore + required property RootStore walletRootStore + required property CommunitiesStore communitiesStore required property var collectible property var activityModel diff --git a/ui/app/AppLayouts/stores/RootStore.qml b/ui/app/AppLayouts/stores/RootStore.qml index 6c25d14a8a..c5a2827880 100644 --- a/ui/app/AppLayouts/stores/RootStore.qml +++ b/ui/app/AppLayouts/stores/RootStore.qml @@ -5,6 +5,7 @@ import utils 1.0 import StatusQ 0.1 import SortFilterProxyModel 0.2 +import AppLayouts.Profile.stores 1.0 as ProfileStores import AppLayouts.Wallet.stores 1.0 as WalletStore import "../Profile/stores" @@ -158,9 +159,9 @@ QtObject { // Not Refactored Yet // property var profileModelInst: profileModel - property var contactStore: profileSectionStore.contactsStore - property var privacyStore: profileSectionStore.privacyStore - property var messagingStore: profileSectionStore.messagingStore + property ProfileStores.ContactsStore contactStore: profileSectionStore.contactsStore + property ProfileStores.PrivacyStore privacyStore: profileSectionStore.privacyStore + property ProfileStores.MessagingStore messagingStore: profileSectionStore.messagingStore property bool hasAddedContacts: contactStore.myContactsModel.count > 0 // property MessageStore messageStore: MessageStore { } diff --git a/ui/app/AppLayouts/stores/qmldir b/ui/app/AppLayouts/stores/qmldir index cdbd554d5a..e0153deb68 100644 --- a/ui/app/AppLayouts/stores/qmldir +++ b/ui/app/AppLayouts/stores/qmldir @@ -1,2 +1,3 @@ RootStore 1.0 RootStore.qml CloneModel 1.0 CloneModel.qml +AppSearchStore 1.0 AppSearchStore.qml diff --git a/ui/app/mainui/AppMain.qml b/ui/app/mainui/AppMain.qml index 51421c9250..22004386d7 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 @@ -1299,10 +1299,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 } @@ -1482,7 +1481,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 @@ -1788,7 +1787,7 @@ Item { } sourceComponent: WalletPopups.AddEditSavedAddressPopup { - flatNetworks: WalletStore.RootStore.filteredFlatModel + flatNetworks: WalletStores.RootStore.filteredFlatModel onClosed: { addEditSavedAddress.close() @@ -1799,8 +1798,8 @@ Item { target: WalletStore.RootStore 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") @@ -1866,7 +1865,7 @@ Item { } onRemoveSavedAddress: { - WalletStore.RootStore.deleteSavedAddress(address) + WalletStores.RootStore.deleteSavedAddress(address) close() } } @@ -1875,7 +1874,7 @@ Item { target: WalletStore.RootStore function onSavedAddressDeleted(name: string, address: string, errorMsg: string) { - WalletStore.RootStore.deletingSavedAddress = false + WalletStores.RootStore.deletingSavedAddress = false if (!!errorMsg) { @@ -1950,30 +1949,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 } onUpdateSelectedAddress: (address) => { if (showQR.showSingleAccount || showQR.showForSavedAddress) { return } - WalletStore.RootStore.switchReceiveAccountByAddress(address) + WalletStores.RootStore.switchReceiveAccountByAddress(address) } 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: { @@ -2040,12 +2039,12 @@ 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 + controller: WalletStores.RootStore.walletConnectController } walletStore: appMain.rootStore.profileSectionStore.walletStore diff --git a/ui/app/mainui/AppSearch.qml b/ui/app/mainui/AppSearch.qml index ae0db65b01..6b6d06e5e8 100644 --- a/ui/app/mainui/AppSearch.qml +++ b/ui/app/mainui/AppSearch.qml @@ -7,10 +7,12 @@ import StatusQ.Popups 0.1 import shared.stores 1.0 import utils 1.0 +import AppLayouts.stores 1.0 + Item { id: appSearch - property var store + property AppSearchStore store readonly property var searchMessages: Backpressure.debounce(searchPopup, 400, function (value) { appSearch.store.searchMessages(value) }) diff --git a/ui/app/mainui/Popups.qml b/ui/app/mainui/Popups.qml index 45bc74acf0..edc81ea796 100644 --- a/ui/app/mainui/Popups.qml +++ b/ui/app/mainui/Popups.qml @@ -11,15 +11,18 @@ 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 +import AppLayouts.Chat.stores 1.0 as ChatStores import shared.popups 1.0 import shared.status 1.0 @@ -31,14 +34,14 @@ QtObject { id: root required property var popupParent - required property var rootStore - required property var communityTokensStore - property var communitiesStore - property var devicesStore + required property AppLayoutStores.RootStore rootStore + required property CommunityTokensStore communityTokensStore + property CommunitiesStore communitiesStore + property ProfileStores.DevicesStore devicesStore property CurrenciesStore currencyStore property WalletStore.WalletAssetsStore walletAssetsStore property WalletStore.CollectiblesStore walletCollectiblesStore - property var networkConnectionStore + property NetworkConnectionStore networkConnectionStore property bool isDevBuild signal openExternalLink(string link) @@ -630,7 +633,6 @@ QtObject { id: communityProfilePopup CommunityProfilePopup { - contactsStore: rootStore.contactStore hasAddedContacts: rootStore.hasAddedContacts onClosed: destroy() @@ -964,7 +966,7 @@ QtObject { CommunityMembershipSetupDialog { id: editSharedAddressesPopup - readonly property var chatStore: ChatStore.RootStore { + readonly property ChatStores.RootStore chatStore: ChatStores.RootStore { contactsStore: root.rootStore.contactStore chatCommunitySectionModule: { root.rootStore.mainModuleInst.prepareCommunitySectionModuleForCommunityId(editSharedAddressesPopup.communityId) diff --git a/ui/app/mainui/activitycenter/popups/ActivityCenterPopup.qml b/ui/app/mainui/activitycenter/popups/ActivityCenterPopup.qml index 99f91ff9df..687b288409 100644 --- a/ui/app/mainui/activitycenter/popups/ActivityCenterPopup.qml +++ b/ui/app/mainui/activitycenter/popups/ActivityCenterPopup.qml @@ -12,6 +12,8 @@ import shared.views.chat 1.0 import utils 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores + import "../views" import "../panels" import "../stores" @@ -20,7 +22,7 @@ Popup { id: root property ActivityCenterStore activityCenterStore - property var store + property ChatStores.RootStore store onOpened: { Global.activityPopupOpened = true diff --git a/ui/app/mainui/activitycenter/views/ActivityNotificationBase.qml b/ui/app/mainui/activitycenter/views/ActivityNotificationBase.qml index c77b24278c..f0d53cd0f4 100644 --- a/ui/app/mainui/activitycenter/views/ActivityNotificationBase.qml +++ b/ui/app/mainui/activitycenter/views/ActivityNotificationBase.qml @@ -8,13 +8,17 @@ import StatusQ.Controls 0.1 import shared 1.0 import utils 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores + +import mainui.activitycenter.stores 1.0 + Item { id: root /* required */ property int filteredIndex /* required */ property var notification - /* required */ property var store - /* required */ property var activityCenterStore + /* required */ property ChatStores.RootStore store + /* required */ property ActivityCenterStore activityCenterStore property alias bodyComponent: bodyLoader.sourceComponent property alias badgeComponent: badgeLoader.sourceComponent diff --git a/ui/app/mainui/activitycenter/views/ActivityNotificationCommunityTokenReceived.qml b/ui/app/mainui/activitycenter/views/ActivityNotificationCommunityTokenReceived.qml index 95b05d3e24..c6ea7ea301 100644 --- a/ui/app/mainui/activitycenter/views/ActivityNotificationCommunityTokenReceived.qml +++ b/ui/app/mainui/activitycenter/views/ActivityNotificationCommunityTokenReceived.qml @@ -13,8 +13,8 @@ import AppLayouts.Wallet 1.0 ActivityNotificationBase { id: root + store: null property var community: null - property var store: null property var tokenData: root.notification.tokenData diff --git a/ui/imports/shared/controls/TransactionAddress.qml b/ui/imports/shared/controls/TransactionAddress.qml index 93c678a8d3..0453c3438c 100644 --- a/ui/imports/shared/controls/TransactionAddress.qml +++ b/ui/imports/shared/controls/TransactionAddress.qml @@ -7,6 +7,8 @@ import StatusQ.Controls 0.1 import StatusQ.Core.Theme 0.1 import AppLayouts.Wallet 1.0 +import AppLayouts.Wallet.stores 1.0 as WalletStores +import AppLayouts.Profile.stores 1.0 as ProfileStores import utils 1.0 @@ -36,10 +38,10 @@ Item { property string address /* /internal Property hold reference to contacts store to refresh contact data on any change. */ - property var contactsStore + property ProfileStores.ContactsStore contactsStore /* /internal Property hold reference to root store to refresh wallet data on any change. */ - property var rootStore + property WalletStores.RootStore rootStore /*! \qmlproperty \l{StatusAssetSettings} TransactionAddress::asset diff --git a/ui/imports/shared/controls/TransactionAddressTile.qml b/ui/imports/shared/controls/TransactionAddressTile.qml index 8d51ed7a03..471636c3db 100644 --- a/ui/imports/shared/controls/TransactionAddressTile.qml +++ b/ui/imports/shared/controls/TransactionAddressTile.qml @@ -7,6 +7,9 @@ import StatusQ.Controls 0.1 import StatusQ.Components 0.1 import StatusQ.Core.Theme 0.1 +import AppLayouts.Profile.stores 1.0 as ProfileStores +import AppLayouts.Wallet.stores 1.0 as WalletStores + /*! \qmltype TransactionAddressTile \inherits TransactionDataTile @@ -41,10 +44,10 @@ TransactionDataTile { \qmlproperty var TransactionAddressTile::rootStore This property holds rootStore object used to retrive data for each address. */ - property var rootStore + property WalletStores.RootStore rootStore /* /internal Property hold reference to contacts store to refresh contact data on any change. */ - property var contactsStore + property ProfileStores.ContactsStore contactsStore implicitHeight: transactionColumn.height + transactionColumn.spacing + root.topPadding + root.bottomPadding buttonIconName: "more" diff --git a/ui/imports/shared/controls/TransactionDelegate.qml b/ui/imports/shared/controls/TransactionDelegate.qml index b4768fbc7b..ae263a6d78 100644 --- a/ui/imports/shared/controls/TransactionDelegate.qml +++ b/ui/imports/shared/controls/TransactionDelegate.qml @@ -9,9 +9,11 @@ import StatusQ.Controls 0.1 import StatusQ.Core.Utils 0.1 as SQUtils import AppLayouts.Wallet 1.0 +import AppLayouts.Wallet.stores 1.0 as WalletStores import utils 1.0 import shared 1.0 +import shared.stores 1.0 as SharedStores /*! \qmltype TransactionDelegate @@ -46,8 +48,8 @@ StatusListItem { property bool showAllAccounts: false property bool displayValues: true - required property var rootStore - required property var walletRootStore + required property SharedStores.RootStore rootStore + required property WalletStores.RootStore walletRootStore readonly property bool isModelDataValid: modelData !== undefined && !!modelData diff --git a/ui/imports/shared/controls/chat/ProfileHeader.qml b/ui/imports/shared/controls/chat/ProfileHeader.qml index 6fb3e16455..45e4bd1738 100644 --- a/ui/imports/shared/controls/chat/ProfileHeader.qml +++ b/ui/imports/shared/controls/chat/ProfileHeader.qml @@ -10,6 +10,8 @@ import StatusQ.Components 0.1 import StatusQ.Popups 0.1 import StatusQ.Core.Utils 0.1 as StatusQUtils +import AppLayouts.Profile.stores 1.0 as ProfileStores + Item { id: root @@ -19,7 +21,7 @@ Item { Big } - property var store + property ProfileStores.ProfileStore store property string displayName property string pubkey property string icon diff --git a/ui/imports/shared/panels/ConnectionWarnings.qml b/ui/imports/shared/panels/ConnectionWarnings.qml index c13f5cb788..f2e12723af 100644 --- a/ui/imports/shared/panels/ConnectionWarnings.qml +++ b/ui/imports/shared/panels/ConnectionWarnings.qml @@ -5,11 +5,13 @@ import StatusQ.Controls 0.1 import utils 1.0 +import shared.stores 1.0 + Loader { id: root active: false - property var networkConnectionStore + property NetworkConnectionStore networkConnectionStore readonly property string jointChainIdString: networkConnectionStore.getChainIdsJointString(chainIdsDown) property string websiteDown property int connectionState: -1 diff --git a/ui/imports/shared/popups/ContactVerificationRequestPopup.qml b/ui/imports/shared/popups/ContactVerificationRequestPopup.qml index f44dc71d13..433bb24fa6 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/DeleteMessageConfirmationPopup.qml b/ui/imports/shared/popups/DeleteMessageConfirmationPopup.qml index 151e788e66..e3fd22035e 100644 --- a/ui/imports/shared/popups/DeleteMessageConfirmationPopup.qml +++ b/ui/imports/shared/popups/DeleteMessageConfirmationPopup.qml @@ -1,9 +1,11 @@ import QtQuick 2.15 +import AppLayouts.Chat.stores 1.0 + ConfirmationDialog { id: root - property var messageStore + property MessageStore messageStore property string messageId headerSettings.title: qsTr("Confirm deleting this message") diff --git a/ui/imports/shared/popups/ImportCommunityPopup.qml b/ui/imports/shared/popups/ImportCommunityPopup.qml index b7615c682a..df913d9f5d 100644 --- a/ui/imports/shared/popups/ImportCommunityPopup.qml +++ b/ui/imports/shared/popups/ImportCommunityPopup.qml @@ -13,10 +13,12 @@ import StatusQ.Core.Theme 0.1 import StatusQ.Popups.Dialog 0.1 import StatusQ.Controls 0.1 +import AppLayouts.Communities.stores 1.0 as CommunitiesStores + StatusDialog { id: root - property var store + property CommunitiesStores.CommunitiesStore store property alias text: keyInput.text signal joinCommunityRequested(string communityId, var communityDetails) diff --git a/ui/imports/shared/popups/SendContactRequestModal.qml b/ui/imports/shared/popups/SendContactRequestModal.qml index 974d590ee3..302ee0eca1 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/popups/UserStatusContextMenu.qml b/ui/imports/shared/popups/UserStatusContextMenu.qml index c803ae4587..f0358e5068 100644 --- a/ui/imports/shared/popups/UserStatusContextMenu.qml +++ b/ui/imports/shared/popups/UserStatusContextMenu.qml @@ -11,10 +11,12 @@ import shared.controls.chat.menuItems 1.0 import StatusQ.Components 0.1 import StatusQ.Popups 0.1 +import AppLayouts.stores 1.0 + StatusMenu { id: root - property var store + property RootStore store ProfileHeader { width: parent.width diff --git a/ui/imports/shared/popups/send/SendModal.qml b/ui/imports/shared/popups/send/SendModal.qml index 84d1f9df05..beb506be40 100644 --- a/ui/imports/shared/popups/send/SendModal.qml +++ b/ui/imports/shared/popups/send/SendModal.qml @@ -8,6 +8,7 @@ import SortFilterProxyModel 0.2 import AppLayouts.Wallet 1.0 import utils 1.0 +import shared.stores 1.0 import shared.stores.send 1.0 import shared.controls 1.0 @@ -77,7 +78,7 @@ StatusDialog { popup.preSelectedSendType === Constants.SendType.ENSSetPubKey || popup.preSelectedSendType === Constants.SendType.StickersBuy - readonly property var currencyStore: store.currencyStore + readonly property CurrenciesStore currencyStore: store.currencyStore readonly property int errorType: !amountToSendInput.input.valid && (!isCollectiblesTransfer) ? Constants.SendAmountExceedsBalance : (popup.bestRoutes && popup.bestRoutes.count === 0 && !!amountToSendInput.input.text && recipientLoader.ready && !popup.isLoading) ? diff --git a/ui/imports/shared/popups/send/views/FeesView.qml b/ui/imports/shared/popups/send/views/FeesView.qml index bca0da11ba..93cde2a70d 100644 --- a/ui/imports/shared/popups/send/views/FeesView.qml +++ b/ui/imports/shared/popups/send/views/FeesView.qml @@ -8,6 +8,7 @@ import StatusQ.Core.Theme 0.1 import utils 1.0 import shared.stores 1.0 +import shared.stores.send 1.0 as SharedSendStores import "../controls" @@ -17,8 +18,8 @@ Rectangle { property var gasFiatAmount property bool isLoading: false property var bestRoutes - property var store - property var currencyStore: store.currencyStore + property SharedSendStores.TransactionStore store + property CurrenciesStore currencyStore: store.currencyStore property var selectedAsset property int errorType: Constants.NoError diff --git a/ui/imports/shared/popups/send/views/NetworkCardsComponent.qml b/ui/imports/shared/popups/send/views/NetworkCardsComponent.qml index de045360b6..d8e4dc9183 100644 --- a/ui/imports/shared/popups/send/views/NetworkCardsComponent.qml +++ b/ui/imports/shared/popups/send/views/NetworkCardsComponent.qml @@ -10,13 +10,16 @@ import StatusQ.Core 0.1 import StatusQ.Core.Theme 0.1 import StatusQ.Core.Utils 0.1 as StatusQUtils +import shared.stores 1.0 as SharedStores +import shared.stores.send 1.0 as SharedSendStores + import "../controls" Item { id: root - property var store - readonly property var currencyStore: store.currencyStore + property SharedSendStores.TransactionStore store + readonly property SharedStores.CurrenciesStore currencyStore: store.currencyStore property string receiverIdentityText property var selectedAsset property bool customMode: false diff --git a/ui/imports/shared/popups/send/views/NetworkSelector.qml b/ui/imports/shared/popups/send/views/NetworkSelector.qml index 9f0e3cc2a5..b197264af5 100644 --- a/ui/imports/shared/popups/send/views/NetworkSelector.qml +++ b/ui/imports/shared/popups/send/views/NetworkSelector.qml @@ -3,6 +3,7 @@ import QtQuick.Layouts 1.13 import utils 1.0 import shared.stores 1.0 +import shared.stores.send 1.0 as SharedSendStores import StatusQ.Controls 0.1 import StatusQ.Popups 0.1 @@ -15,8 +16,8 @@ import shared.popups.send.controls 1.0 Item { id: root - property var store - property var currencyStore : store.currencyStore + property SharedSendStores.TransactionStore store + property CurrenciesStore currencyStore : store.currencyStore property var selectedRecipient property string ensAddressOrEmpty: "" property var selectedAsset diff --git a/ui/imports/shared/popups/send/views/NetworksAdvancedCustomRoutingView.qml b/ui/imports/shared/popups/send/views/NetworksAdvancedCustomRoutingView.qml index fc142a16a7..bb91c30c20 100644 --- a/ui/imports/shared/popups/send/views/NetworksAdvancedCustomRoutingView.qml +++ b/ui/imports/shared/popups/send/views/NetworksAdvancedCustomRoutingView.qml @@ -10,12 +10,14 @@ import StatusQ.Core 0.1 import StatusQ.Core.Theme 0.1 import StatusQ.Core.Utils 0.1 as StatusQUtils +import shared.stores.send 1.0 as SharedSendStores + import "../controls" ColumnLayout { id: root - property var store + property SharedSendStores.TransactionStore store property var selectedRecipient property string ensAddressOrEmpty: "" property double amountToSend diff --git a/ui/imports/shared/popups/send/views/NetworksSimpleRoutingView.qml b/ui/imports/shared/popups/send/views/NetworksSimpleRoutingView.qml index 172cc09bd1..e469a3904a 100644 --- a/ui/imports/shared/popups/send/views/NetworksSimpleRoutingView.qml +++ b/ui/imports/shared/popups/send/views/NetworksSimpleRoutingView.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 2.13 import QtQuick.Layouts 1.13 import utils 1.0 +import shared.stores.send 1.0 as SharedSendStores import StatusQ.Controls 0.1 import StatusQ.Popups 0.1 @@ -15,7 +16,7 @@ import "../controls" RowLayout { id: root - property var store + property SharedSendStores.TransactionStore store property int minReceiveCryptoDecimals: 0 property bool isLoading: false property bool isBridgeTx: false diff --git a/ui/imports/shared/popups/send/views/RecipientView.qml b/ui/imports/shared/popups/send/views/RecipientView.qml index c0bc3b5c0d..c933f9c940 100644 --- a/ui/imports/shared/popups/send/views/RecipientView.qml +++ b/ui/imports/shared/popups/send/views/RecipientView.qml @@ -12,6 +12,7 @@ import shared.controls 1.0 as SharedControls import shared.stores.send 1.0 import utils 1.0 +import shared.stores.send 1.0 import "../controls" diff --git a/ui/imports/shared/popups/send/views/TabAddressSelectorView.qml b/ui/imports/shared/popups/send/views/TabAddressSelectorView.qml index eb5f8ff819..bbf1c6a248 100644 --- a/ui/imports/shared/popups/send/views/TabAddressSelectorView.qml +++ b/ui/imports/shared/popups/send/views/TabAddressSelectorView.qml @@ -6,6 +6,7 @@ import QtQuick.Dialogs 1.3 import utils 1.0 import shared.controls 1.0 as SharedControls import shared.stores 1.0 +import shared.stores.send 1.0 as SharedSendStores import AppLayouts.Wallet 1.0 @@ -16,8 +17,6 @@ import StatusQ.Core 0.1 import StatusQ.Core.Theme 0.1 import StatusQ.Core.Utils 0.1 as StatusQUtils -import utils 1.0 - import "../panels" import "../controls" import "../views" @@ -26,7 +25,7 @@ Item { id: root property var selectedAccount - property var store + property SharedSendStores.TransactionStore store signal recipientSelected(var recipient, int type) diff --git a/ui/imports/shared/status/StatusChatInput.qml b/ui/imports/shared/status/StatusChatInput.qml index b9a4401560..f601740ab3 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/status/StatusGifPopup/StatusGifColumn.qml b/ui/imports/shared/status/StatusGifPopup/StatusGifColumn.qml index 12a755caab..0746cc30e4 100644 --- a/ui/imports/shared/status/StatusGifPopup/StatusGifColumn.qml +++ b/ui/imports/shared/status/StatusGifPopup/StatusGifColumn.qml @@ -15,7 +15,7 @@ Column { spacing: 8 property alias gifList: repeater property int gifWidth: 0 - property var store + property RootStore store property var gifSelected: function () {} property var toggleFavorite: function () {} property string lastHoveredId diff --git a/ui/imports/shared/status/StatusStickerMarket.qml b/ui/imports/shared/status/StatusStickerMarket.qml index 7e27a2f3a3..2226d05ecd 100644 --- a/ui/imports/shared/status/StatusStickerMarket.qml +++ b/ui/imports/shared/status/StatusStickerMarket.qml @@ -18,14 +18,14 @@ import shared.popups.send 1.0 import shared.stores.send 1.0 //TODO remove this dependency! -import AppLayouts.Chat.stores 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores import AppLayouts.Wallet.stores 1.0 Item { id: root - property var store - property var stickerPacks: StickerPackData {} + property ChatStores.RootStore store + property var stickerPacks: ChatStores.StickerPackData {} required property TransactionStore transactionStore required property WalletAssetsStore walletAssetsStore property string packId diff --git a/ui/imports/shared/status/StatusStickerPackClickPopup.qml b/ui/imports/shared/status/StatusStickerPackClickPopup.qml index 9038ee25b0..8581c1a98a 100644 --- a/ui/imports/shared/status/StatusStickerPackClickPopup.qml +++ b/ui/imports/shared/status/StatusStickerPackClickPopup.qml @@ -15,7 +15,7 @@ import shared.popups.send 1.0 import shared.stores.send 1.0 //TODO remove this dependency! -import "../../../app/AppLayouts/Chat/stores" +import AppLayouts.Chat.stores 1.0 as ChatStores import AppLayouts.Wallet.stores 1.0 // TODO: replace with StatusModal @@ -24,7 +24,7 @@ ModalPopup { property string packId - property var store + property ChatStores.RootStore store required property TransactionStore transactionStore required property WalletAssetsStore walletAssetsStore property string thumbnail: "" diff --git a/ui/imports/shared/status/StatusStickersPopup.qml b/ui/imports/shared/status/StatusStickersPopup.qml index 8916c1b145..a36ef8263c 100644 --- a/ui/imports/shared/status/StatusStickersPopup.qml +++ b/ui/imports/shared/status/StatusStickersPopup.qml @@ -12,13 +12,13 @@ import StatusQ.Core.Theme 0.1 import StatusQ.Controls 0.1 import StatusQ.Components 0.1 //TODO improve this! -import AppLayouts.Chat.stores 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores import AppLayouts.Wallet.stores 1.0 Popup { id: root - property var store + property ChatStores.RootStore store required property TransactionStore transactionStore required property WalletAssetsStore walletAssetsStore diff --git a/ui/imports/shared/stores/RootStore.qml b/ui/imports/shared/stores/RootStore.qml index c5def0e554..ca159c27c1 100644 --- a/ui/imports/shared/stores/RootStore.qml +++ b/ui/imports/shared/stores/RootStore.qml @@ -29,7 +29,7 @@ QtObject { readonly property bool newDataAvailable: Global.appIsReady && walletSectionInst.activityController.status.newDataAvailable property bool isNonArchivalNode: Global.appIsReady && walletSectionInst.isNonArchivalNode - property var marketValueStore: TokenMarketValuesStore{} + property TokenMarketValuesStore marketValueStore: TokenMarketValuesStore{} function resetActivityData() { walletSectionInst.activityController.resetActivityData() diff --git a/ui/imports/shared/views/AssetsView.qml b/ui/imports/shared/views/AssetsView.qml index 70387ebe5c..7f7be07339 100644 --- a/ui/imports/shared/views/AssetsView.qml +++ b/ui/imports/shared/views/AssetsView.qml @@ -10,8 +10,10 @@ import StatusQ.Core.Theme 0.1 import StatusQ.Popups.Dialog 0.1 import AppLayouts.Wallet.controls 1.0 +import AppLayouts.Wallet.stores 1.0 as WalletStores import shared.controls 1.0 import shared.popups 1.0 +import shared.stores 1.0 import utils 1.0 import SortFilterProxyModel 0.2 diff --git a/ui/imports/shared/views/ExistingContacts.qml b/ui/imports/shared/views/ExistingContacts.qml index f7d15acd11..b365142c65 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 63da428ef2..19065ea83b 100644 --- a/ui/imports/shared/views/HistoryView.qml +++ b/ui/imports/shared/views/HistoryView.qml @@ -19,6 +19,7 @@ import "../popups/send" import "../stores" import "../controls" +import AppLayouts.Communities.stores 1.0 import AppLayouts.Wallet.stores 1.0 as WalletStores import AppLayouts.Wallet.popups 1.0 import AppLayouts.Wallet.controls 1.0 @@ -28,7 +29,7 @@ ColumnLayout { id: root property var overview - property var communitiesStore + property CommunitiesStore communitiesStore property bool showAllAccounts: false property bool displayValues: true property var sendModal diff --git a/ui/imports/shared/views/PickedContacts.qml b/ui/imports/shared/views/PickedContacts.qml index 2a1660b450..79127b8d46 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/ProfileDialogView.qml b/ui/imports/shared/views/ProfileDialogView.qml index 0d799c1e20..0376e24f52 100644 --- a/ui/imports/shared/views/ProfileDialogView.qml +++ b/ui/imports/shared/views/ProfileDialogView.qml @@ -21,8 +21,9 @@ import shared.views.profile 1.0 import SortFilterProxyModel 0.2 -import AppLayouts.Wallet.stores 1.0 as WalletNS import AppLayouts.Profile.helpers 1.0 +import AppLayouts.Profile.stores 1.0 as ProfileStores +import AppLayouts.Wallet.stores 1.0 as WalletStores Pane { id: root @@ -33,8 +34,8 @@ Pane { property string publicKey: contactsStore.myPublicKey readonly property alias isCurrentUser: d.isCurrentUser - property var profileStore - property var contactsStore + property ProfileStores.ProfileStore profileStore + property ProfileStores.ContactsStore contactsStore property alias sendToAccountEnabled: showcaseView.sendToAccountEnabled @@ -611,7 +612,7 @@ Pane { socialLinksModel: root.showcaseSocialLinksModel // assetsModel: root.showcaseAssetsModel - walletStore: WalletNS.RootStore + walletStore: WalletStores.RootStore onCloseRequested: root.closeRequested() onCopyToClipboard: root.profileStore.copyToClipboard(text) diff --git a/ui/imports/shared/views/chat/AcceptTransactionView.qml b/ui/imports/shared/views/chat/AcceptTransactionView.qml index b737143e94..69e550dbf6 100644 --- a/ui/imports/shared/views/chat/AcceptTransactionView.qml +++ b/ui/imports/shared/views/chat/AcceptTransactionView.qml @@ -7,14 +7,17 @@ import shared.controls 1.0 import utils 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores +import AppLayouts.Profile.stores 1.0 as ProfileStores + //TODO remove dynamic scoping Item { id: root width: parent.width height: childrenRect.height - property var store // Expected ui/app/AppLayouts/Chat/stores/RootStore.qml - property var contactsStore + property ChatStores.RootStore store + property ProfileStores.ContactsStore contactsStore property var token property string tokenAmount diff --git a/ui/imports/shared/views/chat/InvitationBubbleView.qml b/ui/imports/shared/views/chat/InvitationBubbleView.qml index 12e2bf97a3..16685077cb 100644 --- a/ui/imports/shared/views/chat/InvitationBubbleView.qml +++ b/ui/imports/shared/views/chat/InvitationBubbleView.qml @@ -12,13 +12,15 @@ import StatusQ.Components 0.1 import shared.panels 1.0 import shared.popups 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores + Control { id: root implicitWidth: d.invitedCommunity || d.loading ? 270 /*by design*/ : 0 padding: 1 - property var store + property ChatStores.RootStore store property string communityId QtObject { diff --git a/ui/imports/shared/views/chat/MessageContextMenuView.qml b/ui/imports/shared/views/chat/MessageContextMenuView.qml index 2d93b89b5e..f04579859f 100644 --- a/ui/imports/shared/views/chat/MessageContextMenuView.qml +++ b/ui/imports/shared/views/chat/MessageContextMenuView.qml @@ -14,10 +14,12 @@ import shared.status 1.0 import shared.controls.chat 1.0 import shared.controls.chat.menuItems 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores + StatusMenu { id: root - property var store + property ChatStores.RootStore store property var reactionModel: [] property string myPublicKey: "" diff --git a/ui/imports/shared/views/chat/MessageView.qml b/ui/imports/shared/views/chat/MessageView.qml index b2af940a77..28670126a6 100644 --- a/ui/imports/shared/views/chat/MessageView.qml +++ b/ui/imports/shared/views/chat/MessageView.qml @@ -16,13 +16,16 @@ 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 +import AppLayouts.Profile.stores 1.0 as ProfileStores + Loader { id: root - property var rootStore - property var messageStore - property var usersStore - property var contactsStore + property ChatStores.RootStore rootStore + property ChatStores.MessageStore messageStore + property ChatStores.UsersStore usersStore + property ProfileStores.ContactsStore 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 51b6cc6322..9afe9f3bcc 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/chat/TransactionBubbleView.qml b/ui/imports/shared/views/chat/TransactionBubbleView.qml index 58afda99c9..f67863e8ce 100644 --- a/ui/imports/shared/views/chat/TransactionBubbleView.qml +++ b/ui/imports/shared/views/chat/TransactionBubbleView.qml @@ -11,13 +11,16 @@ import shared.controls.chat 1.0 import shared.controls 1.0 import shared.stores 1.0 +import AppLayouts.Chat.stores 1.0 as ChatStores +import AppLayouts.Profile.stores 1.0 as ProfileStores + Item { id: root width: rectangleBubble.width height: rectangleBubble.height - property var store // expected ui/app/AppLayouts/Chat/stores/RootStore.qml - property var contactsStore + property ChatStores.RootStore store + property ProfileStores.ContactsStore contactsStore property var transactionParams diff --git a/ui/imports/shared/views/profile/ProfileShowcaseAccountsView.qml b/ui/imports/shared/views/profile/ProfileShowcaseAccountsView.qml index 5b8c723cb6..b55b842ed0 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 25c80a130d..fe6d9c31f7 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 c8fbe3748d..5b6beee535 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 2f0000cdb1..d0480e3144 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,