diff --git a/ui/app/AppLayouts/Browser/popups/BrowserSettingsMenu.qml b/ui/app/AppLayouts/Browser/popups/BrowserSettingsMenu.qml index c94108fa41..52484ea2fa 100644 --- a/ui/app/AppLayouts/Browser/popups/BrowserSettingsMenu.qml +++ b/ui/app/AppLayouts/Browser/popups/BrowserSettingsMenu.qml @@ -117,7 +117,7 @@ PopupMenu { text: qsTrId("settings") shortcut: "Ctrl+," onTriggered: { - appMain.changeAppSectionBySectionType(Constants.appSection.profile) + Global.changeAppSectionBySectionType(Constants.appSection.profile) // TODO: replace with shared store constant // Profile/RootStore.browser_settings_id profileLayoutContainer.changeProfileSection(10) diff --git a/ui/app/AppLayouts/Chat/ChatColumn/ChatComponents/ActivityCenterTopBar.qml b/ui/app/AppLayouts/Chat/ChatColumn/ChatComponents/ActivityCenterTopBar.qml index efb1bb943b..e8ef563755 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/ChatComponents/ActivityCenterTopBar.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/ChatComponents/ActivityCenterTopBar.qml @@ -120,7 +120,7 @@ Item { text: qsTrId("chat-notification-preferences") onTriggered: { activityCenter.close() - appMain.changeAppSectionBySectionType(Constants.appSection.profile) + Global.changeAppSectionBySectionType(Constants.appSection.profile) // TODO: replace with shared store constant // Profile/RootStore.notifications_id profileLayoutContainer.changeProfileSection(7) diff --git a/ui/app/AppLayouts/Chat/popups/ChooseBrowserPopup.qml b/ui/app/AppLayouts/Chat/popups/ChooseBrowserPopup.qml index 179213573b..d9074c24db 100644 --- a/ui/app/AppLayouts/Chat/popups/ChooseBrowserPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/ChooseBrowserPopup.qml @@ -37,7 +37,7 @@ StatusModal { if (rememberChoiceCheckBox.checked) { localAccountSensitiveSettings.openLinksInStatus = true } - changeAppSectionBySectionType(Constants.appSection.browser) + Global.changeAppSectionBySectionType(Constants.appSection.browser) browserLayoutContainer.item.openUrlInNewTab(popup.link) popup.close() } diff --git a/ui/app/AppLayouts/Chat/popups/PrivateChatPopup.qml b/ui/app/AppLayouts/Chat/popups/PrivateChatPopup.qml index d7992e863b..d6aaefcca9 100644 --- a/ui/app/AppLayouts/Chat/popups/PrivateChatPopup.qml +++ b/ui/app/AppLayouts/Chat/popups/PrivateChatPopup.qml @@ -82,7 +82,7 @@ ModalPopup { cursorShape: "PointingHandCursor" onClicked: { popup.profileClicked(); - Config.currentMenuTab = 0; + Global.currentMenuTab = 0; popup.close(); } } diff --git a/ui/app/AppLayouts/Chat/views/ChatTextView.qml b/ui/app/AppLayouts/Chat/views/ChatTextView.qml index 49cdd2eb2c..172fc9ed97 100644 --- a/ui/app/AppLayouts/Chat/views/ChatTextView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatTextView.qml @@ -65,7 +65,7 @@ Item { // if(root.store.chatsModelInst.communities.activeCommunity.active) // { // root.store.chatsModelInst.channelView.joinPublicChat(channelName) -// appMain.changeAppSectionBySectionType(Constants.appSection.chat) +// Global.changeAppSectionBySectionType(Constants.appSection.chat) // } return } @@ -77,7 +77,7 @@ Item { // Not Refactored Yet // if(root.store.chatsModelInst.communities.activeCommunity.active) { // root.store.chatsModelInst.channelView.joinPublicChat(channelName) -// appMain.changeAppSectionBySectionType(Constants.appSection.chat) +// Global.changeAppSectionBySectionType(Constants.appSection.chat) // } // root.store.chatsModelInst.channelView.setActiveChannel(channelName); } @@ -105,7 +105,7 @@ Item { } - appMain.openLink(link) + Global.openLink(link) } onLinkHovered: { diff --git a/ui/app/AppLayouts/Profile/ProfileLayout.qml b/ui/app/AppLayouts/Profile/ProfileLayout.qml index 3a4bfa7962..f1211b7d09 100644 --- a/ui/app/AppLayouts/Profile/ProfileLayout.qml +++ b/ui/app/AppLayouts/Profile/ProfileLayout.qml @@ -32,7 +32,7 @@ StatusAppTwoPanelLayout { property int profileContentWidth: Math.max(contentMinWidth, Math.min(profileContainer.width * 0.8, contentMaxWidth)) anchors.fill: parent - currentIndex: Config.currentMenuTab + currentIndex: Global.currentMenuTab onCurrentIndexChanged: { if(visibleChildren[0] === ensContainer){ diff --git a/ui/app/AppLayouts/Profile/panels/MenuPanel.qml b/ui/app/AppLayouts/Profile/panels/MenuPanel.qml index ed1e6d8fe2..7a71bc9026 100644 --- a/ui/app/AppLayouts/Profile/panels/MenuPanel.qml +++ b/ui/app/AppLayouts/Profile/panels/MenuPanel.qml @@ -23,7 +23,7 @@ Column { itemId: model.menu_id title: model.text icon.name: model.icon - selected: Config.currentMenuTab === model.menu_id + selected: Global.currentMenuTab === model.menu_id onClicked: root.menuItemClicked(model) } } @@ -37,7 +37,7 @@ Column { itemId: model.menu_id title: model.text icon.name: model.icon - selected: Config.currentMenuTab === model.menu_id + selected: Global.currentMenuTab === model.menu_id onClicked: root.menuItemClicked(model) visible: model.ifEnabled !== "browser" || root.browserMenuItemEnabled badge.value: !mnemonicModule.isBackedUp && settingsMenuDelegate.title === qsTr("Privacy and security") @@ -56,7 +56,7 @@ Column { itemId: model.menu_id title: model.text icon.name: model.icon - selected: Config.currentMenuTab === model.menu_id + selected: Global.currentMenuTab === model.menu_id visible: model.ifEnabled !== "browser" || root.browserMenuItemEnabled onClicked: root.menuItemClicked(model) } diff --git a/ui/app/AppLayouts/Profile/stores/RootStore.qml b/ui/app/AppLayouts/Profile/stores/RootStore.qml index 23c9b51e0e..31e7e50295 100644 --- a/ui/app/AppLayouts/Profile/stores/RootStore.qml +++ b/ui/app/AppLayouts/Profile/stores/RootStore.qml @@ -197,10 +197,6 @@ QtObject { return utilsModelInst.generateAlias(pubKey) } - function changeAppSectionBySectionType(section) { - appMain.changeAppSectionBySectionType(section) - } - function joinPrivateChat(address) { chatsModelInst.channelView.joinPrivateChat(address, ""); } diff --git a/ui/app/AppLayouts/Profile/views/AboutView.qml b/ui/app/AppLayouts/Profile/views/AboutView.qml index 324404a471..398c0e8dbc 100644 --- a/ui/app/AppLayouts/Profile/views/AboutView.qml +++ b/ui/app/AppLayouts/Profile/views/AboutView.qml @@ -81,7 +81,7 @@ Item { parent.font.underline = false } onClicked: { - appMain.openLink("https://status.im/privacy-policy/") + Global.openLink("https://status.im/privacy-policy/") } } } diff --git a/ui/app/AppLayouts/Profile/views/ContactsView.qml b/ui/app/AppLayouts/Profile/views/ContactsView.qml index 608317f266..d7f8872f15 100644 --- a/ui/app/AppLayouts/Profile/views/ContactsView.qml +++ b/ui/app/AppLayouts/Profile/views/ContactsView.qml @@ -259,12 +259,12 @@ Item { onCountChanged: searchResults.isAddedContact = searchResults.isContactAdded() onContactClicked: { - root.store.changeAppSectionBySectionType(Constants.appSection.chat) + Global.changeAppSectionBySectionType(Constants.appSection.chat) root.store.joinPrivateChat(contact.address) } onSendMessageActionTriggered: { - root.store.changeAppSectionBySectionType(Constants.appSection.chat) + Global.changeAppSectionBySectionType(Constants.appSection.chat) root.store.joinPrivateChat(contact.address) } diff --git a/ui/app/AppLayouts/Profile/views/DevicesView.qml b/ui/app/AppLayouts/Profile/views/DevicesView.qml index e0695743ef..73290e7db9 100644 --- a/ui/app/AppLayouts/Profile/views/DevicesView.qml +++ b/ui/app/AppLayouts/Profile/views/DevicesView.qml @@ -136,7 +136,7 @@ Item { MouseArea { cursorShape: Qt.PointingHandCursor anchors.fill: parent - onClicked: appMain.openLink("https://status.im/user_guides/pairing_devices.html") + onClicked: Global.openLink("https://status.im/user_guides/pairing_devices.html") } } } diff --git a/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml b/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml index a81752de9a..8387270dd6 100644 --- a/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml +++ b/ui/app/AppLayouts/Profile/views/EnsTermsAndConditionsView.qml @@ -178,7 +178,7 @@ Item { text: qsTrId("-a-href---1-2--look-up-on-etherscan--a-").arg(root.store.etherscanLink.replace("/tx", "/address")).arg(root.store.getEnsUsernameRegistrar()) anchors.left: parent.left anchors.right: parent.right - onLinkActivated: appMain.openLink(link) + onLinkActivated: Global.openLink(link) color: Theme.palette.directColor1 MouseArea { anchors.fill: parent @@ -202,7 +202,7 @@ Item { text: qsTrId("-a-href---1-2--look-up-on-etherscan--a-").arg(root.store.etherscanLink.replace("/tx", "/address")).arg(root.ensRegistry) anchors.left: parent.left anchors.right: parent.right - onLinkActivated: appMain.openLink(link) + onLinkActivated: Global.openLink(link) color: Theme.palette.directColor1 MouseArea { anchors.fill: parent diff --git a/ui/app/AppLayouts/Profile/views/HelpView.qml b/ui/app/AppLayouts/Profile/views/HelpView.qml index 0216d34086..633b359e04 100644 --- a/ui/app/AppLayouts/Profile/views/HelpView.qml +++ b/ui/app/AppLayouts/Profile/views/HelpView.qml @@ -158,7 +158,7 @@ Item { parent.font.underline = false } onClicked: { - appMain.openLink("https://status.im/docs/FAQs.html") + Global.openLink("https://status.im/docs/FAQs.html") } } } @@ -182,7 +182,7 @@ Item { parent.font.underline = false } onClicked: { - appMain.openLink("https://github.com/status-im/nim-status-client/issues/new") + Global.openLink("https://github.com/status-im/nim-status-client/issues/new") } } } @@ -206,7 +206,7 @@ Item { parent.font.underline = false } onClicked: { - appMain.openLink("https://discuss.status.im/c/features/51") + Global.openLink("https://discuss.status.im/c/features/51") } } } diff --git a/ui/app/AppLayouts/Profile/views/LeftTabView.qml b/ui/app/AppLayouts/Profile/views/LeftTabView.qml index 00b7555465..1042678b70 100644 --- a/ui/app/AppLayouts/Profile/views/LeftTabView.qml +++ b/ui/app/AppLayouts/Profile/views/LeftTabView.qml @@ -12,7 +12,7 @@ Item { property var store property var changeProfileSection: function (sectionId) { - Config.currentMenuTab = sectionId + Global.currentMenuTab = sectionId } StatusNavigationPanelHeadline { @@ -47,7 +47,7 @@ Item { if (!!menu_item.function_name && menu_item.function_name === "exit") { return confirmDialog.open() } - Config.currentMenuTab = menu_item.menu_id + Global.currentMenuTab = menu_item.menu_id } } } diff --git a/ui/app/AppLayouts/Wallet/WalletLayout.qml b/ui/app/AppLayouts/Wallet/WalletLayout.qml index 65f2d482bd..48d4841693 100644 --- a/ui/app/AppLayouts/Wallet/WalletLayout.qml +++ b/ui/app/AppLayouts/Wallet/WalletLayout.qml @@ -18,7 +18,7 @@ Item { property bool hideSignPhraseModal: false function showSigningPhrasePopup(){ - if(!hideSignPhraseModal && !localAccountSensitiveSettings.hideSignPhraseModal){ + if(!hideSignPhraseModal && !RootStore.hideSignPhraseModal){ signPhrasePopup.open(); } } @@ -26,7 +26,7 @@ Item { SignPhraseModal { id: signPhrasePopup onRemindLaterClicked: hideSignPhraseModal = true - onAcceptClicked: localAccountSensitiveSettings.hideSignPhraseModal = true + onAcceptClicked: { RootStore.hideSignPhraseModal(true); } } SeedPhraseBackupWarning { @@ -73,6 +73,7 @@ Item { rightPanel: RightTabView { id: walletContainer anchors.fill: parent + changeSelectedAccount: leftTab.changeSelectedAccount } } } diff --git a/ui/app/AppLayouts/Wallet/controls/AssetDelegate.qml b/ui/app/AppLayouts/Wallet/controls/AssetDelegate.qml index f96dea521c..07fbfbb868 100644 --- a/ui/app/AppLayouts/Wallet/controls/AssetDelegate.qml +++ b/ui/app/AppLayouts/Wallet/controls/AssetDelegate.qml @@ -8,6 +8,7 @@ import shared.panels 1.0 Item { id: assetDelegate + property string locale: "" property string currency: "" anchors.right: parent.right @@ -49,7 +50,7 @@ Item { } StyledText { id: assetBalance - text: Utils.toLocaleString(balance, localAppSettings.locale) + " " + symbol.toUpperCase() + text: Utils.toLocaleString(balance, locale) + " " + symbol.toUpperCase() anchors.right: parent.right anchors.rightMargin: 0 font.pixelSize: 15 @@ -58,7 +59,7 @@ Item { StyledText { id: assetCurrencyBalance color: Style.current.secondaryText - text: Utils.toLocaleString(currencyBalance.toFixed(2), localAppSettings.locale) + " " + assetDelegate.currency.toUpperCase() + text: Utils.toLocaleString(currencyBalance.toFixed(2), locale) + " " + assetDelegate.currency.toUpperCase() anchors.right: parent.right anchors.rightMargin: 0 anchors.bottom: parent.bottom diff --git a/ui/app/AppLayouts/Wallet/controls/TransactionDelegate.qml b/ui/app/AppLayouts/Wallet/controls/TransactionDelegate.qml index 5b92af1e53..59a200c767 100644 --- a/ui/app/AppLayouts/Wallet/controls/TransactionDelegate.qml +++ b/ui/app/AppLayouts/Wallet/controls/TransactionDelegate.qml @@ -13,6 +13,7 @@ Rectangle { property string ethValue: "" property bool isHovered: false property string symbol: "" + property string locale: "" property bool isIncoming: to === currentAccountAddress signal launchTransactionModal() @@ -141,7 +142,7 @@ Rectangle { } StyledText { id: timeValue - text: new Date(parseInt(timestamp)*1000).toLocaleString(localAppSettings.locale) + text: new Date(parseInt(timestamp)).toLocaleString(locale) font.pixelSize: Style.current.primaryTextFontSize anchors.rightMargin: Style.current.smallPadding } diff --git a/ui/app/AppLayouts/Wallet/controls/WalletDelegate.qml b/ui/app/AppLayouts/Wallet/controls/WalletDelegate.qml index 9736cceaf9..0a06fb7972 100644 --- a/ui/app/AppLayouts/Wallet/controls/WalletDelegate.qml +++ b/ui/app/AppLayouts/Wallet/controls/WalletDelegate.qml @@ -8,6 +8,7 @@ import shared.panels 1.0 Rectangle { id: walletDelegate + property string locale: "" property string currency: "" property int selectedAccountIndex property bool selected: index === selectedAccountIndex @@ -81,7 +82,7 @@ Rectangle { StyledText { id: walletBalance text: { - Utils.toLocaleString(currencyBalance.toFixed(2), localAppSettings.locale, {"currency": true}) + " " + walletDelegate.currency.toUpperCase() + Utils.toLocaleString(currencyBalance.toFixed(2), locale, {"currency": true}) + " " + walletDelegate.currency.toUpperCase() } anchors.top: parent.top anchors.topMargin: Style.current.smallPadding diff --git a/ui/app/AppLayouts/Wallet/panels/CollectiblesContainer.qml b/ui/app/AppLayouts/Wallet/panels/CollectiblesContainer.qml deleted file mode 100644 index a62c357c9b..0000000000 --- a/ui/app/AppLayouts/Wallet/panels/CollectiblesContainer.qml +++ /dev/null @@ -1,66 +0,0 @@ -import QtQuick 2.13 -import QtGraphicalEffects 1.13 - -import utils 1.0 -import shared 1.0 -import "../controls" - -Item { - id: collectiblesContainer - - property url collectibleIconSource: "CryptoKitties" - property string collectibleName: "CryptoKitties" - property bool collectiblesOpened: false - property var collectiblesModal - property string buttonText: "View in Cryptokitties" - property var getLink: function () {} - property var collectibles: { - if (error) { - return [] - } - - try { - var result = JSON.parse(collectiblesJSON) - if (typeof result === "string") { - return JSON.parse(result) - } - return result - } catch (e) { - console.error('Error parsing collectibles for:', collectibleName) - console.error('JSON:', collectiblesJSON) - console.error('Error:', e) - return [] - } - } - // Adding active instead of just using visible, because visible counts as false when the parent is not visible - property bool active: !!loading || !!error || collectibles.length > 0 - - signal reloadCollectibles(string collectibleType) - - visible: active - width: parent.width - height: visible ? collectiblesHeader.height + collectiblesContent.height : 0 - - CollectiblesHeader { - id: collectiblesHeader - collectibleName: collectiblesContainer.collectibleName - collectibleIconSource: collectiblesContainer.collectibleIconSource - collectiblesQty: collectibles.length - isLoading: loading - toggleCollectible: function () { - collectiblesContainer.collectiblesOpened = !collectiblesContainer.collectiblesOpened - } - } - - CollectiblesContent { - id: collectiblesContent - visible: collectiblesContainer.collectiblesOpened - collectiblesModal: collectiblesContainer.collectiblesModal - buttonText: collectiblesContainer.buttonText - getLink: collectiblesContainer.getLink() - anchors.top: collectiblesHeader.bottom - anchors.topMargin: Style.current.halfPadding - collectibles: collectiblesContainer.collectibles - onReloadCollectibles: reloadCollectibles(collectibleType) - } -} diff --git a/ui/app/AppLayouts/Wallet/panels/CollectiblesContent.qml b/ui/app/AppLayouts/Wallet/panels/CollectiblesContent.qml index 9361841eef..dad80d6423 100644 --- a/ui/app/AppLayouts/Wallet/panels/CollectiblesContent.qml +++ b/ui/app/AppLayouts/Wallet/panels/CollectiblesContent.qml @@ -62,7 +62,7 @@ ScrollView { anchors.top: somethingWentWrongText.bottom anchors.topMargin: Style.current.halfPadding onClicked: { - reloadCollectibleClicked(collectibleType) + reloadCollectibles(collectibleType); } } } diff --git a/ui/app/AppLayouts/Wallet/panels/TokenSettingsModalContent.qml b/ui/app/AppLayouts/Wallet/panels/TokenSettingsModalContent.qml index 7292b89953..9f401c6ff5 100644 --- a/ui/app/AppLayouts/Wallet/panels/TokenSettingsModalContent.qml +++ b/ui/app/AppLayouts/Wallet/panels/TokenSettingsModalContent.qml @@ -17,6 +17,7 @@ Item { property var customTokenList signal toggleVisibleClicked(string symbol) signal removeCustomTokenTriggered(string address) + signal tokenDetailsTriggered(string address, string name, string symbol, string decimals) SearchBox { id: searchBox @@ -101,7 +102,9 @@ Item { icon.source: Style.svg("make-admin") //% "Token details" text: qsTrId("token-details") - onTriggered: addCustomTokenModal.openWithData(address, name, symbol, decimals) + onTriggered: { + modalBody.tokenDetailsTriggered(address, name, symbol, decimals); + } } Action { icon.source: Style.svg("remove-from-group") diff --git a/ui/app/AppLayouts/Wallet/panels/WalletHeader.qml b/ui/app/AppLayouts/Wallet/panels/WalletHeader.qml index 94d484cd01..aa4a27b246 100644 --- a/ui/app/AppLayouts/Wallet/panels/WalletHeader.qml +++ b/ui/app/AppLayouts/Wallet/panels/WalletHeader.qml @@ -15,6 +15,7 @@ import "../stores" Item { id: walletHeader + property string locale: "" property string currency: "" property var currentAccount property var changeSelectedAccount @@ -55,7 +56,7 @@ Item { StyledText { id: walletBalance text: { - Utils.toLocaleString(currentAccount.currencyBalance.toFixed(2), localAppSettings.locale, {"currency": true}) + " " + walletHeader.currency.toUpperCase() + Utils.toLocaleString(currentAccount.currencyBalance.toFixed(2), locale, {"currency": true}) + " " + walletHeader.currency.toUpperCase() } anchors.left: separatorDot.right anchors.leftMargin: 8 @@ -98,6 +99,12 @@ Item { onClosed: { destroy(); } + onAddCustomTokenTriggered: { + addCustomTokenModal.openEditable(); + } + onTokenDetailsTriggered: { + addCustomTokenModal.openWithData(address, name, symbol, decimals); + } } } diff --git a/ui/app/AppLayouts/Wallet/popups/AccountSettingsModal.qml b/ui/app/AppLayouts/Wallet/popups/AccountSettingsModal.qml index c08bf3cac4..63167209da 100644 --- a/ui/app/AppLayouts/Wallet/popups/AccountSettingsModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/AccountSettingsModal.qml @@ -146,8 +146,16 @@ ModalPopup { text: qsTrId("a-deleted-account-cannot-be-retrieved-later.-only-press-yes-if-you-backed-up-your-key/seed-or-don't-care-about-this-account-anymore") icon: StandardIcon.Warning standardButtons: StandardButton.Yes | StandardButton.No - onYes: { - RootStore.deleteAccount(currentAccount.address)// Change active account to the first + onAccepted: { + const error = RootStore.deleteAccount(currentAccount.address) + if (error) { + Global.playErrorSound(); + deleteError.text = error + deleteError.open() + return + } + + // Change active account to the first changeSelectedAccount(0) popup.close(); } @@ -169,7 +177,7 @@ ModalPopup { MessageDialog { id: changeError - title: "Changing settings failed" + title: qsTr("Changing settings failed") icon: StandardIcon.Critical standardButtons: StandardButton.Ok } @@ -182,7 +190,7 @@ ModalPopup { const error = RootStore.updateCurrentAccount(currentAccount.address, accountNameInput.text, accountColorInput.selectedColor); if (error) { - errorSound.play() + Global.playErrorSound(); changeError.text = error changeError.open() return diff --git a/ui/app/AppLayouts/Wallet/popups/AddAccountWithPrivateKeyModal.qml b/ui/app/AppLayouts/Wallet/popups/AddAccountWithPrivateKeyModal.qml index 406a8d1cd5..c9f7557713 100644 --- a/ui/app/AppLayouts/Wallet/popups/AddAccountWithPrivateKeyModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/AddAccountWithPrivateKeyModal.qml @@ -143,7 +143,7 @@ ModalPopup { loading = false if (errMessage) { - errorSound.play(); + Global.playErrorSound(); if (Utils.isInvalidPasswordMessage(errMessage)) { //% "Wrong password" popup.passwordValidationError = qsTrId("wrong-password") diff --git a/ui/app/AppLayouts/Wallet/popups/AddAccountWithSeedModal.qml b/ui/app/AppLayouts/Wallet/popups/AddAccountWithSeedModal.qml index 22435c1c54..30e33490cc 100644 --- a/ui/app/AppLayouts/Wallet/popups/AddAccountWithSeedModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/AddAccountWithSeedModal.qml @@ -136,14 +136,14 @@ ModalPopup { // TODO the loading doesn't work because the function freezes the view. Might need to use threads loading = true if (!validate() || !seedPhraseTextArea.validateSeed()) { - errorSound.play() + Global.playErrorSound(); return loading = false } const errMessage = RootStore.addAccountsFromSeed(seedPhraseTextArea.textArea.text, passwordInput.text, accountNameInput.text, accountColorInput.selectedColor) loading = false if (errMessage) { - errorSound.play(); + Global.playErrorSound(); if (Utils.isInvalidPasswordMessage(errMessage)) { //% "Wrong password" popup.passwordValidationError = qsTrId("wrong-password") diff --git a/ui/app/AppLayouts/Wallet/popups/AddCustomTokenModal.qml b/ui/app/AppLayouts/Wallet/popups/AddCustomTokenModal.qml index 7ad6cf3f47..a9a5a3ae2b 100644 --- a/ui/app/AppLayouts/Wallet/popups/AddCustomTokenModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/AddCustomTokenModal.qml @@ -1,6 +1,6 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 -import QtQuick.Layouts 1.13 +import QtQuick.Dialogs 1.3 import utils 1.0 @@ -148,6 +148,13 @@ ModalPopup { height: addBtn.height visible: editable + MessageDialog { + id: changeError + title: qsTr("Changing settings failed") + icon: StandardIcon.Critical + standardButtons: StandardButton.Ok + } + StatusButton { id: addBtn anchors.top: parent.top @@ -162,10 +169,10 @@ ModalPopup { const error = RootStore.addCustomToken(addressInput.text, nameInput.text, symbolInput.text, decimalsInput.text); if (error) { - errorSound.play() - changeError.text = error - changeError.open() - return + Global.playErrorSound(); + changeError.text = error; + changeError.open(); + return; } popup.close(); } diff --git a/ui/app/AppLayouts/Wallet/popups/AddNewAccountMenu.qml b/ui/app/AppLayouts/Wallet/popups/AddNewAccountMenu.qml index 9de7f7f1fe..fa898d2029 100644 --- a/ui/app/AppLayouts/Wallet/popups/AddNewAccountMenu.qml +++ b/ui/app/AppLayouts/Wallet/popups/AddNewAccountMenu.qml @@ -12,6 +12,11 @@ PopupMenu { width: 260 closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent + signal generateNewAccountTriggered(); + signal addWatchAccountTriggered(); + signal enterSeedPhraseTriggered(); + signal enterPrivateKeyTriggered(); + Action { //% "Generate an account" text: qsTrId("generate-a-new-account") @@ -19,7 +24,7 @@ PopupMenu { icon.width: 19 icon.height: 19 onTriggered: { - generateAccountModal.open() + newAccountMenu.generateNewAccountTriggered(); } } Action { @@ -29,7 +34,7 @@ PopupMenu { icon.width: 19 icon.height: 19 onTriggered: { - addWatchOnlyAccountModal.open() + newAccountMenu.addWatchAccountTriggered(); } } Action { @@ -39,7 +44,7 @@ PopupMenu { icon.width: 19 icon.height: 19 onTriggered: { - addAccountWithSeedModal.open() + newAccountMenu.enterSeedPhraseTriggered(); } } Action { @@ -49,7 +54,7 @@ PopupMenu { icon.width: 19 icon.height: 19 onTriggered: { - addAccountWithPrivateKeydModal.open() + newAccountMenu.enterPrivateKeyTriggered(); } } } diff --git a/ui/app/AppLayouts/Wallet/popups/AddWatchOnlyAccountModal.qml b/ui/app/AppLayouts/Wallet/popups/AddWatchOnlyAccountModal.qml index 46f10d0d6d..a73136e46f 100644 --- a/ui/app/AppLayouts/Wallet/popups/AddWatchOnlyAccountModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/AddWatchOnlyAccountModal.qml @@ -108,14 +108,14 @@ ModalPopup { // TODO the loaidng doesn't work because the function freezes th eview. Might need to use threads loading = true if (!validate()) { - errorSound.play() + Global.playErrorSound(); return loading = false } const error = RootStore.addWatchOnlyAccount(addressInput.text, accountNameInput.text, accountColorInput.selectedColor); loading = false if (error) { - errorSound.play() + Global.playErrorSound(); accountError.text = error return accountError.open() } diff --git a/ui/app/AppLayouts/Wallet/popups/CollectibleModal.qml b/ui/app/AppLayouts/Wallet/popups/CollectibleModal.qml index 10395a6a1a..b33be7a97b 100644 --- a/ui/app/AppLayouts/Wallet/popups/CollectibleModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/CollectibleModal.qml @@ -2,10 +2,9 @@ import QtQuick 2.13 import QtGraphicalEffects 1.13 import utils 1.0 -import "../../../../shared" -import "../../../../shared/popups" -import "../../../../shared/panels" -import "../../../../shared/status" +import shared.popups 1.0 +import shared.panels 1.0 +import shared.status 1.0 // TODO: replace with StatusModal ModalPopup { @@ -62,8 +61,7 @@ ModalPopup { anchors.rightMargin: Style.current.padding text: qsTr("View in Opensea") onClicked: { - //TOOD improve this to not use dynamic scoping - appMain.openLink(root.permalink); + Global.openLink(root.permalink); root.close(); } } diff --git a/ui/app/AppLayouts/Wallet/popups/CollectiblesModal.qml b/ui/app/AppLayouts/Wallet/popups/CollectiblesModal.qml index ec78cfbed9..771d85230f 100644 --- a/ui/app/AppLayouts/Wallet/popups/CollectiblesModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/CollectiblesModal.qml @@ -45,7 +45,7 @@ ModalPopup { text: popup.buttonText anchors.top: parent.top onClicked: { - appMain.openLink(popup.buttonLink) + Global.openLink(popup.buttonLink) popup.close() } } diff --git a/ui/app/AppLayouts/Wallet/popups/GenerateAccountModal.qml b/ui/app/AppLayouts/Wallet/popups/GenerateAccountModal.qml index c4e86b8045..225e836821 100644 --- a/ui/app/AppLayouts/Wallet/popups/GenerateAccountModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/GenerateAccountModal.qml @@ -108,7 +108,7 @@ ModalPopup { // TODO the loaidng doesn't work because the function freezes th eview. Might need to use threads loading = true if (!validate()) { - errorSound.play() + Global.playErrorSound(); return loading = false } @@ -116,7 +116,7 @@ ModalPopup { console.log(errMessage) loading = false if (errMessage) { - errorSound.play(); + Global.playErrorSound(); if (Utils.isInvalidPasswordMessage(errMessage)) { //% "Wrong password" popup.passwordValidationError = qsTrId("wrong-password") diff --git a/ui/app/AppLayouts/Wallet/popups/ReceiveModal.qml b/ui/app/AppLayouts/Wallet/popups/ReceiveModal.qml index 601241e3bb..ab6b72d984 100644 --- a/ui/app/AppLayouts/Wallet/popups/ReceiveModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/ReceiveModal.qml @@ -54,7 +54,7 @@ ModalPopup { anchors.horizontalCenter: parent.horizontalCenter width: 240 dropdownWidth: parent.width - (Style.current.padding * 2) - dropdownAlignment: Select.MenuAlignment.Center + dropdownAlignment: StatusSelect.MenuAlignment.Center onSelectedAccountChanged: { if (selectedAccount.address) { qrCodeImage.source = RootStore.getQrCode(selectedAccount.address) diff --git a/ui/app/AppLayouts/Wallet/popups/TokenSettingsModal.qml b/ui/app/AppLayouts/Wallet/popups/TokenSettingsModal.qml index a5f756cd5f..9b768c5b34 100644 --- a/ui/app/AppLayouts/Wallet/popups/TokenSettingsModal.qml +++ b/ui/app/AppLayouts/Wallet/popups/TokenSettingsModal.qml @@ -14,7 +14,9 @@ ModalPopup { id: popup //% "Manage Assets" title: qsTrId("manage-assets") - + signal addCustomTokenTriggered() + signal tokenDetailsTriggered(string address, string address, string address, string address) + TokenSettingsModalContent { id: settingsModalContent anchors.left: parent.left @@ -32,6 +34,9 @@ ModalPopup { onRemoveCustomTokenTriggered: { RootStore.removeCustomToken(address) } + onTokenDetailsTriggered: { + popup.tokenDetailsTriggered(address, name, symbol, decimals); + } } footer: StatusButton { @@ -39,6 +44,8 @@ ModalPopup { //% "Add custom token" text: qsTrId("add-custom-token") anchors.top: parent.top - onClicked: addCustomTokenModal.openEditable() + onClicked: { + popup.addCustomTokenTriggered(); + } } } diff --git a/ui/app/AppLayouts/Wallet/stores/RootStore.qml b/ui/app/AppLayouts/Wallet/stores/RootStore.qml index 26df2cd571..e884cba8d9 100644 --- a/ui/app/AppLayouts/Wallet/stores/RootStore.qml +++ b/ui/app/AppLayouts/Wallet/stores/RootStore.qml @@ -4,9 +4,12 @@ import QtQuick 2.13 QtObject { id: root - property var currentAccount: walletSectionCurrent property var accounts: walletSectionAccounts.model + property var appSettings: localAppSettings + property var accountSensitiveSettings: localAccountSensitiveSettings + property string locale: appSettings.locale + property bool hideSignPhraseModal: accountSensitiveSettings.hideSignPhraseModal property string currentCurrency: walletSection.currentCurrency property string totalCurrencyBalance: walletSection.totalCurrencyBalance @@ -60,14 +63,18 @@ QtObject { property ListModel exampleAssetModel: ListModel { ListElement { - value: "123 USD" + name: "Ethereum" symbol: "ETH" - fullTokenName: "Ethereum" - fiatBalanceDisplay: "3423 ETH" - image: "token-icons/eth" + balance: "3423 ETH" + address: "token-icons/eth" + currencyBalance: "123 USD" } } + function hideSignPhraseModal(value) { + localAccountSensitiveSettings.hideSignPhraseModal = value; + } + function getLatestBlockNumber() { // TODO: Move to transaction root module and not wallet return walletModel.getLatestBlockNumber() diff --git a/ui/app/AppLayouts/Wallet/views/AssetsView.qml b/ui/app/AppLayouts/Wallet/views/AssetsView.qml index 0a41826a8c..37e2ff824b 100644 --- a/ui/app/AppLayouts/Wallet/views/AssetsView.qml +++ b/ui/app/AppLayouts/Wallet/views/AssetsView.qml @@ -22,9 +22,10 @@ Item { id: assetListView spacing: Style.current.padding * 2 anchors.fill: parent - // model: RootStore.exampleAssetModel + //model: RootStore.exampleAssetModel model: RootStore.assets delegate: AssetDelegate { + locale: RootStore.locale currency: RootStore.currentCurrency } boundsBehavior: Flickable.StopAtBounds diff --git a/ui/app/AppLayouts/Wallet/views/HistoryView.qml b/ui/app/AppLayouts/Wallet/views/HistoryView.qml index a822da4edc..7801ea154e 100644 --- a/ui/app/AppLayouts/Wallet/views/HistoryView.qml +++ b/ui/app/AppLayouts/Wallet/views/HistoryView.qml @@ -81,6 +81,7 @@ Item { model: RootStore.historyTransactions delegate: TransactionDelegate { tokens: RootStore.tokens + locale: RootStore.locale currentAccountAddress: RootStore.currentAccount.address ethValue: RootStore.hex2Eth(value) onLaunchTransactionModal: { diff --git a/ui/app/AppLayouts/Wallet/views/LeftTabView.qml b/ui/app/AppLayouts/Wallet/views/LeftTabView.qml index b7d8fb1300..a8aa771d3a 100644 --- a/ui/app/AppLayouts/Wallet/views/LeftTabView.qml +++ b/ui/app/AppLayouts/Wallet/views/LeftTabView.qml @@ -92,6 +92,18 @@ Rectangle { addAccountButton.state = "default"; addAccountButton.checked = false; } + onGenerateNewAccountTriggered: { + generateAccountModal.open(); + } + onAddWatchAccountTriggered: { + addWatchOnlyAccountModal.open(); + } + onEnterSeedPhraseTriggered: { + addAccountWithSeedModal.open(); + } + onEnterPrivateKeyTriggered: { + addAccountWithPrivateKeydModal.open(); + } } GenerateAccountModal { @@ -134,6 +146,7 @@ Rectangle { delegate: WalletDelegate { currency: RootStore.currentCurrency + locale: RootStore.locale selectedAccountIndex: walletInfoContainer.selectedAccountIndex onClicked: { changeSelectedAccount(index) diff --git a/ui/app/AppLayouts/Wallet/views/RightTabView.qml b/ui/app/AppLayouts/Wallet/views/RightTabView.qml index 3507853eec..505cbebd89 100644 --- a/ui/app/AppLayouts/Wallet/views/RightTabView.qml +++ b/ui/app/AppLayouts/Wallet/views/RightTabView.qml @@ -16,13 +16,15 @@ import "../panels" Item { id: walletContainer + property var changeSelectedAccount property alias currentTabIndex: walletTabBar.currentIndex WalletHeader { id: walletHeader - changeSelectedAccount: leftTab.changeSelectedAccount - currentAccount: RootStore.currentAccount + locale: RootStore.locale currency: RootStore.currentCurrency + currentAccount: RootStore.currentAccount + changeSelectedAccount: changeSelectedAccount } RowLayout { diff --git a/ui/app/AppLayouts/Wallet/views/collectibles/CollectibleDetailView.qml b/ui/app/AppLayouts/Wallet/views/collectibles/CollectibleDetailView.qml index 2c13481304..1aeb518a32 100644 --- a/ui/app/AppLayouts/Wallet/views/collectibles/CollectibleDetailView.qml +++ b/ui/app/AppLayouts/Wallet/views/collectibles/CollectibleDetailView.qml @@ -8,6 +8,7 @@ import StatusQ.Core 0.1 import StatusQ.Controls 0.1 import "../" +import "../../stores" import "../../controls" StackDetailBase { diff --git a/ui/app/AppLayouts/WalletV2/popups/CryptoServicesModal.qml b/ui/app/AppLayouts/WalletV2/popups/CryptoServicesModal.qml index c411d3bc6d..759de9c877 100644 --- a/ui/app/AppLayouts/WalletV2/popups/CryptoServicesModal.qml +++ b/ui/app/AppLayouts/WalletV2/popups/CryptoServicesModal.qml @@ -105,8 +105,7 @@ StatusModal { cursorShape: Qt.PointingHandCursor onClicked: { - //TOOD improve this to not use dynamic scoping - appMain.openLink(siteUrl); + Global.openLink(siteUrl); cryptoServicesPopupRoot.close(); } } diff --git a/ui/app/AppLayouts/WalletV2/stores/RootStore.qml b/ui/app/AppLayouts/WalletV2/stores/RootStore.qml index 4a2c88acc7..ba421bc281 100644 --- a/ui/app/AppLayouts/WalletV2/stores/RootStore.qml +++ b/ui/app/AppLayouts/WalletV2/stores/RootStore.qml @@ -115,8 +115,7 @@ QtObject { function addAccount(text, model, keyOrSeedValid, accountNameInput) { root.loadingAccounts = true; if (!root.validateAddAccountPopup(text, model, keyOrSeedValid, accountNameInput.nameInputValid)) { - //TOOD improve this to not use dynamic scoping - errorSound.play(); + Global.playErrorSound(); root.loadingAccounts = false; } else { //TODO account color to be verified with design @@ -138,8 +137,7 @@ QtObject { accountError.text = resultJson.error; accountError.open(); } - //TOOD improve this to not use dynamic scoping - errorSound.play(); + Global.playErrorSound(); return; } } diff --git a/ui/app/AppMain.qml b/ui/app/AppMain.qml index 595ecddee6..f4a5be4286 100644 --- a/ui/app/AppMain.qml +++ b/ui/app/AppMain.qml @@ -41,8 +41,14 @@ Item { signal settingsLoaded() signal openContactsPopup() - function changeAppSectionBySectionType(sectionType) { - mainModule.setActiveSectionBySectionType(sectionType) + Connections { + target: Global + onOpenLinkInBrowser: { + browserLayoutContainer.item.openUrlInNewTab(link); + } + onOpenChooseBrowserPopup: { + appMain.openPopup(chooseBrowserPopupComponent, {link: link}) + } } function changeAppSectionBySectionId(sectionId) { @@ -115,19 +121,6 @@ Item { return "" } - function openLink(link) { - if (localAccountSensitiveSettings.showBrowserSelector) { - appMain.openPopup(chooseBrowserPopupComponent, {link: link}) - } else { - if (localAccountSensitiveSettings.openLinksInStatus) { - appMain.changeAppSectionBySectionType(Constants.appSection.browser) - browserLayoutContainer.item.openUrlInNewTab(link) - } else { - Qt.openUrlExternally(link) - } - } - } - function openProfilePopup(userNameParam, fromAuthorParam, identiconParam, textParam, nicknameParam, parentPopup){ var popup = profilePopupComponent.createObject(appMain); if(parentPopup){ @@ -158,11 +151,6 @@ Item { } } - Audio { - id: errorSound - track: "error.mp3" - } - Audio { id: sendMessageSound track: "send_message.wav" @@ -429,7 +417,7 @@ Item { Layout.alignment: Qt.AlignLeft | Qt.AlignTop Layout.fillHeight: true onProfileButtonClicked: { - appMain.changeAppSectionBySectionType(Constants.appSection.profile); + Global.changeAppSectionBySectionType(Constants.appSection.profile); } onOpenAppSearch: { @@ -522,7 +510,7 @@ Item { Layout.fillHeight: true onProfileButtonClicked: { - appMain.changeAppSectionBySectionType(Constants.appSection.profile); + Global.changeAppSectionBySectionType(Constants.appSection.profile); } onOpenAppSearch: { @@ -774,19 +762,19 @@ Item { Action { shortcut: "Ctrl+1" - onTriggered: changeAppSectionBySectionType(Constants.appSection.chat) + onTriggered: Global.changeAppSectionBySectionType(Constants.appSection.chat) } Action { shortcut: "Ctrl+2" - onTriggered: changeAppSectionBySectionType(Constants.appSection.browser) + onTriggered: Global.changeAppSectionBySectionType(Constants.appSection.browser) } Action { shortcut: "Ctrl+3" - onTriggered: changeAppSectionBySectionType(Constants.appSection.wallet) + onTriggered: Global.changeAppSectionBySectionType(Constants.appSection.wallet) } Action { shortcut: "Ctrl+4, Ctrl+," - onTriggered: changeAppSectionBySectionType(Constants.appSection.profile) + onTriggered: Global.changeAppSectionBySectionType(Constants.appSection.profile) } Action { shortcut: "Ctrl+K" @@ -837,7 +825,7 @@ Item { }); } onClicked: function (index) { - appMain.changeAppSectionBySectionType(Constants.appSection.chat) + Global.changeAppSectionBySectionType(Constants.appSection.chat) chatsModel.channelView.setActiveChannelByIndex(index) channelPicker.close() } diff --git a/ui/imports/shared/popups/DownloadModal.qml b/ui/imports/shared/popups/DownloadModal.qml index 885432e548..5eb4f5426f 100644 --- a/ui/imports/shared/popups/DownloadModal.qml +++ b/ui/imports/shared/popups/DownloadModal.qml @@ -64,7 +64,7 @@ ModalPopup { qsTr("Download") : qsTr("Ok") anchors.right: parent.right - onClicked: newVersionAvailable ? appMain.openLink(downloadURL) : close() + onClicked: newVersionAvailable ? Global.openLink(downloadURL) : close() } } diff --git a/ui/imports/shared/popups/ToastMessage.qml b/ui/imports/shared/popups/ToastMessage.qml index fc506620a8..528101534e 100644 --- a/ui/imports/shared/popups/ToastMessage.qml +++ b/ui/imports/shared/popups/ToastMessage.qml @@ -125,7 +125,7 @@ Popup { font.pixelSize: 13 font.weight: Font.Medium onLinkActivated: { - appMain.openLink(root.link) + Global.openLink(root.link) root.close() } } diff --git a/ui/imports/shared/views/chat/ChatTextView.qml b/ui/imports/shared/views/chat/ChatTextView.qml index 04b3faa7ab..e171089358 100644 --- a/ui/imports/shared/views/chat/ChatTextView.qml +++ b/ui/imports/shared/views/chat/ChatTextView.qml @@ -65,7 +65,7 @@ Item { if(root.store.chatsModelInst.communities.activeCommunity.active) { root.store.chatsModelInst.channelView.joinPublicChat(channelName) - appMain.changeAppSectionBySectionType(Constants.appSection.chat) + Global.changeAppSectionBySectionType(Constants.appSection.chat) } return } @@ -76,7 +76,7 @@ Item { { if(root.store.chatsModelInst.communities.activeCommunity.active) { root.store.chatsModelInst.channelView.joinPublicChat(channelName) - appMain.changeAppSectionBySectionType(Constants.appSection.chat) + Global.changeAppSectionBySectionType(Constants.appSection.chat) } root.store.chatsModelInst.channelView.setActiveChannel(channelName); } @@ -104,7 +104,7 @@ Item { } - appMain.openLink(link) + Global.openLink(link) } onLinkHovered: { diff --git a/ui/imports/shared/views/chat/LinksMessageView.qml b/ui/imports/shared/views/chat/LinksMessageView.qml index c67d051109..4788ce6fff 100644 --- a/ui/imports/shared/views/chat/LinksMessageView.qml +++ b/ui/imports/shared/views/chat/LinksMessageView.qml @@ -282,7 +282,7 @@ Column { return linkData.callback() } - appMain.openLink(linkData.address) + Global.openLink(linkData.address) } } } @@ -361,7 +361,7 @@ Column { //% "Enable in Settings" text: qsTrId("enable-in-settings") onClicked: { - appMain.changeAppSectionBySectionType(Constants.appSection.profile) + Global.changeAppSectionBySectionType(Constants.appSection.profile) // TODO: replace with shared store constant // Profile/RootStore.privacy_and_security_id profileLayoutContainer.changeProfileSection(3) diff --git a/ui/imports/shared/views/chat/MessageContextMenuView.qml b/ui/imports/shared/views/chat/MessageContextMenuView.qml index eca6ff2519..4f9e0a30fd 100644 --- a/ui/imports/shared/views/chat/MessageContextMenuView.qml +++ b/ui/imports/shared/views/chat/MessageContextMenuView.qml @@ -255,7 +255,7 @@ StatusPopupMenu { qsTrId("reply-to") onTriggered: { if (root.isProfile) { - appMain.changeAppSectionBySectionType(Constants.appSection.chat) + Global.changeAppSectionBySectionType(Constants.appSection.chat) root.store.chatsModelInst.channelView.joinPrivateChat(fromAuthor, "") } else { showReplyArea() diff --git a/ui/imports/utils/Config.qml b/ui/imports/utils/Config.qml deleted file mode 100644 index 16b812dc4c..0000000000 --- a/ui/imports/utils/Config.qml +++ /dev/null @@ -1,8 +0,0 @@ -pragma Singleton - -import QtQuick 2.13 - -QtObject { - - property int currentMenuTab: 0 -} diff --git a/ui/imports/utils/Global.qml b/ui/imports/utils/Global.qml new file mode 100644 index 0000000000..72019735ca --- /dev/null +++ b/ui/imports/utils/Global.qml @@ -0,0 +1,36 @@ +pragma Singleton + +import QtQuick 2.13 + +QtObject { + + property int currentMenuTab: 0 + property var errorSound: Audio { + id: errorSound + track: Qt.resolvedUrl("../assets/audio/error.mp3") + } + property var mainModuleInst: mainModule + signal openLinkInBrowser(string link) + signal openChooseBrowserPopup(string link) + + function changeAppSectionBySectionType(sectionType) { + mainModuleInst.setActiveSectionBySectionType(sectionType) + } + + function openLink(link) { + if (localAccountSensitiveSettings.showBrowserSelector) { + openChooseBrowserPopup(link); + } else { + if (localAccountSensitiveSettings.openLinksInStatus) { + changeAppSectionBySectionType(Constants.appSection.browser); + openLinkInBrowser(link); + } else { + Qt.openUrlExternally(link); + } + } + } + + function playErrorSound() { + errorSound.play(); + } +} diff --git a/ui/imports/utils/qmldir b/ui/imports/utils/qmldir index 84a3aacf94..d21c81778b 100644 --- a/ui/imports/utils/qmldir +++ b/ui/imports/utils/qmldir @@ -1,7 +1,7 @@ singleton Style 1.0 Style.qml singleton Utils 1.0 Utils.qml singleton Emoji 1.0 Emoji.qml -singleton Config 1.0 Config.qml +singleton Global 1.0 Global.qml singleton Constants 1.0 Constants.qml singleton SelectedMessage 1.0 SelectedMessage.qml singleton Backpressure 1.0 Backpressure/Backpressure.qml diff --git a/ui/shared/status/StatusIconTabButton.qml b/ui/shared/status/StatusIconTabButton.qml index f86477f234..5b8d701961 100644 --- a/ui/shared/status/StatusIconTabButton.qml +++ b/ui/shared/status/StatusIconTabButton.qml @@ -29,7 +29,7 @@ TabButton { } chatsModel.communities.activeCommunity.active = false - appMain.changeAppSectionBySectionType(section) + Global.changeAppSectionBySectionType(section) } icon.height: 24