[Popups]: added destroy() function in all popups by default

Also switched StatusModal to derive from StatusDialog instead
of Popup type

Closes #10149
This commit is contained in:
Patryk Osmaczko 2023-05-23 14:46:16 +02:00 committed by Alexandra Betouni
parent cbe290a735
commit 35a2dd5244
77 changed files with 313 additions and 299 deletions

View File

@ -89,32 +89,32 @@ Column {
StatusModal { StatusModal {
id: simpleModal id: simpleModal
anchors.centerIn: parent anchors.centerIn: parent
header.title: "Some Title" headerSettings.title: "Some Title"
header.subTitle: "Subtitle" headerSettings.subTitle: "Subtitle"
} }
StatusModal { StatusModal {
id: simpleTitleModal id: simpleTitleModal
anchors.centerIn: parent anchors.centerIn: parent
header.title: "Some Title" headerSettings.title: "Some Title"
} }
StatusModal { StatusModal {
id: headerImageModal id: headerImageModal
anchors.centerIn: parent anchors.centerIn: parent
header.title: "Some Title" headerSettings.title: "Some Title"
header.subTitle: "Subtitle" headerSettings.subTitle: "Subtitle"
header.asset.isImage: true headerSettings.asset.isImage: true
header.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg" headerSettings.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
} }
StatusModal { StatusModal {
id: footerButtonsModal id: footerButtonsModal
anchors.centerIn: parent anchors.centerIn: parent
header.title: "Some Title" headerSettings.title: "Some Title"
header.subTitle: "Subtitle" headerSettings.subTitle: "Subtitle"
header.asset.isImage: true headerSettings.asset.isImage: true
header.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg" headerSettings.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
leftButtons: [ leftButtons: [
StatusBackButton { } StatusBackButton { }
] ]
@ -131,10 +131,10 @@ Column {
StatusModal { StatusModal {
id: headerActionButtonModal id: headerActionButtonModal
anchors.centerIn: parent anchors.centerIn: parent
header.title: "Some Title" headerSettings.title: "Some Title"
header.subTitle: "Subtitle" headerSettings.subTitle: "Subtitle"
header.asset.isImage: true headerSettings.asset.isImage: true
header.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg" headerSettings.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
headerActionButton: StatusFlatRoundButton { headerActionButton: StatusFlatRoundButton {
type: StatusFlatRoundButton.Type.Secondary type: StatusFlatRoundButton.Type.Secondary
@ -162,10 +162,10 @@ Column {
StatusModal { StatusModal {
id: modalExample id: modalExample
anchors.centerIn: parent anchors.centerIn: parent
header.asset.isImage: true headerSettings.asset.isImage: true
header.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg" headerSettings.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
header.title: "Header" headerSettings.title: "Header"
header.subTitle: "SubTitle" headerSettings.subTitle: "SubTitle"
rightButtons: [ rightButtons: [
StatusButton { StatusButton {
text: "Button" text: "Button"
@ -200,8 +200,8 @@ Column {
StatusModal { StatusModal {
id: modalWithContentAccess id: modalWithContentAccess
anchors.centerIn: parent anchors.centerIn: parent
header.title: "Header" headerSettings.title: "Header"
header.subTitle: "SubTitle" headerSettings.subTitle: "SubTitle"
contentItem: StatusBaseText { contentItem: StatusBaseText {
id: text id: text
@ -224,10 +224,10 @@ Column {
StatusModal { StatusModal {
id: modalWithLetterIdenticon id: modalWithLetterIdenticon
anchors.centerIn: parent anchors.centerIn: parent
header.title: "Header" headerSettings.title: "Header"
header.subTitle: "SubTitle" headerSettings.subTitle: "SubTitle"
header.asset.isLetterIdenticon: true headerSettings.asset.isLetterIdenticon: true
header.asset.bgColor: "red" headerSettings.asset.bgColor: "red"
contentItem: StatusBaseText { contentItem: StatusBaseText {
anchors.centerIn: parent anchors.centerIn: parent
@ -249,11 +249,11 @@ Column {
StatusModal { StatusModal {
id: modalWithIdenticon id: modalWithIdenticon
anchors.centerIn: parent anchors.centerIn: parent
header.title: "Header" headerSettings.title: "Header"
header.subTitle: "SubTitle" headerSettings.subTitle: "SubTitle"
header.asset.name: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/ headerSettings.asset.name: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC" nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
header.asset.imgIsIdenticon: true headerSettings.asset.imgIsIdenticon: true
contentItem: StatusBaseText { contentItem: StatusBaseText {
anchors.centerIn: parent anchors.centerIn: parent
@ -275,12 +275,12 @@ Column {
StatusModal { StatusModal {
id: modalWithEditableIdenticon id: modalWithEditableIdenticon
anchors.centerIn: parent anchors.centerIn: parent
header.title: "Header" headerSettings.title: "Header"
header.subTitle: "SubTitle" headerSettings.subTitle: "SubTitle"
header.headerImageEditable: true headerSettings.headerImageEditable: true
header.asset.name: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/ headerSettings.asset.name: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC" nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
header.asset.imgIsIdenticon: true headerSettings.asset.imgIsIdenticon: true
contentItem: StatusBaseText { contentItem: StatusBaseText {
anchors.centerIn: parent anchors.centerIn: parent
@ -302,12 +302,12 @@ Column {
StatusModal { StatusModal {
id: modalWithLongTitles id: modalWithLongTitles
anchors.centerIn: parent anchors.centerIn: parent
header.title: "Some super long text here that exceeds the available space" headerSettings.title: "Some super long text here that exceeds the available space"
header.subTitle: "Some super long text here that exceeds the available space" headerSettings.subTitle: "Some super long text here that exceeds the available space"
header.subTitleElide: Text.ElideMiddle headerSettings.subTitleElide: Text.ElideMiddle
header.asset.name: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/ headerSettings.asset.name: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC" nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
header.asset.imgIsIdenticon: true headerSettings.asset.imgIsIdenticon: true
contentItem: StatusBaseText { contentItem: StatusBaseText {
anchors.centerIn: parent anchors.centerIn: parent
@ -329,9 +329,9 @@ Column {
StatusModal { StatusModal {
id: modalWithHeaderPopupMenu id: modalWithHeaderPopupMenu
anchors.centerIn: parent anchors.centerIn: parent
header.title: "helloworld.eth" headerSettings.title: "helloworld.eth"
header.subTitle: "Basic address" headerSettings.subTitle: "Basic address"
header.popupMenu: StatusMenu { headerSettings.popupMenu: StatusMenu {
id: popupMenu id: popupMenu
StatusMenuInstantiator { StatusMenuInstantiator {
@ -351,8 +351,8 @@ Column {
StatusModal { StatusModal {
id: editTitleModal id: editTitleModal
anchors.centerIn: parent anchors.centerIn: parent
header.title: "This title can be edited" headerSettings.title: "This title can be edited"
header.editable: true headerSettings.editable: true
} }
StatusModal { StatusModal {

View File

@ -11,10 +11,10 @@ StatusModal {
anchors.centerIn: parent anchors.centerIn: parent
header.title: "Cryptokitties" headerSettings.title: "Cryptokitties"
header.subTitle: "Public Community" headerSettings.subTitle: "Public Community"
header.asset.isImage: true headerSettings.asset.isImage: true
header.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg" headerSettings.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
contentItem: Column { contentItem: Column {
width: root.width width: root.width

View File

@ -8,7 +8,7 @@ import StatusQ.Core.Theme 0.1
StatusModal { StatusModal {
id: root id: root
header.title: "Contact Requests" headerSettings.title: "Contact Requests"
headerActionButton: StatusFlatRoundButton { headerActionButton: StatusFlatRoundButton {
type: StatusFlatRoundButton.Type.Secondary type: StatusFlatRoundButton.Type.Secondary
width: 32 width: 32

View File

@ -189,7 +189,7 @@ Item {
StatusModal { StatusModal {
id: imageCropperModal id: imageCropperModal
header.title: workflowItem.title headerSettings.title: workflowItem.title
anchors.centerIn: Overlay.overlay anchors.centerIn: Overlay.overlay

View File

@ -146,7 +146,7 @@ Item {
width: parent.width width: parent.width
model: SortFilterProxyModel { model: SortFilterProxyModel {
sourceModel: root.accounts sourceModel: !!root.accounts ? root.accounts : null
filters: [ filters: [
ValueFilter { ValueFilter {
roleName: "walletType" roleName: "walletType"

View File

@ -11,6 +11,16 @@ Dialog {
id: root id: root
property string subtitle property string subtitle
/*!
\qmlproperty destroyOnClose
This property decides whether the popup component should be destroyed when closed. Default value is true.
*/
property bool destroyOnClose: true
/*!
\qmlproperty color backgroundColor
This property decides the modal background color
*/
property string backgroundColor: Theme.palette.statusModal.backgroundColor
anchors.centerIn: Overlay.overlay anchors.centerIn: Overlay.overlay
@ -24,7 +34,9 @@ Dialog {
color: Theme.palette.backdropColor color: Theme.palette.backdropColor
} }
background: StatusDialogBackground {} background: StatusDialogBackground {
color: root.backgroundColor
}
header: StatusDialogHeader { header: StatusDialogHeader {
visible: root.title || root.subtitle visible: root.title || root.subtitle
@ -101,4 +113,9 @@ Dialog {
} }
} }
} }
onClosed: {
if (root.destroyOnClose)
root.destroy();
}
} }

View File

@ -1,9 +1,10 @@
import QtQuick 2.14 import QtQuick 2.14
import QtQuick.Controls 2.14 as QC import QtQuick.Controls 2.14
import StatusQ.Core 0.1 import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1 import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1 import StatusQ.Controls 0.1
import StatusQ.Popups.Dialog 0.1
import "statusModal" as Spares import "statusModal" as Spares
@ -19,8 +20,8 @@ import "statusModal" as Spares
\qml \qml
StatusModal { StatusModal {
anchors.centerIn: parent anchors.centerIn: parent
header.title: "Some Title" headerSettings.title: "Some Title"
header.subTitle: "Subtitle" headerSettings.subTitle: "Subtitle"
headerActionButton: StatusFlatRoundButton { headerActionButton: StatusFlatRoundButton {
type: StatusFlatRoundButton.Type.Secondary type: StatusFlatRoundButton.Type.Secondary
width: 32 width: 32
@ -50,9 +51,7 @@ import "statusModal" as Spares
For a list of components available see StatusQ. For a list of components available see StatusQ.
*/ */
// Deprecation annotations come with Qt6.2 StatusDialog {
// @Deprecated { reason: "Use StatusDialog instead, see reasoning: https://github.com/status-im/StatusQ/issues/720" }
QC.Popup {
id: root id: root
/*! /*!
@ -135,7 +134,7 @@ QC.Popup {
type: StatusModalHeaderSettings type: StatusModalHeaderSettings
This property exposes the different properties of the standard header. This property exposes the different properties of the standard header.
*/ */
property StatusModalHeaderSettings header: StatusModalHeaderSettings {} property StatusModalHeaderSettings headerSettings: StatusModalHeaderSettings {}
/*! /*!
\qmlproperty rightButtons \qmlproperty rightButtons
This property helps user assign the right buttons on the footer. This property helps user assign the right buttons on the footer.
@ -182,17 +181,16 @@ QC.Popup {
This property decides whether the advanced header has floating buttons on top of the Modal This property decides whether the advanced header has floating buttons on top of the Modal
*/ */
property bool hasFloatingButtons: false property bool hasFloatingButtons: false
/*! /*!
\qmlproperty color backgroundColor \qmlproperty destroyOnClose
This property decides the modal background color This property decides whether the popup component should be destroyed when closed. Default value is true.
*/ */
property string backgroundColor: Theme.palette.statusModal.backgroundColor property bool destroyOnClose: true
signal editButtonClicked() signal editButtonClicked()
signal headerImageClicked() signal headerImageClicked()
parent: QC.Overlay.overlay
width: 480 width: 480
padding: 0 padding: 0
@ -201,18 +199,7 @@ QC.Popup {
leftPadding: padding leftPadding: padding
rightPadding: padding rightPadding: padding
margins: 64 header: Item {
modal: true
QC.Overlay.modal: Rectangle {
color: Theme.palette.backdropColor
}
background: Rectangle {
color: root.backgroundColor
radius: 8
Spares.StatusModalHeader { Spares.StatusModalHeader {
id: headerImpl id: headerImpl
anchors.top: parent.top anchors.top: parent.top
@ -220,14 +207,14 @@ QC.Popup {
height: visible ? implicitHeight : 0 height: visible ? implicitHeight : 0
visible: root.showHeader visible: root.showHeader
title: header.title title: headerSettings.title
titleElide: header.titleElide titleElide: headerSettings.titleElide
subTitle: header.subTitle subTitle: headerSettings.subTitle
subTitleElide: header.subTitleElide subTitleElide: headerSettings.subTitleElide
asset: header.asset asset: headerSettings.asset
popupMenu: header.popupMenu popupMenu: headerSettings.popupMenu
headerImageEditable: header.headerImageEditable headerImageEditable: headerSettings.headerImageEditable
editable: header.editable editable: headerSettings.editable
onEditButtonClicked: root.editButtonClicked() onEditButtonClicked: root.editButtonClicked()
onHeaderImageClicked: root.headerImageClicked() onHeaderImageClicked: root.headerImageClicked()
@ -241,7 +228,9 @@ QC.Popup {
width: visible ? parent.width : 0 width: visible ? parent.width : 0
active: root.showAdvancedHeader active: root.showAdvancedHeader
} }
}
footer: Item {
Spares.StatusModalFooter { Spares.StatusModalFooter {
id: footerImpl id: footerImpl
anchors.bottom: parent.bottom anchors.bottom: parent.bottom

View File

@ -13,7 +13,6 @@ StatusModal {
id: root id: root
width: 700 width: 700
height: !!searchResults && searchResults.count >= 0 && searchText !== "" ? 560 : 122 height: !!searchResults && searchResults.count >= 0 && searchText !== "" ? 560 : 122
anchors.centerIn: parent
showHeader: false showHeader: false
showFooter: false showFooter: false

View File

@ -63,7 +63,7 @@ StatusModal {
onCurrentIndexChanged: updateRightButtons() onCurrentIndexChanged: updateRightButtons()
onReplaceItemChanged: updateRightButtons() onReplaceItemChanged: updateRightButtons()
header.title: replaceLoader.item && typeof(replaceLoader.item.title) != "undefined" headerSettings.title: replaceLoader.item && typeof(replaceLoader.item.title) != "undefined"
? replaceLoader.item.title : stackTitle ? replaceLoader.item.title : stackTitle
padding: 16 padding: 16

View File

@ -204,6 +204,8 @@ StatusSectionLayout {
BrowserHeader { BrowserHeader {
id: browserHeader id: browserHeader
property bool walletMenuPopupOpen: false
anchors.top: parent.top anchors.top: parent.top
anchors.topMargin: tabs.tabHeight + tabs.anchors.topMargin anchors.topMargin: tabs.tabHeight + tabs.anchors.topMargin
z: 52 z: 52
@ -212,7 +214,6 @@ StatusSectionLayout {
dappBrowserAccName: WalletStore.dappBrowserAccount.name dappBrowserAccName: WalletStore.dappBrowserAccount.name
dappBrowserAccIcon: WalletStore.dappBrowserAccount.color dappBrowserAccIcon: WalletStore.dappBrowserAccount.color
settingMenu: settingsMenu settingMenu: settingsMenu
walletMenu: browserWalletMenu
currentUrl: !!_internal.currentWebView ? _internal.currentWebView.url : "" currentUrl: !!_internal.currentWebView ? _internal.currentWebView.url : ""
isLoading: (!!_internal.currentWebView && _internal.currentWebView.loading) isLoading: (!!_internal.currentWebView && _internal.currentWebView.loading)
canGoBack: (!!_internal.currentWebView && _internal.currentWebView.canGoBack) canGoBack: (!!_internal.currentWebView && _internal.currentWebView.canGoBack)
@ -248,6 +249,10 @@ StatusSectionLayout {
} }
_internal.currentWebView.url = _internal.determineRealURL(url); _internal.currentWebView.url = _internal.determineRealURL(url);
} }
onOpenWalletMenu: {
walletMenuPopupOpen ? Global.closePopup() : Global.openPopup(browserWalletMenu);
walletMenuPopupOpen = !walletMenuPopupOpen;
}
} }
BrowserTabView { BrowserTabView {
@ -423,25 +428,32 @@ StatusSectionLayout {
Global.changeAppSectionBySectionType(Constants.appSection.profile, Constants.settingsSubsection.browserSettings); Global.changeAppSectionBySectionType(Constants.appSection.profile, Constants.settingsSubsection.browserSettings);
} }
} }
Component {
BrowserWalletMenu {
id: browserWalletMenu id: browserWalletMenu
y: browserHeader.height + browserHeader.anchors.topMargin BrowserWalletMenu {
x: parent.width - width - Style.current.halfPadding property point headerPoint: Qt.point(browserHeader.x, browserHeader.y)
onSendTriggered: { x: (parent.width - width - Style.current.halfPadding)
sendTransactionModal.selectedAccount = selectedAccount y: (Math.abs(browserHeader.mapFromGlobal(headerPoint).y) +
sendTransactionModal.open() browserHeader.anchors.topMargin + Style.current.halfPadding)
} onSendTriggered: {
onReload: { sendTransactionModal.selectedAccount = selectedAccount
for (let i = 0; i < tabs.count; ++i){ sendTransactionModal.open()
tabs.getTab(i).item.reload(); }
onReload: {
for (let i = 0; i < tabs.count; ++i){
tabs.getTab(i).item.reload();
}
}
onDisconnect: {
Web3ProviderStore.disconnect(Utils.getHostname(browserHeader.addressBar.text))
provider.postMessage("web3-disconnect-account", "{}");
_internal.currentWebView.reload()
close()
}
Component.onDestruction: {
if (browserHeader.walletMenuPopupOpen)
browserHeader.walletMenuPopupOpen = false;
} }
}
onDisconnect: {
Web3ProviderStore.disconnect(Utils.getHostname(browserHeader.addressBar.text))
provider.postMessage("web3-disconnect-account", "{}");
_internal.currentWebView.reload()
close()
} }
} }
} }

View File

@ -15,7 +15,7 @@ import "../popups"
import "../controls" import "../controls"
Rectangle { Rectangle {
id: browserHeader id: root
property alias favoriteComponent: favoritesBarLoader.sourceComponent property alias favoriteComponent: favoritesBarLoader.sourceComponent
property alias addressBar: addressBar property alias addressBar: addressBar
@ -29,7 +29,6 @@ Rectangle {
property string dappBrowserAccName: "" property string dappBrowserAccName: ""
property string dappBrowserAccIcon: "" property string dappBrowserAccIcon: ""
property var settingMenu property var settingMenu
property var walletMenu
signal addNewFavoritelClicked(var xPos) signal addNewFavoritelClicked(var xPos)
signal launchInBrowser(var url) signal launchInBrowser(var url)
@ -38,6 +37,7 @@ Rectangle {
signal goBack() signal goBack()
signal reload() signal reload()
signal stopLoading() signal stopLoading()
signal openWalletMenu()
QtObject { QtObject {
id: _internal id: _internal
@ -129,7 +129,7 @@ Rectangle {
anchors.right: reloadBtn.left anchors.right: reloadBtn.left
anchors.rightMargin: Style.current.halfPadding anchors.rightMargin: Style.current.halfPadding
visible: !!currentUrl visible: !!currentUrl
icon.source: !!browserHeader.currentFavorite ? Style.svg("browser/favoriteActive") : Style.svg("browser/favorite") icon.source: !!root.currentFavorite ? Style.svg("browser/favoriteActive") : Style.svg("browser/favorite")
color: "transparent" color: "transparent"
type: StatusFlatRoundButton.Type.Tertiary type: StatusFlatRoundButton.Type.Tertiary
onClicked: addNewFavoritelClicked(addFavoriteBtn.x) onClicked: addNewFavoritelClicked(addFavoriteBtn.x)
@ -150,6 +150,8 @@ Rectangle {
} }
Loader { Loader {
Layout.preferredWidth: 44
Layout.preferredHeight: 44
active: true active: true
sourceComponent: currentTabConnected ? connectedBtnComponent : notConnectedBtnCompoent sourceComponent: currentTabConnected ? connectedBtnComponent : notConnectedBtnCompoent
} }
@ -164,12 +166,8 @@ Rectangle {
icon.height: 24 icon.height: 24
icon.name: "filled-account" icon.name: "filled-account"
type: StatusFlatRoundButton.Type.Tertiary type: StatusFlatRoundButton.Type.Tertiary
onClicked: { onPressed: {
if (walletMenu.opened) { root.openWalletMenu()
walletMenu.close()
} else {
walletMenu.open()
}
} }
} }
} }
@ -183,12 +181,8 @@ Rectangle {
icon.height: 18 icon.height: 18
icon.color: dappBrowserAccIcon icon.color: dappBrowserAccIcon
text: dappBrowserAccName text: dappBrowserAccName
onClicked: { onPressed: {
if (walletMenu.opened) { root.openWalletMenu();
walletMenu.close()
} else {
walletMenu.open()
}
} }
} }
} }

View File

@ -13,7 +13,7 @@ import utils 1.0
import "../stores" import "../stores"
// TODO: replace with StatusMenu // TODO: replace with StatusMenu
Popup { Dialog {
id: popup id: popup
signal sendTriggered(var selectedAccount) signal sendTriggered(var selectedAccount)
@ -212,4 +212,7 @@ Popup {
} }
} }
} }
onClosed: {
popup.destroy();
}
} }

View File

@ -35,7 +35,7 @@ StatusModal {
anchors.centerIn: parent anchors.centerIn: parent
id: root id: root
header.title: qsTr("Signature request") headerSettings.title: qsTr("Signature request")
height: 504 height: 504
onClosed: { onClosed: {

View File

@ -286,5 +286,8 @@ Item {
onCountChanged: currentIndex = 0 onCountChanged: currentIndex = 0
} }
} }
onClosed: {
suggestionsDialog.destroy();
}
} }
} }

View File

@ -204,7 +204,7 @@ SettingsPageLayout {
anchors.centerIn: parent anchors.centerIn: parent
width: 400 width: 400
header.title: qsTr("Ban %1").arg(userNameToBan) headerSettings.title: qsTr("Ban %1").arg(userNameToBan)
contentItem: StatusBaseText { contentItem: StatusBaseText {
id: banContentText id: banContentText
@ -245,7 +245,7 @@ SettingsPageLayout {
anchors.centerIn: parent anchors.centerIn: parent
width: 400 width: 400
header.title: qsTr("Kick %1").arg(userNameToKick) headerSettings.title: qsTr("Kick %1").arg(userNameToKick)
contentItem: StatusBaseText { contentItem: StatusBaseText {
id: kickContentText id: kickContentText

View File

@ -24,7 +24,7 @@ StatusModal {
id: root id: root
anchors.centerIn: parent anchors.centerIn: parent
header.title: root.commandTitle headerSettings.title: root.commandTitle
height: 504 height: 504
property alias selectRecipient: selectRecipient property alias selectRecipient: selectRecipient
@ -40,7 +40,7 @@ StatusModal {
anchors.rightMargin: Style.current.padding anchors.rightMargin: Style.current.padding
onGroupActivated: { onGroupActivated: {
root.header.title = group.headerText root.headerSettings.title = group.headerText
btnNext.text = group.footerText btnNext.text = group.footerText
} }
TransactionFormGroup { TransactionFormGroup {

View File

@ -24,12 +24,12 @@ StatusModal {
} }
} }
header.title: contentItem.currentItem.headerTitle headerSettings.title: contentItem.currentItem.headerTitle
header.subTitle: contentItem.currentItem.headerSubtitle || "" headerSettings.subTitle: contentItem.currentItem.headerSubtitle || ""
header.asset.name: contentItem.currentItem.headerImageSource || "" headerSettings.asset.name: contentItem.currentItem.headerImageSource || ""
header.asset.isImage: !!contentItem.currentItem.headerImageSource headerSettings.asset.isImage: !!contentItem.currentItem.headerImageSource
header.asset.isLetterIdenticon: contentItem.currentItem.headerTitle === root.community.name && !contentItem.currentItem.headerImageSource headerSettings.asset.isLetterIdenticon: contentItem.currentItem.headerTitle === root.community.name && !contentItem.currentItem.headerImageSource
header.asset.bgColor: root.community.color headerSettings.asset.bgColor: root.community.color
contentItem: StackView { contentItem: StackView {
id: stack id: stack
@ -77,9 +77,6 @@ StatusModal {
id: transferOwnershiproot id: transferOwnershiproot
TransferOwnershipPopup { TransferOwnershipPopup {
anchors.centerIn: parent anchors.centerIn: parent
onClosed: {
destroy()
}
} }
} }

View File

@ -42,7 +42,7 @@ StatusModal {
return contentItem.categoryName.valid return contentItem.categoryName.valid
} }
header.title: isEdit ? qsTr("Edit category") : qsTr("New category") headerSettings.title: isEdit ? qsTr("Edit category") : qsTr("New category")
contentItem: Column { contentItem: Column {
property alias categoryName: nameInput property alias categoryName: nameInput
@ -196,7 +196,7 @@ StatusModal {
text: qsTr("Delete Category") text: qsTr("Delete Category")
onClicked: { onClicked: {
Global.openPopup(deleteCategoryConfirmationDialogComponent, { Global.openPopup(deleteCategoryConfirmationDialogComponent, {
"header.title": qsTr("Delete '%1' category").arg(nameInput.text), "headerSettings.title": qsTr("Delete '%1' category").arg(nameInput.text),
confirmationText: qsTr("Are you sure you want to delete '%1' category? Channels inside the category wont be deleted.").arg(nameInput.text) confirmationText: qsTr("Are you sure you want to delete '%1' category? Channels inside the category wont be deleted.").arg(nameInput.text)
}) })
} }

View File

@ -201,7 +201,7 @@ StatusDialog {
id: colorDialog id: colorDialog
anchors.centerIn: parent anchors.centerIn: parent
property bool colorSelected: root.isEdit && root.channelColor property bool colorSelected: root.isEdit && root.channelColor
header.title: qsTr("Channel Colour") headerSettings.title: qsTr("Channel Colour")
color: root.isEdit && root.channelColor ? root.channelColor : color: root.isEdit && root.channelColor ? root.channelColor :
Theme.palette.primaryColor1 Theme.palette.primaryColor1
onAccepted: colorSelected = true onAccepted: colorSelected = true

View File

@ -155,7 +155,7 @@ Item {
sendChatCommand: root.requestAddressForTransaction sendChatCommand: root.requestAddressForTransaction
isRequested: false isRequested: false
commandTitle: qsTr("Send") commandTitle: qsTr("Send")
header.title: commandTitle headerSettings.title: commandTitle
finalButtonLabel: qsTr("Request Address") finalButtonLabel: qsTr("Request Address")
selectRecipient.selectedRecipient: { selectRecipient.selectedRecipient: {
parentModule.prepareChatContentModuleForChatId(activeChatId) parentModule.prepareChatContentModuleForChatId(activeChatId)
@ -187,7 +187,7 @@ Item {
sendChatCommand: root.requestTransaction sendChatCommand: root.requestTransaction
isRequested: true isRequested: true
commandTitle: qsTr("Request") commandTitle: qsTr("Request")
header.title: commandTitle headerSettings.title: commandTitle
finalButtonLabel: qsTr("Request") finalButtonLabel: qsTr("Request")
selectRecipient.selectedRecipient: { selectRecipient.selectedRecipient: {
parentModule.prepareChatContentModuleForChatId(activeChatId) parentModule.prepareChatContentModuleForChatId(activeChatId)

View File

@ -257,7 +257,7 @@ StatusMenu {
ConfirmationDialog { ConfirmationDialog {
confirmButtonObjectName: "deleteChatConfirmationDialogDeleteButton" confirmButtonObjectName: "deleteChatConfirmationDialogDeleteButton"
btnType: "warn" btnType: "warn"
header.title: root.isCommunityChat ? qsTr("Delete #%1").arg(root.chatName) : headerSettings.title: root.isCommunityChat ? qsTr("Delete #%1").arg(root.chatName) :
root.chatType === Constants.chatType.oneToOne ? root.chatType === Constants.chatType.oneToOne ?
qsTr("Delete chat") : qsTr("Delete chat") :
qsTr("Leave chat") qsTr("Leave chat")

View File

@ -87,7 +87,7 @@ StatusScrollView {
ConfirmationDialog { ConfirmationDialog {
id: declineAllDialog id: declineAllDialog
header.title: qsTr("Sure you want to delete permission") headerSettings.title: qsTr("Sure you want to delete permission")
confirmationText: qsTr("If you delete this permission, any of your community members who rely on this permission will lose the access this permission gives them.") confirmationText: qsTr("If you delete this permission, any of your community members who rely on this permission will lose the access this permission gives them.")
onConfirmButtonClicked: { onConfirmButtonClicked: {

View File

@ -338,7 +338,7 @@ StatusScrollView {
id: cancelConfirmationPopupCmp id: cancelConfirmationPopupCmp
ConfirmationDialog { ConfirmationDialog {
id: cancelConfirmationPopup id: cancelConfirmationPopup
header.title: qsTr("Are you sure you want to cancel the import?") headerSettings.title: qsTr("Are you sure you want to cancel the import?")
confirmationText: qsTr("Your new Status community will be deleted and all information entered will be lost.") confirmationText: qsTr("Your new Status community will be deleted and all information entered will be lost.")
showCancelButton: true showCancelButton: true
cancelBtnType: "default" cancelBtnType: "default"

View File

@ -182,10 +182,10 @@ following the \"Add existing Status user\" flow, using your seed phrase.")
} }
function onDisplayKeycardSharedModuleFlow() { function onDisplayKeycardSharedModuleFlow() {
keycardPopup.active = true Global.openPopup(keycardPopup);
} }
function onDestroyKeycardSharedModuleFlow() { function onDestroyKeycardSharedModuleFlow() {
keycardPopup.active = false Global.closePopup();
} }
} }
@ -339,16 +339,11 @@ following the \"Add existing Status user\" flow, using your seed phrase.")
} }
} }
Loader { Component {
id: keycardPopup id: keycardPopup
active: false KeycardPopup {
sourceComponent: KeycardPopup {
anchors.centerIn: parent anchors.centerIn: parent
sharedKeycardModule: root.startupStore.startupModuleInst.keycardSharedModule sharedKeycardModule: root.startupStore.startupModuleInst.keycardSharedModule
} }
onLoaded: {
keycardPopup.item.open()
}
} }
} }

View File

@ -22,7 +22,7 @@ StatusModal {
signal submitBtnClicked(string pin) signal submitBtnClicked(string pin)
id: popup id: popup
header.title: qsTr("Create PIN") headerSettings.title: qsTr("Create PIN")
anchors.centerIn: parent anchors.centerIn: parent
height: 500 height: 500

View File

@ -30,7 +30,7 @@ RadioButtonSelector {
Component { Component {
id: confirmDialogComponent id: confirmDialogComponent
ConfirmationDialog { ConfirmationDialog {
header.title: qsTr("Warning!") headerSettings.title: qsTr("Warning!")
confirmationText: qsTr("Change fleet to %1").arg(root.newFleet) confirmationText: qsTr("Change fleet to %1").arg(root.newFleet)
onConfirmButtonClicked: { onConfirmButtonClicked: {
root.advancedStore.setFleet(root.newFleet) root.advancedStore.setFleet(root.newFleet)

View File

@ -78,7 +78,7 @@ StatusListView {
property string communityId: "" property string communityId: ""
anchors.centerIn: parent anchors.centerIn: parent
header.title: qsTr("Leave %1").arg(community) headerSettings.title: qsTr("Leave %1").arg(community)
contentItem: Item { contentItem: Item {
implicitWidth: 368 implicitWidth: 368
implicitHeight: msg.implicitHeight + 32 implicitHeight: msg.implicitHeight + 32

View File

@ -22,7 +22,7 @@ StatusStackModal {
anchors.centerIn: parent anchors.centerIn: parent
padding: currentIndex === 0 ? 0 : Style.current.padding padding: currentIndex === 0 ? 0 : Style.current.padding
header.title: qsTr("Add more links") headerSettings.title: qsTr("Add more links")
rightButtons: [finishButton] rightButtons: [finishButton]
finishButton: StatusButton { finishButton: StatusButton {
text: qsTr("Add") text: qsTr("Add")

View File

@ -20,7 +20,7 @@ StatusModal {
anchors.centerIn: parent anchors.centerIn: parent
height: 560 height: 560
padding: 8 padding: 8
header.title: qsTr("Waku nodes") headerSettings.title: qsTr("Waku nodes")
onClosed: { onClosed: {
destroy() destroy()

View File

@ -17,7 +17,7 @@ StatusModal {
anchors.centerIn: parent anchors.centerIn: parent
height: 560 height: 560
padding: 8 padding: 8
header.title: qsTr("Waku nodes") headerSettings.title: qsTr("Waku nodes")
property var messagingStore property var messagingStore
property var advancedStore property var advancedStore

View File

@ -62,7 +62,7 @@ StatusStackModal {
implicitHeight: 748 implicitHeight: 748
width: 480 width: 480
header.title: qsTr("Back up your seed phrase") headerSettings.title: qsTr("Back up your seed phrase")
rightButtons: [ d.skipButton, nextButton, finishButton ] rightButtons: [ d.skipButton, nextButton, finishButton ]
nextButton: StatusButton { nextButton: StatusButton {

View File

@ -64,7 +64,7 @@ StatusModal {
height: 546 height: 546
closePolicy: submitBtn.loading? Popup.NoAutoClose : Popup.CloseOnEscape | Popup.CloseOnPressOutside closePolicy: submitBtn.loading? Popup.NoAutoClose : Popup.CloseOnEscape | Popup.CloseOnPressOutside
hasCloseButton: !submitBtn.loading hasCloseButton: !submitBtn.loading
header.title: qsTr("Change password") headerSettings.title: qsTr("Change password")
onOpened: view.reset() onOpened: view.reset()

View File

@ -28,8 +28,8 @@ StatusModal {
globalMentions: Constants.settingsSection.notifications.sendAlertsValue, globalMentions: Constants.settingsSection.notifications.sendAlertsValue,
otherMessages: Constants.settingsSection.notifications.turnOffValue otherMessages: Constants.settingsSection.notifications.turnOffValue
}) })
header.title: qsTr("%1 exemption").arg(root.item.name) headerSettings.title: qsTr("%1 exemption").arg(root.item.name)
header.asset: StatusAssetSettings { headerSettings.asset: StatusAssetSettings {
// Once we introduce StatusSmartIdenticon in popup header, we should use the folowing // Once we introduce StatusSmartIdenticon in popup header, we should use the folowing
// color: root.item.type === Constants.settingsSection.exemptions.oneToOneChat? // color: root.item.type === Constants.settingsSection.exemptions.oneToOneChat?
// Theme.palette.userCustomizationColors[Utils.colorIdForPubkey(root.item.itemId)] : // Theme.palette.userCustomizationColors[Utils.colorIdForPubkey(root.item.itemId)] :

View File

@ -23,7 +23,7 @@ StatusModal {
property var account property var account
property var emojiPopup property var emojiPopup
header.title: qsTr("Rename %1").arg(popup.account.name) headerSettings.title: qsTr("Rename %1").arg(popup.account.name)
property int marginBetweenInputs: 30 property int marginBetweenInputs: 30

View File

@ -15,7 +15,7 @@ StatusModal {
property var contactsStore property var contactsStore
header.title: qsTr("Send Contact Request to chat key") headerSettings.title: qsTr("Send Contact Request to chat key")
QtObject { QtObject {
id: d id: d

View File

@ -23,7 +23,7 @@ StatusModal {
anchors.centerIn: parent anchors.centerIn: parent
height: 560 height: 560
padding: 8 padding: 8
header.title: qsTr("Waku nodes") headerSettings.title: qsTr("Waku nodes")
property var messagingStore property var messagingStore
property var advancedStore property var advancedStore

View File

@ -23,7 +23,7 @@ StatusModal {
anchors.centerIn: parent anchors.centerIn: parent
height: 560 height: 560
padding: 8 padding: 8
header.title: qsTr("History Nodes") headerSettings.title: qsTr("History Nodes")
property var messagingStore property var messagingStore
property var advancedStore property var advancedStore

View File

@ -204,7 +204,7 @@ SettingsContentBase {
property string mode: "normal" property string mode: "normal"
id: confirmDialog id: confirmDialog
header.title: qsTr("Warning!") headerSettings.title: qsTr("Warning!")
confirmationText: qsTr("The account will be logged out. When you login again, the selected mode will be enabled") confirmationText: qsTr("The account will be logged out. When you login again, the selected mode will be enabled")
onConfirmButtonClicked: { onConfirmButtonClicked: {
root.advancedStore.setBloomLevel(mode) root.advancedStore.setBloomLevel(mode)
@ -549,7 +549,7 @@ SettingsContentBase {
onClosed: destroy() onClosed: destroy()
anchors.centerIn: parent anchors.centerIn: parent
width: 400 width: 400
header.title: qsTr("How many log files do you want to keep archived?") headerSettings.title: qsTr("How many log files do you want to keep archived?")
contentItem: Column { contentItem: Column {
width: parent.width width: parent.width

View File

@ -29,7 +29,7 @@ SettingsContentBase {
objectName: "ContactsView_ContactRequest_Button" objectName: "ContactsView_ContactRequest_Button"
text: qsTr("Send contact request to chat key") text: qsTr("Send contact request to chat key")
onClicked: { onClicked: {
sendContactRequest.open() Global.openPopup(sendContactRequest);
} }
} }
@ -311,26 +311,10 @@ SettingsContentBase {
} }
} }
Loader { Component {
id: sendContactRequest id: sendContactRequest
width: parent.width SendContactRequestModal {
height: parent.height
active: false
function open() {
active = true
sendContactRequest.item.open()
}
function close() {
active = false
}
sourceComponent: SendContactRequestModal {
anchors.centerIn: parent
contactsStore: root.contactsStore contactsStore: root.contactsStore
onClosed: {
sendContactRequest.close();
}
} }
} }
} }

View File

@ -249,9 +249,6 @@ Item {
ENSPopup { ENSPopup {
ensUsernamesStore: root.ensUsernamesStore ensUsernamesStore: root.ensUsernamesStore
onClosed: {
destroy()
}
} }
} }
} }

View File

@ -94,28 +94,22 @@ SettingsContentBase {
target: root.keycardStore.keycardModule target: root.keycardStore.keycardModule
function onDisplayKeycardSharedModuleFlow() { function onDisplayKeycardSharedModuleFlow() {
keycardPopup.active = true Global.openPopup(keycardPopup);
} }
function onDestroyKeycardSharedModuleFlow() { function onDestroyKeycardSharedModuleFlow() {
keycardPopup.active = false Global.closePopup();
} }
function onSharedModuleBusy() { function onSharedModuleBusy() {
Global.openPopup(sharedModuleBusyPopupComponent) Global.openPopup(sharedModuleBusyPopupComponent)
} }
} }
Loader { Component {
id: keycardPopup id: keycardPopup
active: false KeycardPopup {
sourceComponent: KeycardPopup {
anchors.centerIn: parent
sharedKeycardModule: root.keycardStore.keycardModule.keycardSharedModule sharedKeycardModule: root.keycardStore.keycardModule.keycardSharedModule
emojiPopup: root.emojiPopup emojiPopup: root.emojiPopup
} }
onLoaded: {
keycardPopup.item.open()
}
} }
} }
} }

View File

@ -193,7 +193,7 @@ SettingsContentBase {
id: languageConfirmationDialog id: languageConfirmationDialog
active: false active: false
sourceComponent: ConfirmationDialog { sourceComponent: ConfirmationDialog {
header.title: qsTr("Change language") headerSettings.title: qsTr("Change language")
confirmationText: qsTr("Display language has been changed. You must restart the application for changes to take effect.") confirmationText: qsTr("Display language has been changed. You must restart the application for changes to take effect.")
confirmButtonLabel: qsTr("Close the app now") confirmButtonLabel: qsTr("Close the app now")
onConfirmButtonClicked: { onConfirmButtonClicked: {

View File

@ -72,7 +72,7 @@ Item {
ConfirmationDialog { ConfirmationDialog {
id: confirmDialog id: confirmDialog
confirmButtonObjectName: "signOutConfirmation" confirmButtonObjectName: "signOutConfirmation"
header.title: qsTr("Sign out") headerSettings.title: qsTr("Sign out")
confirmationText: qsTr("Make sure you have your account password and seed phrase stored. Without them you can lock yourself out of your account and lose funds.") confirmationText: qsTr("Make sure you have your account password and seed phrase stored. Without them you can lock yourself out of your account and lose funds.")
confirmButtonLabel: qsTr("Sign out & Quit") confirmButtonLabel: qsTr("Sign out & Quit")
onConfirmButtonClicked: { onConfirmButtonClicked: {

View File

@ -30,7 +30,7 @@ SettingsContentBase {
titleRowComponentLoader.sourceComponent: StatusButton { titleRowComponentLoader.sourceComponent: StatusButton {
objectName: "profileSettingsChangePasswordButton" objectName: "profileSettingsChangePasswordButton"
text: qsTr("Change Password") text: qsTr("Change Password")
onClicked: changePasswordModal.open() onClicked: Global.openPopup(changePasswordModal)
enabled: !userProfile.isKeycardUser enabled: !userProfile.isKeycardUser
} }
@ -92,16 +92,17 @@ SettingsContentBase {
} }
} }
ChangePasswordModal { Component {
id: changePasswordModal id: changePasswordModal
privacyStore: root.privacyStore ChangePasswordModal {
anchors.centerIn: parent privacyStore: root.privacyStore
onPasswordChanged: successPopup.open() onPasswordChanged: Global.openPopup(successPopup);
}
} }
ChangePasswordSuccessModal { Component {
id: successPopup id: successPopup
anchors.centerIn: parent ChangePasswordSuccessModal { }
} }
} }
} }

View File

@ -155,7 +155,7 @@ Item {
ConfirmationDialog { ConfirmationDialog {
id: confirmationPopup id: confirmationPopup
confirmButtonObjectName: "confirmDeleteAccountButton" confirmButtonObjectName: "confirmDeleteAccountButton"
header.title: qsTr("Confirm %1 Removal").arg(root.account ? root.account.name : "") headerSettings.title: qsTr("Confirm %1 Removal").arg(root.account ? root.account.name : "")
confirmationText: qsTr("You will not be able to restore viewing access to this account in the future unless you enter this accounts address again.") confirmationText: qsTr("You will not be able to restore viewing access to this account in the future unless you enter this accounts address again.")
confirmButtonLabel: qsTr("Remove Account") confirmButtonLabel: qsTr("Remove Account")
onConfirmButtonClicked: { onConfirmButtonClicked: {

View File

@ -20,7 +20,7 @@ StatusModal {
closePolicy: root.store.disablePopup? Popup.NoAutoClose : Popup.CloseOnEscape | Popup.CloseOnPressOutside closePolicy: root.store.disablePopup? Popup.NoAutoClose : Popup.CloseOnEscape | Popup.CloseOnPressOutside
hasCloseButton: !root.store.disablePopup hasCloseButton: !root.store.disablePopup
header.title: root.store.editMode? qsTr("Edit account") : qsTr("Add a new account") headerSettings.title: root.store.editMode? qsTr("Edit account") : qsTr("Add a new account")
onOpened: { onOpened: {
root.store.resetStoreValues() root.store.resetStoreValues()

View File

@ -225,8 +225,8 @@ StatusListItem {
property string name property string name
property bool favourite property bool favourite
anchors.centerIn: parent anchors.centerIn: parent
header.title: qsTr("Are you sure?") headerSettings.title: qsTr("Are you sure?")
header.subTitle: name headerSettings.subTitle: name
contentItem: StatusBaseText { contentItem: StatusBaseText {
anchors.centerIn: parent anchors.centerIn: parent
height: contentHeight + topPadding + bottomPadding height: contentHeight + topPadding + bottomPadding

View File

@ -16,7 +16,7 @@ StatusModal {
id: cryptoServicesPopupRoot id: cryptoServicesPopupRoot
height: 400 height: 400
header.title: qsTr("Buy crypto") headerSettings.title: qsTr("Buy crypto")
anchors.centerIn: parent anchors.centerIn: parent
Loader { Loader {

View File

@ -33,7 +33,7 @@ StatusModal {
property string completeAddressWithNetworkPrefix property string completeAddressWithNetworkPrefix
} }
header.title: qsTr("Receive") headerSettings.title: qsTr("Receive")
contentHeight: layout.implicitHeight contentHeight: layout.implicitHeight
width: 556 width: 556

View File

@ -71,11 +71,11 @@ Item {
} }
function onDisplayKeycardSharedModuleFlow() { function onDisplayKeycardSharedModuleFlow() {
keycardPopup.active = true Global.openPopup(keycardPopup);
} }
function onDestroyKeycardSharedModuleFlow() { function onDestroyKeycardSharedModuleFlow() {
keycardPopup.active = false Global.closePopup();
} }
function onMailserverWorking() { function onMailserverWorking() {
@ -1365,17 +1365,12 @@ Item {
Global.settingsLoaded() Global.settingsLoaded()
} }
Loader { Component {
id: keycardPopup id: keycardPopup
active: false KeycardPopup {
sourceComponent: KeycardPopup {
anchors.centerIn: parent anchors.centerIn: parent
sharedKeycardModule: appMain.rootStore.mainModuleInst.keycardSharedModule sharedKeycardModule: appMain.rootStore.mainModuleInst.keycardSharedModule
} }
onLoaded: {
keycardPopup.item.open()
}
} }
DropAreaPanel { DropAreaPanel {

View File

@ -41,24 +41,25 @@ QtObject {
Global.importCommunityPopupRequested.connect(openImportCommunityPopup) Global.importCommunityPopupRequested.connect(openImportCommunityPopup)
Global.removeContactRequested.connect(openRemoveContactConfirmationPopup) Global.removeContactRequested.connect(openRemoveContactConfirmationPopup)
Global.openPopupRequested.connect(openPopup) Global.openPopupRequested.connect(openPopup)
Global.closePopupRequested.connect(closePopup)
Global.openDeleteMessagePopup.connect(openDeleteMessagePopup) Global.openDeleteMessagePopup.connect(openDeleteMessagePopup)
Global.openDownloadImageDialog.connect(openDownloadImageDialog) Global.openDownloadImageDialog.connect(openDownloadImageDialog)
} }
property var currentPopup
function openPopup(popupComponent, params = {}, cb = null) { function openPopup(popupComponent, params = {}, cb = null) {
if (activePopupComponents.includes(popupComponent)) { if (activePopupComponents.includes(popupComponent)) {
return return
} }
const popup = popupComponent.createObject(popupParent, params) root.currentPopup = popupComponent.createObject(popupParent, params)
popup.open() root.currentPopup.open();
if (cb) if (cb)
cb(popup) cb(root.currentPopup)
activePopupComponents.push(popupComponent) activePopupComponents.push(popupComponent)
popup.closed.connect(() => { root.currentPopup.closed.connect(() => {
const removeIndex = activePopupComponents.indexOf(popupComponent) const removeIndex = activePopupComponents.indexOf(popupComponent)
if (removeIndex !== -1) { if (removeIndex !== -1) {
activePopupComponents.splice(removeIndex, 1) activePopupComponents.splice(removeIndex, 1)
@ -66,6 +67,11 @@ QtObject {
}) })
} }
function closePopup() {
if (!!root.currentPopup)
root.currentPopup.close();
}
function openChooseBrowserPopup(link: string) { function openChooseBrowserPopup(link: string) {
openPopup(chooseBrowserPopupComponent, {link: link}) openPopup(chooseBrowserPopupComponent, {link: link})
} }
@ -90,7 +96,7 @@ QtObject {
} }
function openNicknamePopup(publicKey: string, nickname: string, subtitle: string) { function openNicknamePopup(publicKey: string, nickname: string, subtitle: string) {
openPopup(nicknamePopupComponent, {publicKey: publicKey, nickname: nickname, "header.subTitle": subtitle}) openPopup(nicknamePopupComponent, {publicKey: publicKey, nickname: nickname, "headerSettings.subTitle": subtitle})
} }
function openBlockContactPopup(publicKey: string, contactName: string) { function openBlockContactPopup(publicKey: string, contactName: string) {
@ -125,7 +131,7 @@ QtObject {
userDisplayName: contactDetails.displayName, userDisplayName: contactDetails.displayName,
userIcon: contactDetails.largeImage, userIcon: contactDetails.largeImage,
userIsEnsVerified: contactDetails.ensVerified, userIsEnsVerified: contactDetails.ensVerified,
"header.title": qsTr("Verify %1's Identity").arg(contactDetails.displayName), "headerSettings.title": qsTr("Verify %1's Identity").arg(contactDetails.displayName),
challengeText: qsTr("Ask a question that only the real %1 will be able to answer e.g. a question about a shared experience, or ask %1 to enter a code or phrase you have sent to them via a different communication channel (phone, post, etc...).").arg(contactDetails.displayName), challengeText: qsTr("Ask a question that only the real %1 will be able to answer e.g. a question about a shared experience, or ask %1 to enter a code or phrase you have sent to them via a different communication channel (phone, post, etc...).").arg(contactDetails.displayName),
buttonText: qsTr("Send verification request") buttonText: qsTr("Send verification request")
}, cb) }, cb)
@ -229,7 +235,7 @@ QtObject {
ConfirmationDialog { ConfirmationDialog {
property string displayName property string displayName
property string publicKey property string publicKey
header.title: qsTr("Remove '%1' as a contact").arg(displayName) headerSettings.title: qsTr("Remove '%1' as a contact").arg(displayName)
confirmationText: qsTr("This will mean that you and '%1' will no longer be able to send direct messages to each other. You will need to send them a new Contact Request in order to message again. All previous direct messages between you and '%1' will be retained in read-only mode.").arg(displayName) confirmationText: qsTr("This will mean that you and '%1' will no longer be able to send direct messages to each other. You will need to send them a new Contact Request in order to message again. All previous direct messages between you and '%1' will be retained in read-only mode.").arg(displayName)
showCancelButton: true showCancelButton: true
cancelBtnType: "" cancelBtnType: ""

View File

@ -22,10 +22,10 @@ Popup {
property var store property var store
onOpened: { onOpened: {
Global.popupOpened = true Global.activityPopupOpened = true
} }
onClosed: { onClosed: {
Global.popupOpened = false Global.activityPopupOpened = false
Qt.callLater(activityCenterStore.markAsSeenActivityCenterNotifications) Qt.callLater(activityCenterStore.markAsSeenActivityCenterNotifications)
} }

View File

@ -8,13 +8,13 @@ import shared.stores 1.0
import StatusQ.Controls 0.1 import StatusQ.Controls 0.1
Popup { Dialog {
id: root id: root
width: buttonRow.width width: buttonRow.width
height: buttonRow.height height: buttonRow.height
padding: 0 padding: 0
margins: 0 margins: 0
closePolicy: Popup.CloseOnReleaseOutsideParent | Popup.CloseOnEscape closePolicy: Popup.CloseOnReleaseOutside | Popup.CloseOnEscape
signal sendTransactionCommandButtonClicked() signal sendTransactionCommandButtonClicked()
signal receiveTransactionCommandButtonClicked() signal receiveTransactionCommandButtonClicked()

View File

@ -28,7 +28,7 @@ StatusModal {
property alias checkbox: checkbox property alias checkbox: checkbox
header.title: qsTr("Confirm your action") headerSettings.title: qsTr("Confirm your action")
focus: visible focus: visible
signal confirmButtonClicked() signal confirmButtonClicked()

View File

@ -6,7 +6,7 @@ ConfirmationDialog {
property var messageStore property var messageStore
property string messageId property string messageId
header.title: qsTr("Confirm deleting this message") headerSettings.title: qsTr("Confirm deleting this message")
confirmationText: qsTr("Are you sure you want to delete this message? Be aware that other clients are not guaranteed to delete the message as well.") confirmationText: qsTr("Are you sure you want to delete this message? Be aware that other clients are not guaranteed to delete the message as well.")
height: 260 height: 260
checkbox.visible: true checkbox.visible: true

View File

@ -19,7 +19,7 @@ StatusModal {
width: 420 width: 420
height: 250 height: 250
closePolicy: Popup.NoAutoClose closePolicy: Popup.NoAutoClose
header.title: qsTr("Edit") headerSettings.title: qsTr("Edit")
contentItem: Item { contentItem: Item {
StatusInput { StatusInput {
id: displayNameInput id: displayNameInput

View File

@ -50,12 +50,12 @@ Item {
StatusModal { StatusModal {
id: imageCropperModal id: imageCropperModal
header.title: root.title headerSettings.title: root.title
anchors.centerIn: Overlay.overlay anchors.centerIn: Overlay.overlay
width: root.roundedImage ? 480 : 580 width: root.roundedImage ? 480 : 580
destroyOnClose: false
StatusImageCropPanel { StatusImageCropPanel {
id: imageCropper id: imageCropper
objectName: "profileImageCropper" objectName: "profileImageCropper"

View File

@ -10,7 +10,7 @@ StatusModal {
property var rootStore property var rootStore
header.title: qsTr("Download Status link") headerSettings.title: qsTr("Download Status link")
height: 156 height: 156
StatusDescriptionListItem { StatusDescriptionListItem {

View File

@ -14,6 +14,7 @@ Popup {
default property alias content: popupContent.children default property alias content: popupContent.children
property alias contentWrapper: popupContent property alias contentWrapper: popupContent
property alias header: headerContent.children property alias header: headerContent.children
property bool destroyOnClose: true
id: popup id: popup
modal: true modal: true
@ -33,11 +34,9 @@ Popup {
color: Style.current.background color: Style.current.background
radius: 8 radius: 8
} }
onOpened: {
Global.popupOpened = true
}
onClosed: { onClosed: {
Global.popupOpened = false if (popup.destroyOnClose)
popup.destroy();
} }
padding: 0 padding: 0
contentItem: Item { contentItem: Item {
@ -165,5 +164,5 @@ Popup {
anchors.rightMargin: visible ? Style.current.padding : 0 anchors.rightMargin: visible ? Style.current.padding : 0
anchors.leftMargin: visible ? Style.current.padding : 0 anchors.leftMargin: visible ? Style.current.padding : 0
} }
} }
} }

View File

@ -17,8 +17,8 @@ StatusModal {
height: 340 height: 340
anchors.centerIn: parent anchors.centerIn: parent
header.title: qsTr("Nickname") headerSettings.title: qsTr("Nickname")
header.subTitleElide: Text.ElideMiddle headerSettings.subTitleElide: Text.ElideMiddle
/*required*/ property string publicKey /*required*/ property string publicKey
property string nickname property string nickname

View File

@ -20,7 +20,7 @@ StatusModal {
signal removeAccount(string address) signal removeAccount(string address)
header.title: qsTr("Remove %1").arg(root.accountName) headerSettings.title: qsTr("Remove %1").arg(root.accountName)
focus: visible focus: visible
padding: Style.current.padding padding: Style.current.padding

View File

@ -11,7 +11,7 @@ import StatusQ.Controls 0.1
StatusModal { StatusModal {
id: root id: root
header.title: qsTr("Select account") headerSettings.title: qsTr("Select account")
height: 284 height: 284
property var accounts property var accounts

View File

@ -29,7 +29,7 @@ StatusModal {
width: 480 width: 480
height: 548 height: 548
header.title: d.loadingContactDetails ? qsTr("Send Contact Request") headerSettings.title: d.loadingContactDetails ? qsTr("Send Contact Request")
: qsTr("Send Contact Request to %1").arg(d.userDisplayName) : qsTr("Send Contact Request to %1").arg(d.userDisplayName)
onAboutToShow: { onAboutToShow: {

View File

@ -16,7 +16,7 @@ import AppLayouts.Wallet 1.0
StatusModal { StatusModal {
id: root id: root
header.title: qsTr("Send") headerSettings.title: qsTr("Send")
height: 540 height: 540
property var store property var store
@ -88,7 +88,7 @@ StatusModal {
// initialItem: groupPreview // initialItem: groupPreview
// isLastGroup: stack.currentGroup === groupSignTx // isLastGroup: stack.currentGroup === groupSignTx
// onGroupActivated: { // onGroupActivated: {
// root.header.title = group.headerText // root.headerSettings.title = group.headerText
// btnNext.text = group.footerText // btnNext.text = group.footerText
// } // }
// TransactionFormGroup { // TransactionFormGroup {

View File

@ -53,6 +53,7 @@ Popup {
dissapearInMs = 4000 dissapearInMs = 4000
displayCloseButton = true displayCloseButton = true
displayLink = true displayLink = true
root.destroy();
} }
Timer { Timer {

View File

@ -14,8 +14,9 @@ StatusModal {
closePolicy: d.disableActionPopupButtons || d.disableCloseButton? Popup.NoAutoClose : Popup.CloseOnEscape | Popup.CloseOnPressOutside closePolicy: d.disableActionPopupButtons || d.disableCloseButton? Popup.NoAutoClose : Popup.CloseOnEscape | Popup.CloseOnPressOutside
hasCloseButton: !d.disableActionPopupButtons && !d.disableCloseButton hasCloseButton: !d.disableActionPopupButtons && !d.disableCloseButton
destroyOnClose: false
header.title: { headerSettings.title: {
switch (root.sharedKeycardModule.currentState.flowType) { switch (root.sharedKeycardModule.currentState.flowType) {
case Constants.keycardSharedFlow.setupNewKeycard: case Constants.keycardSharedFlow.setupNewKeycard:
return qsTr("Set up a new Keycard with an existing account") return qsTr("Set up a new Keycard with an existing account")
@ -51,10 +52,13 @@ StatusModal {
KeycardPopupDetails { KeycardPopupDetails {
id: d id: d
sharedKeycardModule: root.sharedKeycardModule sharedKeycardModule: root.sharedKeycardModule
onCancelBtnClicked: {
root.close();
}
} }
onClosed: { onClosed: {
root.sharedKeycardModule.currentState.doCancelAction() root.sharedKeycardModule.currentState.doCancelAction();
} }
StatusScrollView { StatusScrollView {

View File

@ -12,6 +12,8 @@ QtObject {
property bool primaryButtonEnabled: false property bool primaryButtonEnabled: false
signal cancelBtnClicked()
// disables action buttons (back, cancel, primary, secondary) and close button (upper right "X" button) as well // disables action buttons (back, cancel, primary, secondary) and close button (upper right "X" button) as well
readonly property bool disableActionPopupButtons: { readonly property bool disableActionPopupButtons: {
if (root.sharedKeycardModule.disablePopup) { if (root.sharedKeycardModule.disablePopup) {
@ -369,9 +371,8 @@ QtObject {
return false return false
} }
enabled: !root.disableActionPopupButtons enabled: !root.disableActionPopupButtons
onClicked: { onClicked: {
root.sharedKeycardModule.currentState.doCancelAction() root.cancelBtnClicked();
} }
}, },

View File

@ -88,7 +88,7 @@ Item {
ConfirmationDialog { ConfirmationDialog {
id: confirmationPopup id: confirmationPopup
header.title: qsTr("Remove account") headerSettings.title: qsTr("Remove account")
confirmationText: d.accountNameToBeRemoved.length > 0? confirmationText: d.accountNameToBeRemoved.length > 0?
qsTr("Do you want to delete the %1 account?").arg(d.accountNameToBeRemoved) qsTr("Do you want to delete the %1 account?").arg(d.accountNameToBeRemoved)
: qsTr("Do you want to delete the last account?") : qsTr("Do you want to delete the last account?")

View File

@ -120,7 +120,6 @@ Rectangle {
QtObject { QtObject {
id: d id: d
readonly property string emojiReplacementSymbols: ":='xX><0O;*dB8-D#%\\" readonly property string emojiReplacementSymbols: ":='xX><0O;*dB8-D#%\\"
//mentions helper properties //mentions helper properties
@ -161,6 +160,8 @@ Rectangle {
} }
} }
property bool chatCommandsPopupOpen: false
function copyMentions(start, end) { function copyMentions(start, end) {
copiedMentionsPos = [] copiedMentionsPos = []
for (let k = 0; k < mentionsPos.length; k++) { for (let k = 0; k < mentionsPos.length; k++) {
@ -1025,27 +1026,30 @@ Rectangle {
} }
} }
// TODO remove that Loader when the Chat Commands are re-implemented and fixed
// Bonus if we use `openPopup` instead with a Component instead Component {
Loader { id: chatCommandsPopup
active: false ChatCommandsPopup {
sourceComponent: ChatCommandsPopup { x: (parent.width - control.width - Style.current.halfPadding)
id: chatCommandsPopup y: 716
x: 8
y: -height
onSendTransactionCommandButtonClicked: { onSendTransactionCommandButtonClicked: {
control.sendTransactionCommandButtonClicked() control.sendTransactionCommandButtonClicked();
chatCommandsPopup.close() chatCommandsPopup.close();
} }
onReceiveTransactionCommandButtonClicked: { onReceiveTransactionCommandButtonClicked: {
control.receiveTransactionCommandButtonClicked() control.receiveTransactionCommandButtonClicked();
chatCommandsPopup.close() chatCommandsPopup.close();
} }
onClosed: { onClosed: {
chatCommandsBtn.highlighted = false chatCommandsBtnLoader.highlighted = false;
destroy();
}
Component.onDestruction: {
if (d.chatCommandsPopupOpen)
d.chatCommandsPopupOpen = false;
} }
onOpened: { onOpened: {
chatCommandsBtn.highlighted = true chatCommandsBtnLoader.highlighted = true;
} }
} }
} }
@ -1077,6 +1081,7 @@ Rectangle {
// TODO remove that Loader when the Chat Commands are re-implemented and fixed // TODO remove that Loader when the Chat Commands are re-implemented and fixed
Loader { Loader {
id: chatCommandsBtnLoader
active: false active: false
sourceComponent: StatusQ.StatusFlatRoundButton { sourceComponent: StatusQ.StatusFlatRoundButton {
id: chatCommandsBtn id: chatCommandsBtn
@ -1089,9 +1094,8 @@ Rectangle {
visible: RootStore.isWalletEnabled && !isEdit && control.chatType === Constants.chatType.oneToOne visible: RootStore.isWalletEnabled && !isEdit && control.chatType === Constants.chatType.oneToOne
enabled: !control.isContactBlocked enabled: !control.isContactBlocked
onClicked: { onClicked: {
chatCommandsPopup.opened ? d.chatCommandsPopupOpen ? Global.closePopup() : Global.openPopup(chatCommandsPopup);
chatCommandsPopup.close() : d.chatCommandsPopupOpen = !d.chatCommandsPopupOpen;
chatCommandsPopup.open()
} }
} }
} }

View File

@ -85,4 +85,8 @@ Popup {
root.close() root.close()
} }
} }
onClosed: {
root.destroy();
}
} }

View File

@ -159,4 +159,8 @@ Popup {
searchBox.text = "" searchBox.text = ""
searchBox.input.edit.forceActiveFocus() searchBox.input.edit.forceActiveFocus()
} }
onClosed: {
root.destroy();
}
} }

View File

@ -39,7 +39,7 @@ Item {
SortFilterProxyModel { SortFilterProxyModel {
id: filteredModel id: filteredModel
sourceModel: assets sourceModel: !!assets ? assets : null
filters: [ filters: [
ExpressionFilter { ExpressionFilter {
expression: visibleForNetworkWithPositiveBalance || loading expression: visibleForNetworkWithPositiveBalance || loading
@ -67,13 +67,13 @@ Item {
Component { Component {
id: tokenDelegate id: tokenDelegate
TokenDelegate { TokenDelegate {
objectName: "AssetView_TokenListItem_" + (modelData ? modelData.symbol : "") objectName: "AssetView_TokenListItem_" + (!!modelData ? modelData.symbol : "")
readonly property string balance: modelData ? "%1".arg(modelData.enabledNetworkBalance.amount) : "" // Needed for the tests readonly property string balance: !!modelData ? "%1".arg(modelData.enabledNetworkBalance.amount) : "" // Needed for the tests
errorTooltipText_1: modelData ? networkConnectionStore.getBlockchainNetworkDownTextForToken(modelData.balances) : "" errorTooltipText_1: !!modelData && !! networkConnectionStore ? networkConnectionStore.getBlockchainNetworkDownTextForToken(modelData.balances) : ""
errorTooltipText_2: networkConnectionStore.getMarketNetworkDownText() errorTooltipText_2: !!networkConnectionStore ? networkConnectionStore.getMarketNetworkDownText() : ""
subTitle: !modelData || networkConnectionStore.noTokenBalanceAvailable ? "" : LocaleUtils.currencyAmountToLocaleString(modelData.enabledNetworkBalance) subTitle: !modelData || (!!networkConnectionStore && !networkConnectionStore.noTokenBalanceAvailable) ? "" : LocaleUtils.currencyAmountToLocaleString(modelData.enabledNetworkBalance)
errorMode: networkConnectionStore.noBlockchainConnectionAndNoCache && !networkConnectionStore.noMarketConnectionAndNoCache errorMode: !!networkConnectionStore ? networkConnectionStore.noBlockchainConnectionAndNoCache && !networkConnectionStore.noMarketConnectionAndNoCache : false
errorIcon.tooltip.text: networkConnectionStore.noBlockchainConnectionAndNoCacheText errorIcon.tooltip.text: !!networkConnectionStore ? networkConnectionStore.noBlockchainConnectionAndNoCacheText : ""
onClicked: { onClicked: {
RootStore.getHistoricalDataForToken(modelData.symbol, RootStore.currencyStore.currentCurrency) RootStore.getHistoricalDataForToken(modelData.symbol, RootStore.currencyStore.currentCurrency)
d.selectedAssetIndex = index d.selectedAssetIndex = index

View File

@ -34,10 +34,13 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.top: noContacts.bottom anchors.top: noContacts.bottom
anchors.topMargin: Style.current.padding anchors.topMargin: Style.current.padding
onClicked: inviteFriendsPopup.open() onClicked: Global.openPopup(inviteFriendsPopup);
} }
InviteFriendsPopup {
Component {
id: inviteFriendsPopup id: inviteFriendsPopup
rootStore: noContactsRect.rootStore InviteFriendsPopup {
rootStore: noContactsRect.rootStore
}
} }
} }

View File

@ -257,7 +257,7 @@ Pane {
ConfirmationDialog { ConfirmationDialog {
id: removeVerificationConfirmationDialog id: removeVerificationConfirmationDialog
header.title: qsTr("Remove contact verification") headerSettings.title: qsTr("Remove contact verification")
confirmationText: qsTr("This will remove the contact's verified status. Please confirm.") confirmationText: qsTr("This will remove the contact's verified status. Please confirm.")
onConfirmButtonClicked: { onConfirmButtonClicked: {
root.contactsStore.removeTrustStatus(root.publicKey) root.contactsStore.removeTrustStatus(root.publicKey)

View File

@ -46,7 +46,7 @@ Item {
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
if (root.state === Constants.addressRequested) { if (root.state === Constants.addressRequested) {
selectAccountModal.open() Global.openPopup(selectAccountModalComponent);
} else if (root.state === Constants.transactionRequested) { } else if (root.state === Constants.transactionRequested) {
Global.openPopup(signTxComponent) Global.openPopup(signTxComponent)
} }
@ -117,14 +117,17 @@ Item {
} }
} }
SelectAccountModal { Component {
id: selectAccountModal id: selectAccountModalComponent
anchors.centerIn: parent SelectAccountModal {
accounts: root.store.accounts id: selectAccountModal
currency: root.store.currentCurrency anchors.centerIn: parent
onSelectAndShareAddressButtonClicked: { accounts: root.store.accounts
root.store.acceptAddressRequest(messageId, accountSelector.selectedAccount.address) currency: root.store.currentCurrency
selectAccountModal.close() onSelectAndShareAddressButtonClicked: {
root.store.acceptAddressRequest(messageId, accountSelector.selectedAccount.address)
selectAccountModal.close()
}
} }
} }
} }

View File

@ -486,7 +486,7 @@ Loader {
disableHover: root.disableHover || disableHover: root.disableHover ||
delegate.hideQuickActions || delegate.hideQuickActions ||
(root.chatLogView && root.chatLogView.moving) || (root.chatLogView && root.chatLogView.moving) ||
Global.popupOpened Global.activityPopupOpened
disableEmojis: root.isChatBlocked disableEmojis: root.isChatBlocked
hideMessage: d.hideMessage hideMessage: d.hideMessage

View File

@ -7,7 +7,7 @@ QtObject {
property var dragArea property var dragArea
property var applicationWindow property var applicationWindow
property bool popupOpened: false property bool activityPopupOpened: false
property int settingsSubsection: Constants.settingsSubsection.profile property int settingsSubsection: Constants.settingsSubsection.profile
property var userProfile property var userProfile
@ -28,6 +28,7 @@ QtObject {
signal displayToastMessage(string title, string subTitle, string icon, bool loading, int ephNotifType, string url) signal displayToastMessage(string title, string subTitle, string icon, bool loading, int ephNotifType, string url)
signal openPopupRequested(var popupComponent, var params) signal openPopupRequested(var popupComponent, var params)
signal closePopupRequested()
signal openNicknamePopupRequested(string publicKey, string nickname, string subtitle) signal openNicknamePopupRequested(string publicKey, string nickname, string subtitle)
signal openDownloadModalRequested(bool available, string version, string url) signal openDownloadModalRequested(bool available, string version, string url)
signal openChangeProfilePicPopup(var cb) signal openChangeProfilePicPopup(var cb)
@ -72,6 +73,10 @@ QtObject {
root.openPopupRequested(popupComponent, params); root.openPopupRequested(popupComponent, params);
} }
function closePopup() {
root.closePopupRequested();
}
function openDownloadModal(available, version, url){ function openDownloadModal(available, version, url){
root.openDownloadModalRequested(available, version, url); root.openDownloadModalRequested(available, version, url);
} }