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
|
2021-12-08 21:20:43 +00:00
|
|
|
property bool popupOpened: false
|
2022-02-25 13:32:46 +00:00
|
|
|
property int settingsSubsection: Constants.settingsSubsection.profile
|
2021-12-07 20:33:12 +00:00
|
|
|
|
2022-12-09 19:43:36 +00:00
|
|
|
property var userProfile
|
2021-12-08 21:20:43 +00:00
|
|
|
|
2023-02-07 14:21:32 +00:00
|
|
|
signal openPinnedMessagesPopupRequested(var store, var messageStore, var pinnedMessagesModel, string messageToPin)
|
|
|
|
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)
|
2021-12-09 13:28:02 +00:00
|
|
|
signal settingsLoaded()
|
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)
|
2021-12-08 21:20:43 +00:00
|
|
|
|
2023-02-07 14:21:32 +00:00
|
|
|
signal openPopupRequested(var popupComponent, var params)
|
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()
|
|
|
|
signal openImagePopup(var image, var contextMenu)
|
|
|
|
signal openProfilePopupRequested(string publicKey, var parentPopup)
|
|
|
|
signal openEditDisplayNamePopup()
|
|
|
|
signal openActivityCenterPopupRequested()
|
|
|
|
signal openSendIDRequestPopup(string publicKey, var cb)
|
2022-10-21 13:37:39 +00:00
|
|
|
signal openContactRequestPopup(string publicKey, var cb)
|
|
|
|
signal openInviteFriendsToCommunityPopup(var community, var communitySectionModule, var cb)
|
|
|
|
signal openIncomingIDRequestPopup(string publicKey, var cb)
|
|
|
|
signal openOutgoingIDRequestPopup(string publicKey, var cb)
|
2022-09-27 21:26:26 +00:00
|
|
|
|
2022-12-14 14:40:50 +00:00
|
|
|
signal openLink(string link)
|
|
|
|
|
|
|
|
signal setNthEnabledSectionActive(int nthSection)
|
|
|
|
signal appSectionBySectionTypeChanged(int sectionType, int subsection)
|
|
|
|
|
2023-02-07 14:21:32 +00:00
|
|
|
signal playSendMessageSound()
|
|
|
|
signal playNotificationSound()
|
|
|
|
signal playErrorSound()
|
|
|
|
|
2022-09-27 21:26:26 +00:00
|
|
|
function openProfilePopup(publicKey, parentPopup) {
|
2022-12-14 14:40:50 +00:00
|
|
|
root.openProfilePopupRequested(publicKey, parentPopup)
|
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
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2022-02-25 13:32:46 +00:00
|
|
|
function changeAppSectionBySectionType(sectionType, subsection = 0) {
|
2022-12-14 14:40:50 +00:00
|
|
|
root.appSectionBySectionTypeChanged(sectionType, subsection);
|
2021-12-06 21:10:54 +00:00
|
|
|
}
|
2022-02-01 13:10:24 +00:00
|
|
|
}
|