2024-10-31 12:41:52 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
|
|
|
import StatusQ.Core.Utils 0.1
|
2021-10-06 09:16:39 +00:00
|
|
|
|
2022-04-19 11:13:57 +00:00
|
|
|
import AppLayouts.Chat.stores 1.0
|
2024-03-29 11:43:49 +00:00
|
|
|
import AppLayouts.Communities.stores 1.0
|
|
|
|
import AppLayouts.Profile.helpers 1.0
|
2024-10-31 12:41:52 +00:00
|
|
|
import utils 1.0
|
2022-04-19 11:13:57 +00:00
|
|
|
|
2023-12-11 09:47:30 +00:00
|
|
|
import SortFilterProxyModel 0.2
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
QtObject {
|
|
|
|
id: root
|
2022-10-01 12:07:14 +00:00
|
|
|
|
2022-09-13 16:17:54 +00:00
|
|
|
property string backButtonName
|
2022-10-01 12:07:14 +00:00
|
|
|
|
2021-10-13 21:31:04 +00:00
|
|
|
property var aboutModuleInst: aboutModule
|
2023-03-24 12:48:33 +00:00
|
|
|
property var mainModuleInst: mainModule
|
2021-12-29 15:09:29 +00:00
|
|
|
property var profileSectionModuleInst: profileSectionModule
|
2021-12-27 11:04:10 +00:00
|
|
|
|
2022-09-27 21:26:26 +00:00
|
|
|
readonly property bool fetchingUpdate: aboutModuleInst.fetching
|
2022-03-17 16:15:38 +00:00
|
|
|
|
2024-11-28 14:15:34 +00:00
|
|
|
property ContactsStore contactsStore: ContactsStore {}
|
2021-12-31 12:29:51 +00:00
|
|
|
|
2021-12-14 18:47:32 +00:00
|
|
|
property AdvancedStore advancedStore: AdvancedStore {
|
2023-10-03 13:30:42 +00:00
|
|
|
walletModule: profileSectionModuleInst.walletModule
|
2021-12-29 15:09:29 +00:00
|
|
|
advancedModule: profileSectionModuleInst.advancedModule
|
2021-12-14 18:47:32 +00:00
|
|
|
}
|
|
|
|
|
2022-03-07 20:34:59 +00:00
|
|
|
property MessagingStore messagingStore: MessagingStore {
|
|
|
|
privacyModule: profileSectionModuleInst.privacyModule
|
|
|
|
syncModule: profileSectionModuleInst.syncModule
|
2022-08-02 18:37:27 +00:00
|
|
|
wakuModule: profileSectionModuleInst.wakuModule
|
2021-12-27 11:04:10 +00:00
|
|
|
}
|
|
|
|
|
2022-03-07 20:34:59 +00:00
|
|
|
property DevicesStore devicesStore: DevicesStore {
|
|
|
|
devicesModule: profileSectionModuleInst.devicesModule
|
2021-12-27 16:40:46 +00:00
|
|
|
}
|
|
|
|
|
2021-12-28 14:43:25 +00:00
|
|
|
property NotificationsStore notificationsStore: NotificationsStore {
|
2021-12-29 15:09:29 +00:00
|
|
|
notificationsModule: profileSectionModuleInst.notificationsModule
|
2021-12-28 14:43:25 +00:00
|
|
|
}
|
|
|
|
|
2021-12-29 09:53:56 +00:00
|
|
|
property LanguageStore languageStore: LanguageStore {
|
2021-12-29 15:09:29 +00:00
|
|
|
languageModule: profileSectionModuleInst.languageModule
|
2021-12-29 09:53:56 +00:00
|
|
|
}
|
|
|
|
|
2021-12-29 10:32:43 +00:00
|
|
|
property AppearanceStore appearanceStore: AppearanceStore {
|
|
|
|
}
|
|
|
|
|
2021-12-29 15:09:29 +00:00
|
|
|
property ProfileStore profileStore: ProfileStore {
|
|
|
|
profileModule: profileSectionModuleInst.profileModule
|
|
|
|
}
|
|
|
|
|
2021-12-30 12:39:47 +00:00
|
|
|
property PrivacyStore privacyStore: PrivacyStore {
|
|
|
|
privacyModule: profileSectionModuleInst.privacyModule
|
|
|
|
}
|
|
|
|
|
2022-01-17 08:56:44 +00:00
|
|
|
property EnsUsernamesStore ensUsernamesStore: EnsUsernamesStore {
|
|
|
|
ensUsernamesModule: profileSectionModuleInst.ensUsernamesModule
|
|
|
|
}
|
2021-12-13 14:24:21 +00:00
|
|
|
|
2022-02-11 09:44:49 +00:00
|
|
|
property WalletStore walletStore: WalletStore {
|
2023-08-04 12:41:57 +00:00
|
|
|
walletModule: profileSectionModuleInst.walletModule
|
2022-02-11 09:44:49 +00:00
|
|
|
}
|
|
|
|
|
2022-08-16 09:19:15 +00:00
|
|
|
property KeycardStore keycardStore: KeycardStore {
|
|
|
|
keycardModule: profileSectionModuleInst.keycardModule
|
|
|
|
}
|
|
|
|
|
2022-04-19 11:13:57 +00:00
|
|
|
property var stickersModuleInst: stickersModule
|
2024-05-22 08:13:39 +00:00
|
|
|
property StickersStore stickersStore: StickersStore {
|
2022-04-19 11:13:57 +00:00
|
|
|
stickersModule: stickersModuleInst
|
|
|
|
}
|
2021-10-06 09:16:39 +00:00
|
|
|
|
2023-03-15 13:35:03 +00:00
|
|
|
property bool walletMenuItemEnabled: profileStore.isWalletEnabled
|
2022-03-23 10:56:25 +00:00
|
|
|
|
2023-02-14 09:20:53 +00:00
|
|
|
property var communitiesModuleInst: Global.appIsReady? communitiesModule : null
|
2024-02-15 09:25:40 +00:00
|
|
|
|
2024-10-26 01:25:50 +00:00
|
|
|
readonly property var communitiesList: SortFilterProxyModel {
|
2023-12-11 09:47:30 +00:00
|
|
|
sourceModel: root.mainModuleInst.sectionsModel
|
|
|
|
filters: ValueFilter {
|
|
|
|
roleName: "sectionType"
|
|
|
|
value: Constants.appSection.community
|
|
|
|
}
|
|
|
|
}
|
2022-03-23 10:56:25 +00:00
|
|
|
property var communitiesProfileModule: profileSectionModuleInst.communitiesModule
|
2021-10-06 09:16:39 +00:00
|
|
|
|
2024-03-29 11:43:49 +00:00
|
|
|
readonly property alias ownShowcaseCommunitiesModel: ownShowcaseModels.adaptedCommunitiesSourceModel
|
|
|
|
readonly property alias ownShowcaseAccountsModel: ownShowcaseModels.adaptedAccountsSourceModel
|
|
|
|
readonly property alias ownShowcaseCollectiblesModel: ownShowcaseModels.adaptedCollectiblesSourceModel
|
|
|
|
readonly property alias ownShowcaseSocialLinksModel: ownShowcaseModels.adaptedSocialLinksSourceModel
|
|
|
|
|
|
|
|
readonly property alias contactShowcaseCommunitiesModel: contactShowcaseModels.adaptedCommunitiesSourceModel
|
|
|
|
readonly property alias contactShowcaseAccountsModel: contactShowcaseModels.adaptedAccountsSourceModel
|
|
|
|
readonly property alias contactShowcaseCollectiblesModel: contactShowcaseModels.adaptedCollectiblesSourceModel
|
|
|
|
readonly property alias contactShowcaseSocialLinksModel: contactShowcaseModels.adaptedSocialLinksSourceModel
|
|
|
|
|
|
|
|
function requestContactShowcase(address) {
|
|
|
|
root.contactsStore.requestProfileShowcase(address)
|
|
|
|
}
|
|
|
|
|
|
|
|
function requestOwnShowcase() {
|
|
|
|
root.profileStore.requestProfileShowcasePreferences()
|
|
|
|
}
|
|
|
|
|
|
|
|
readonly property QObject d: QObject {
|
|
|
|
ProfileShowcaseSettingsModelAdapter {
|
|
|
|
id: ownShowcaseModels
|
|
|
|
communitiesSourceModel: root.communitiesList
|
|
|
|
communitiesShowcaseModel: root.profileStore.showcasePreferencesCommunitiesModel
|
|
|
|
accountsSourceModel: root.walletStore.ownAccounts
|
|
|
|
accountsShowcaseModel: root.profileStore.showcasePreferencesAccountsModel
|
|
|
|
collectiblesSourceModel: root.walletStore.collectibles
|
|
|
|
collectiblesShowcaseModel: root.profileStore.showcasePreferencesCollectiblesModel
|
|
|
|
socialLinksSourceModel: root.profileStore.showcasePreferencesSocialLinksModel
|
|
|
|
}
|
|
|
|
|
|
|
|
ProfileShowcaseModelAdapter {
|
|
|
|
id: contactShowcaseModels
|
|
|
|
communitiesSourceModel: root.communitiesModuleInst.model
|
|
|
|
communitiesShowcaseModel: root.contactsStore.showcaseContactCommunitiesModel
|
|
|
|
accountsSourceModel: root.contactsStore.showcaseContactAccountsModel
|
|
|
|
collectiblesSourceModel: root.contactsStore.showcaseCollectiblesModel
|
|
|
|
collectiblesShowcaseModel: root.contactsStore.showcaseContactCollectiblesModel
|
|
|
|
socialLinksSourceModel: root.contactsStore.showcaseContactSocialLinksModel
|
|
|
|
|
|
|
|
isAddressSaved: (address) => {
|
|
|
|
return false
|
|
|
|
}
|
2024-04-07 22:00:16 +00:00
|
|
|
isShowcaseLoading: root.contactsStore.isShowcaseForAContactLoading
|
2024-03-29 11:43:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
function getCurrentVersion() {
|
2021-10-13 21:31:04 +00:00
|
|
|
return aboutModuleInst.getCurrentVersion()
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
|
|
|
|
2023-07-26 14:34:21 +00:00
|
|
|
function getStatusGoVersion() {
|
|
|
|
return aboutModuleInst.getStatusGoVersion()
|
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
function nodeVersion() {
|
2021-10-13 21:31:04 +00:00
|
|
|
return aboutModuleInst.nodeVersion()
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function checkForUpdates() {
|
2021-12-23 13:45:52 +00:00
|
|
|
aboutModuleInst.checkForUpdates()
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|
2022-05-07 11:45:15 +00:00
|
|
|
|
2023-12-20 10:46:33 +00:00
|
|
|
function addressWasShown(address) {
|
|
|
|
return root.mainModuleInst.addressWasShown(address)
|
|
|
|
}
|
2021-10-06 09:16:39 +00:00
|
|
|
}
|