2021-12-06 21:10:54 +00:00
|
|
|
pragma Singleton
|
|
|
|
|
2022-10-21 13:37:39 +00:00
|
|
|
import QtQml 2.14
|
2021-12-06 21:10:54 +00:00
|
|
|
|
2022-10-21 13:37:39 +00:00
|
|
|
QtObject {
|
2021-12-07 20:33:12 +00:00
|
|
|
id: root
|
2021-12-21 09:26:13 +00:00
|
|
|
|
2022-10-06 15:47:55 +00:00
|
|
|
property var dragArea
|
2022-12-14 14:40:50 +00:00
|
|
|
property var applicationWindow
|
2023-05-23 12:46:16 +00:00
|
|
|
property bool activityPopupOpened: false
|
2022-02-25 13:32:46 +00:00
|
|
|
property int settingsSubsection: Constants.settingsSubsection.profile
|
2023-12-06 10:54:36 +00:00
|
|
|
property int settingsSubSubsection: -1
|
2021-12-07 20:33:12 +00:00
|
|
|
|
2022-12-09 19:43:36 +00:00
|
|
|
property var userProfile
|
2023-02-14 09:20:53 +00:00
|
|
|
property bool appIsReady: false
|
2021-12-08 21:20:43 +00:00
|
|
|
|
2023-03-24 09:48:05 +00:00
|
|
|
signal openPinnedMessagesPopupRequested(var store, var messageStore, var pinnedMessagesModel, string messageToPin, string chatId)
|
2023-02-07 14:21:32 +00:00
|
|
|
signal openCommunityProfilePopupRequested(var store, var community, var chatCommunitySectionModule)
|
2022-05-10 16:04:25 +00:00
|
|
|
|
2021-12-06 21:10:54 +00:00
|
|
|
signal openLinkInBrowser(string link)
|
|
|
|
signal openChooseBrowserPopup(string link)
|
2022-05-13 15:27:26 +00:00
|
|
|
signal openCreateChatView()
|
|
|
|
signal closeCreateChatView()
|
2021-12-09 13:28:02 +00:00
|
|
|
|
2022-09-27 21:26:26 +00:00
|
|
|
signal blockContactRequested(string publicKey, string contactName)
|
|
|
|
signal unblockContactRequested(string publicKey, string contactName)
|
|
|
|
|
2022-05-05 10:28:54 +00:00
|
|
|
signal displayToastMessage(string title, string subTitle, string icon, bool loading, int ephNotifType, string url)
|
2023-11-03 15:55:04 +00:00
|
|
|
signal displayToastWithActionMessage(string title, string subTitle, string icon, string iconColor, bool loading, int ephNotifType, int actionType, string data)
|
2021-12-08 21:20:43 +00:00
|
|
|
|
2023-02-07 14:21:32 +00:00
|
|
|
signal openPopupRequested(var popupComponent, var params)
|
2023-05-23 12:46:16 +00:00
|
|
|
signal closePopupRequested()
|
2022-12-14 14:40:50 +00:00
|
|
|
signal openNicknamePopupRequested(string publicKey, string nickname, string subtitle)
|
|
|
|
signal openDownloadModalRequested(bool available, string version, string url)
|
|
|
|
signal openChangeProfilePicPopup(var cb)
|
|
|
|
signal openBackUpSeedPopup()
|
2023-09-05 16:04:58 +00:00
|
|
|
signal openImagePopup(var image, string url)
|
2023-05-30 19:01:55 +00:00
|
|
|
signal openProfilePopupRequested(string publicKey, var parentPopup, var cb)
|
2022-12-14 14:40:50 +00:00
|
|
|
signal openEditDisplayNamePopup()
|
|
|
|
signal openActivityCenterPopupRequested()
|
|
|
|
signal openSendIDRequestPopup(string publicKey, var cb)
|
2022-10-21 13:37:39 +00:00
|
|
|
signal openContactRequestPopup(string publicKey, var cb)
|
2023-05-10 12:22:26 +00:00
|
|
|
signal removeContactRequested(string displayName, string publicKey)
|
2022-10-21 13:37:39 +00:00
|
|
|
signal openInviteFriendsToCommunityPopup(var community, var communitySectionModule, var cb)
|
|
|
|
signal openIncomingIDRequestPopup(string publicKey, var cb)
|
|
|
|
signal openOutgoingIDRequestPopup(string publicKey, var cb)
|
2023-05-19 16:07:50 +00:00
|
|
|
signal openDeleteMessagePopup(string messageId, var messageStore)
|
|
|
|
signal openDownloadImageDialog(string imageSource)
|
2023-09-12 09:26:57 +00:00
|
|
|
signal openExportControlNodePopup(var community)
|
|
|
|
signal openImportControlNodePopup(var community)
|
2023-04-19 16:28:23 +00:00
|
|
|
signal contactRenamed(string publicKey)
|
2023-11-24 08:48:50 +00:00
|
|
|
signal openTransferOwnershipPopup(string communityId,
|
|
|
|
string communityName,
|
2023-09-14 10:02:51 +00:00
|
|
|
string communityLogo,
|
|
|
|
var token,
|
|
|
|
var accounts,
|
|
|
|
var sendModalPopup)
|
2023-10-23 11:32:50 +00:00
|
|
|
signal openFinaliseOwnershipPopup(string communityId)
|
2023-10-23 11:36:33 +00:00
|
|
|
signal openDeclineOwnershipPopup(string communityId, string communityName)
|
2022-09-27 21:26:26 +00:00
|
|
|
|
2022-12-14 14:40:50 +00:00
|
|
|
signal openLink(string link)
|
2023-10-10 14:23:48 +00:00
|
|
|
signal openLinkWithConfirmation(string link, string domain)
|
2023-10-25 15:20:02 +00:00
|
|
|
signal activateDeepLink(string link)
|
2022-12-14 14:40:50 +00:00
|
|
|
|
|
|
|
signal setNthEnabledSectionActive(int nthSection)
|
2023-12-06 10:54:36 +00:00
|
|
|
signal appSectionBySectionTypeChanged(int sectionType, int subsection, int settingsSubsection)
|
2022-12-14 14:40:50 +00:00
|
|
|
|
2023-02-28 15:00:10 +00:00
|
|
|
signal openSendModal(string address)
|
|
|
|
signal switchToCommunity(string communityId)
|
2023-06-21 20:37:51 +00:00
|
|
|
signal switchToCommunitySettings(string communityId)
|
2023-04-28 10:35:18 +00:00
|
|
|
signal createCommunityPopupRequested(bool isDiscordImport)
|
|
|
|
signal importCommunityPopupRequested()
|
2023-07-21 17:21:11 +00:00
|
|
|
signal communityIntroPopupRequested(string communityId, string name, string introMessage,
|
|
|
|
string imageSrc, int accessType, bool isInvitationPending)
|
2023-11-28 13:41:11 +00:00
|
|
|
signal communityShareAddressesPopupRequested(string communityId, string name, string imageSrc)
|
2023-06-14 08:42:52 +00:00
|
|
|
signal leaveCommunityRequested(string community, string communityId, string outroMessage)
|
2023-06-21 20:37:51 +00:00
|
|
|
signal openEditSharedAddressesFlow(string communityId)
|
2023-02-28 15:00:10 +00:00
|
|
|
|
2023-02-07 14:21:32 +00:00
|
|
|
signal playSendMessageSound()
|
|
|
|
signal playNotificationSound()
|
|
|
|
signal playErrorSound()
|
|
|
|
|
2023-06-27 19:56:44 +00:00
|
|
|
signal openTestnetPopup()
|
|
|
|
|
2023-11-15 21:26:12 +00:00
|
|
|
signal popupWalletConnect()
|
|
|
|
|
2023-12-26 10:19:41 +00:00
|
|
|
signal openAddEditSavedAddressesPopup(var params)
|
|
|
|
signal openDeleteSavedAddressesPopup(var params)
|
2024-01-15 09:19:25 +00:00
|
|
|
signal openShowQRPopup(var params)
|
2023-12-26 10:19:41 +00:00
|
|
|
|
2023-05-30 19:01:55 +00:00
|
|
|
function openProfilePopup(publicKey, parentPopup, cb) {
|
|
|
|
root.openProfilePopupRequested(publicKey, parentPopup, cb)
|
2021-12-09 13:28:02 +00:00
|
|
|
}
|
2021-12-07 20:33:12 +00:00
|
|
|
|
2022-07-26 14:23:45 +00:00
|
|
|
function openActivityCenterPopup() {
|
2022-12-14 14:40:50 +00:00
|
|
|
root.openActivityCenterPopupRequested();
|
2022-07-26 14:23:45 +00:00
|
|
|
}
|
|
|
|
|
2021-12-07 20:33:12 +00:00
|
|
|
function openPopup(popupComponent, params = {}) {
|
2022-12-14 14:40:50 +00:00
|
|
|
root.openPopupRequested(popupComponent, params);
|
2021-12-07 20:33:12 +00:00
|
|
|
}
|
2021-12-06 21:10:54 +00:00
|
|
|
|
2023-05-23 12:46:16 +00:00
|
|
|
function closePopup() {
|
|
|
|
root.closePopupRequested();
|
|
|
|
}
|
|
|
|
|
2022-03-03 21:00:52 +00:00
|
|
|
function openDownloadModal(available, version, url){
|
2022-12-14 14:40:50 +00:00
|
|
|
root.openDownloadModalRequested(available, version, url);
|
2021-12-21 09:26:13 +00:00
|
|
|
}
|
|
|
|
|
2023-12-06 10:54:36 +00:00
|
|
|
function changeAppSectionBySectionType(sectionType, subsection = 0, settingsSubsection = -1) {
|
|
|
|
root.appSectionBySectionTypeChanged(sectionType, subsection, settingsSubsection)
|
2021-12-06 21:10:54 +00:00
|
|
|
}
|
2023-05-19 16:07:50 +00:00
|
|
|
|
|
|
|
function openMenu(menuComponent, menuParent, params = {}, point = undefined) {
|
|
|
|
const menu = menuComponent.createObject(menuParent, params)
|
|
|
|
if (point)
|
|
|
|
menu.popup(point)
|
|
|
|
else
|
|
|
|
menu.popup()
|
|
|
|
return menu
|
|
|
|
}
|
2022-02-01 13:10:24 +00:00
|
|
|
}
|