mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-20 18:48:47 +00:00
- signal for adding notification to the Activity Center introduced and emitted, but that part is not handled within this commit since there are some details needed to be discussed in the PR#5334 - signal for displaying ephemeral app notification is introduced and emitted, but that part is not handled within this commit since we don't have yet ephemeral notificaiton in place. Fixes #4902
111 lines
4.3 KiB
QML
111 lines
4.3 KiB
QML
import QtQuick 2.13
|
|
|
|
import "../Profile/stores"
|
|
|
|
QtObject {
|
|
id: root
|
|
property var mainModuleInst: mainModule
|
|
property var aboutModuleInst: aboutModule
|
|
property var communitiesModuleInst: communitiesModule
|
|
property var observedCommunity: communitiesModuleInst.observedCommunity
|
|
|
|
property AppSearchStore appSearchStore: AppSearchStore {
|
|
appSearchModule: root.mainModuleInst.appSearchModule
|
|
}
|
|
|
|
property ProfileSectionStore profileSectionStore: ProfileSectionStore {
|
|
}
|
|
|
|
property EmojiReactions emojiReactionsModel: EmojiReactions {
|
|
}
|
|
|
|
property var chatSearchModel: mainModuleInst.chatSearchModel
|
|
|
|
function rebuildChatSearchModel() {
|
|
mainModuleInst.rebuildChatSearchModel()
|
|
}
|
|
|
|
function setActiveSectionChat(sectionId, chatId) {
|
|
mainModuleInst.switchTo(sectionId, chatId)
|
|
}
|
|
|
|
// Not Refactored Yet
|
|
// property var chatsModelInst: chatsModel
|
|
// Not Refactored Yet
|
|
// property var walletModelInst: walletModel
|
|
property var userProfileInst: userProfile
|
|
|
|
property var accounts: walletSectionAccounts.model
|
|
property var currentAccount: walletSectionCurrent
|
|
// Not Refactored Yet
|
|
// property var profileModelInst: profileModel
|
|
|
|
property var contactStore: profileSectionStore.contactsStore
|
|
property var privacyStore: profileSectionStore.privacyStore
|
|
property var messagingStore: profileSectionStore.messagingStore
|
|
property bool hasAddedContacts: contactStore.myContactsModel.count > 0
|
|
|
|
// property MessageStore messageStore: MessageStore { }
|
|
|
|
property real volume: !!localAccountSensitiveSettings ? localAccountSensitiveSettings.volume * 0.01 : 0.5
|
|
property bool notificationSoundsEnabled: !!localAccountSensitiveSettings ? localAccountSensitiveSettings.notificationSoundsEnabled : false
|
|
|
|
property var walletSectionTransactionsInst: walletSectionTransactions
|
|
|
|
property bool isMultiNetworkEnabled: localAccountSensitiveSettings.isMultiNetworkEnabled
|
|
|
|
property var savedAddressesModel: walletSectionSavedAddresses.model
|
|
|
|
function getEtherscanLink() {
|
|
return profileSectionModule.ensUsernamesModule.getEtherscanLink()
|
|
}
|
|
|
|
function createCommunity(communityName, communityDescription, checkedMembership, communityColor, communityImage, imageCropperModalaX, imageCropperModalaY, imageCropperModalbX, imageCropperModalbY) {
|
|
communitiesModuleInst.createCommunity(communityName, communityDescription, checkedMembership, communityColor, communityImage, imageCropperModalaX, imageCropperModalaY, imageCropperModalbX, imageCropperModalbY);
|
|
}
|
|
|
|
function copyToClipboard(text) {
|
|
globalUtils.copyToClipboard(text)
|
|
}
|
|
|
|
function generateAlias(pk) {
|
|
return globalUtils.generateAlias(pk);
|
|
}
|
|
|
|
property string currentCurrency: walletSection.currentCurrency
|
|
property string signingPhrase: walletSection.signingPhrase
|
|
function estimateGas(from_addr, to, assetAddress, value, data) {
|
|
return walletSectionTransactions.estimateGas(from_addr, to, assetAddress, value, data)
|
|
}
|
|
// TODO change this to use a better store once it is moved out of the ENS module
|
|
property string gasPrice: profileSectionStore.ensUsernamesStore.gasPrice
|
|
function getFiatValue(balance, cryptoSymbo, fiatSymbol) {
|
|
return profileSectionStore.ensUsernamesStore.getFiatValue(balance, cryptoSymbo, fiatSymbol)
|
|
}
|
|
function getGasEthValue(gweiValue, gasLimit) {
|
|
return profileSectionStore.ensUsernamesStore.getGasEthValue(gweiValue, gasLimit)
|
|
}
|
|
|
|
function transferEth(from, to, amount, gasLimit, gasPrice, tipLimit, overallLimit, password, uuid) {
|
|
return walletSectionTransactions.transferEth(from, to, amount, gasLimit, gasPrice, tipLimit,
|
|
overallLimit, password, uuid);
|
|
}
|
|
|
|
function transferTokens(from, to, address, amount, gasLimit, gasPrice, tipLimit, overallLimit, password, uuid) {
|
|
return walletSectionTransactions.transferTokens(from, to, address, amount, gasLimit,
|
|
gasPrice, tipLimit, overallLimit, password, uuid);
|
|
}
|
|
|
|
function isEIP1559Enabled() {
|
|
return walletSection.isEIP1559Enabled()
|
|
}
|
|
|
|
function suggestedFees() {
|
|
return JSON.parse(walletSectionTransactions.suggestedFees())
|
|
}
|
|
|
|
function hex2Eth(value) {
|
|
return globalUtils.hex2Eth(value)
|
|
}
|
|
}
|