diff --git a/ui/app/AppLayouts/Chat/ChatColumn/ChatInput.qml b/ui/app/AppLayouts/Chat/ChatColumn/ChatInput.qml index ebc6bbb356..2d514fd757 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/ChatInput.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/ChatInput.qml @@ -11,11 +11,6 @@ Rectangle { visible: chatsModel.activeChannel.chatType !== Constants.chatTypePrivateGroupChat || chatsModel.activeChannel.isMember(profileModel.profile.pubKey) - Audio { - id: sendMessageSound - source: "../../../../sounds/send_message.wav" - } - function onEnter(event){ if (event.modifiers === Qt.NoModifier && (event.key === Qt.Key_Enter || event.key === Qt.Key_Return)) { if(txtData.text.trim().length > 0){ diff --git a/ui/app/AppLayouts/Wallet/AccountSettingsModal.qml b/ui/app/AppLayouts/Wallet/AccountSettingsModal.qml index b62583e2f5..f6bbf53d80 100644 --- a/ui/app/AppLayouts/Wallet/AccountSettingsModal.qml +++ b/ui/app/AppLayouts/Wallet/AccountSettingsModal.qml @@ -4,7 +4,6 @@ import QtQuick.Layouts 1.13 import QtQuick.Dialogs 1.3 import "../../../imports" import "../../../shared" -import "../../../sounds" ModalPopup { property var currentAccount: walletModel.currentAccount @@ -34,12 +33,6 @@ ModalPopup { accountNameInput.forceActiveFocus(Qt.MouseFocusReason) } - Item { - ErrorSound { - id: errorSound - } - } - Input { id: accountNameInput //% "Enter an account name..." diff --git a/ui/app/AppLayouts/Wallet/AddCustomTokenModal.qml b/ui/app/AppLayouts/Wallet/AddCustomTokenModal.qml index 4294db33f0..3c07b2b7ec 100644 --- a/ui/app/AppLayouts/Wallet/AddCustomTokenModal.qml +++ b/ui/app/AppLayouts/Wallet/AddCustomTokenModal.qml @@ -3,7 +3,6 @@ import QtQuick.Controls 2.13 import QtQuick.Layouts 1.13 import "../../../imports" import "../../../shared" -import "../../../sounds" ModalPopup { id: popup @@ -17,12 +16,6 @@ ModalPopup { accountNameInput.forceActiveFocus(Qt.MouseFocusReason) } - Item { - ErrorSound { - id: errorSound - } - } - Input { id: addressInput //% "Enter contract address..." diff --git a/ui/app/AppLayouts/Wallet/components/AddAccountWithPrivateKey.qml b/ui/app/AppLayouts/Wallet/components/AddAccountWithPrivateKey.qml index 7d6545c1fe..0349cfb9ff 100644 --- a/ui/app/AppLayouts/Wallet/components/AddAccountWithPrivateKey.qml +++ b/ui/app/AppLayouts/Wallet/components/AddAccountWithPrivateKey.qml @@ -2,7 +2,6 @@ import QtQuick 2.13 import QtQuick.Dialogs 1.3 import "../../../../imports" import "../../../../shared" -import "../../../../sounds" ModalPopup { id: popup @@ -53,12 +52,6 @@ ModalPopup { passwordInput.forceActiveFocus(Qt.MouseFocusReason) } - Item { - ErrorSound { - id: errorSound - } - } - Input { id: passwordInput //% "Enter your password…" diff --git a/ui/app/AppLayouts/Wallet/components/AddAccountWithSeed.qml b/ui/app/AppLayouts/Wallet/components/AddAccountWithSeed.qml index 6c2dba06b4..f6d81b2c27 100644 --- a/ui/app/AppLayouts/Wallet/components/AddAccountWithSeed.qml +++ b/ui/app/AppLayouts/Wallet/components/AddAccountWithSeed.qml @@ -2,7 +2,6 @@ import QtQuick 2.13 import QtQuick.Dialogs 1.3 import "../../../../imports" import "../../../../shared" -import "../../../../sounds" ModalPopup { id: popup @@ -54,12 +53,6 @@ ModalPopup { //% "Add account with a seed phrase" title: qsTrId("add-seed-account") - Item { - ErrorSound { - id: errorSound - } - } - Input { id: passwordInput //% "Enter your password…" diff --git a/ui/app/AppLayouts/Wallet/components/AddWatchOnlyAccount.qml b/ui/app/AppLayouts/Wallet/components/AddWatchOnlyAccount.qml index 4fc488b699..0ffb994510 100644 --- a/ui/app/AppLayouts/Wallet/components/AddWatchOnlyAccount.qml +++ b/ui/app/AppLayouts/Wallet/components/AddWatchOnlyAccount.qml @@ -2,7 +2,6 @@ import QtQuick 2.13 import QtQuick.Dialogs 1.3 import "../../../../imports" import "../../../../shared" -import "../../../../sounds" ModalPopup { id: popup @@ -41,12 +40,6 @@ ModalPopup { addressInput.forceActiveFocus(Qt.MouseFocusReason) } - Item { - ErrorSound { - id: errorSound - } - } - Input { id: addressInput // TODO add QR code reader for the address diff --git a/ui/app/AppLayouts/Wallet/components/GenerateAccountModal.qml b/ui/app/AppLayouts/Wallet/components/GenerateAccountModal.qml index de9e2ec469..dc0cc1d00c 100644 --- a/ui/app/AppLayouts/Wallet/components/GenerateAccountModal.qml +++ b/ui/app/AppLayouts/Wallet/components/GenerateAccountModal.qml @@ -2,7 +2,6 @@ import QtQuick 2.13 import QtQuick.Dialogs 1.3 import "../../../../imports" import "../../../../shared" -import "../../../../sounds" ModalPopup { id: popup @@ -41,12 +40,6 @@ ModalPopup { passwordInput.forceActiveFocus(Qt.MouseFocusReason) } - Item { - ErrorSound { - id: errorSound - } - } - Input { id: passwordInput //% "Enter your password…" diff --git a/ui/main.qml b/ui/main.qml index 77af783791..1f13222ef7 100644 --- a/ui/main.qml +++ b/ui/main.qml @@ -3,10 +3,12 @@ import QtQuick.Controls 2.13 import QtQuick.Layouts 1.13 import Qt.labs.platform 1.1 import QtQml.StateMachine 1.14 as DSM +import QtMultimedia 5.13 import Qt.labs.settings 1.0 import QtQml 2.13 import "./onboarding" import "./app" +import "./sounds" import "./imports" ApplicationWindow { @@ -29,6 +31,20 @@ ApplicationWindow { signal navigateTo(string path) + Item { + ErrorSound { + id: errorSound + } + } + + Item { + Audio { + id: sendMessageSound + audioRole: NotificationRole + source: "../../../../sounds/send_message.wav" + } + } + Settings { id: settings property var chatSplitView diff --git a/ui/onboarding/CreatePasswordModal.qml b/ui/onboarding/CreatePasswordModal.qml index ccff727971..05f8740571 100644 --- a/ui/onboarding/CreatePasswordModal.qml +++ b/ui/onboarding/CreatePasswordModal.qml @@ -3,7 +3,6 @@ import QtQuick.Controls 2.13 import QtQuick.Dialogs 1.3 import "../imports" import "../shared" -import "../sounds" ModalPopup { property bool loading: false @@ -44,12 +43,6 @@ ModalPopup { firstPasswordField.forceActiveFocus(Qt.MouseFocusReason) } - Item { - ErrorSound { - id: errorSound - } - } - Input { id: firstPasswordField anchors.rightMargin: 56 diff --git a/ui/onboarding/ExistingKey.qml b/ui/onboarding/ExistingKey.qml index e77657c19d..45bc2850ad 100644 --- a/ui/onboarding/ExistingKey.qml +++ b/ui/onboarding/ExistingKey.qml @@ -1,6 +1,5 @@ import QtQuick 2.13 import QtQuick.Controls 2.13 -import "../sounds" Item { property var onClosed: function () {} @@ -11,10 +10,6 @@ Item { enterSeedPhraseModal.open() } - ErrorSound { - id: errorSound - } - EnterSeedPhraseModal { property bool wentNext: false id: enterSeedPhraseModal diff --git a/ui/onboarding/Login.qml b/ui/onboarding/Login.qml index 7c358e9ba1..0cddb1b95b 100644 --- a/ui/onboarding/Login.qml +++ b/ui/onboarding/Login.qml @@ -5,7 +5,6 @@ import QtQuick.Dialogs 1.3 import QtGraphicalEffects 1.13 import "../shared" import "../imports" -import "../sounds" import "./Login" Item { @@ -25,10 +24,6 @@ Item { txtPassword.forceActiveFocus(Qt.MouseFocusReason) } - ErrorSound { - id: errorSound - } - Item { id: element width: 360 diff --git a/ui/sounds/ErrorSound.qml b/ui/sounds/ErrorSound.qml index b7e26ede44..ce9c19e6a3 100644 --- a/ui/sounds/ErrorSound.qml +++ b/ui/sounds/ErrorSound.qml @@ -4,6 +4,7 @@ import QtMultimedia 5.13 Audio { id: errorSound source: "./error.mp3" + audioRole: NotificationRole } /*##^##