mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-21 20:09:37 +00:00
parent
6eda2a4956
commit
1dd5f3d007
@ -49,9 +49,17 @@ Item {
|
||||
keypairImport.active = false
|
||||
}
|
||||
}
|
||||
|
||||
function showSigningPhrasePopup(){
|
||||
|
||||
enum LeftPanelSelection {
|
||||
AllAddresses,
|
||||
Address,
|
||||
SavedAddresses
|
||||
}
|
||||
|
||||
enum RightPanelSelection {
|
||||
Collectibles,
|
||||
Assets,
|
||||
Activity
|
||||
}
|
||||
|
||||
function resetView() {
|
||||
@ -70,6 +78,41 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
function openDesiredView(leftPanelSelection, rightPanelSelection, data) {
|
||||
if (leftPanelSelection !== WalletLayout.LeftPanelSelection.AllAddresses &&
|
||||
leftPanelSelection !== WalletLayout.LeftPanelSelection.SavedAddresses &&
|
||||
leftPanelSelection !== WalletLayout.LeftPanelSelection.Address) {
|
||||
console.warn("not supported left selection", leftPanelSelection)
|
||||
return
|
||||
}
|
||||
|
||||
if (leftPanelSelection === WalletLayout.LeftPanelSelection.SavedAddresses) {
|
||||
d.displaySavedAddresses()
|
||||
} else {
|
||||
if (leftPanelSelection === WalletLayout.LeftPanelSelection.AllAddresses) {
|
||||
d.displayAllAddresses()
|
||||
} else if (leftPanelSelection === WalletLayout.LeftPanelSelection.Address) {
|
||||
d.displayAddress(address)
|
||||
}
|
||||
|
||||
if (rightPanelSelection !== WalletLayout.RightPanelSelection.Collectibles &&
|
||||
rightPanelSelection !== WalletLayout.RightPanelSelection.Assets &&
|
||||
rightPanelSelection !== WalletLayout.RightPanelSelection.Activity) {
|
||||
console.warn("not supported right selection", rightPanelSelection)
|
||||
return
|
||||
}
|
||||
|
||||
rightPanelStackView.currentItem.resetView()
|
||||
rightPanelStackView.currentItem.currentTabIndex = rightPanelSelection
|
||||
|
||||
let savedAddress = data.savedAddress?? ""
|
||||
if (!!savedAddress) {
|
||||
RootStore.currentActivityFiltersStore.resetAllFilters()
|
||||
RootStore.currentActivityFiltersStore.toggleSavedAddress(savedAddress)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
|
||||
|
@ -130,6 +130,7 @@ StatusListItem {
|
||||
menu.ens = ""
|
||||
menu.colorId = ""
|
||||
}
|
||||
|
||||
StatusAction {
|
||||
text: qsTr("Edit saved address")
|
||||
objectName: "editSavedAddress"
|
||||
@ -145,6 +146,7 @@ StatusListItem {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
StatusSuccessAction {
|
||||
id: copyAddressAction
|
||||
objectName: "copySavedAddressAction"
|
||||
@ -157,6 +159,7 @@ StatusListItem {
|
||||
store.copyToClipboard(d.visibleAddress)
|
||||
}
|
||||
}
|
||||
|
||||
StatusAction {
|
||||
text: qsTr("Show address QR")
|
||||
objectName: "showQrSavedAddressAction"
|
||||
@ -176,6 +179,18 @@ StatusListItem {
|
||||
}
|
||||
}
|
||||
|
||||
StatusAction {
|
||||
text: qsTr("View activity")
|
||||
objectName: "viewActivitySavedAddressAction"
|
||||
assetSettings.name: "wallet"
|
||||
onTriggered: {
|
||||
Global.changeAppSectionBySectionType(Constants.appSection.wallet,
|
||||
WalletLayout.LeftPanelSelection.AllAddresses,
|
||||
WalletLayout.RightPanelSelection.Activity,
|
||||
{savedAddress: menu.address})
|
||||
}
|
||||
}
|
||||
|
||||
StatusMenuSeparator {
|
||||
visible: d.preferredSharedNetworkNamesArray.length > 0
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ Item {
|
||||
appMain.rootStore.mainModuleInst.setNthEnabledSectionActive(nthSection)
|
||||
}
|
||||
|
||||
function onAppSectionBySectionTypeChanged(sectionType, subsection, settingsSubsection = -1) {
|
||||
function onAppSectionBySectionTypeChanged(sectionType, subsection, subSubsection = -1, data = {}) {
|
||||
if(!appMain.rootStore.mainModuleInst)
|
||||
return
|
||||
|
||||
@ -338,6 +338,15 @@ Item {
|
||||
if (sectionType === Constants.appSection.profile) {
|
||||
Global.settingsSubsection = subsection;
|
||||
Global.settingsSubSubsection = settingsSubsection;
|
||||
return
|
||||
}
|
||||
|
||||
if (sectionType === Constants.appSection.wallet) {
|
||||
appView.children[Constants.appViewStackIndex.wallet].item.openDesiredView(
|
||||
WalletLayout.LeftPanelSelection.AllAddresses,
|
||||
WalletLayout.RightPanelSelection.Activity,
|
||||
data
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1237,9 +1246,11 @@ Item {
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: walletLoader
|
||||
active: appView.currentIndex === Constants.appViewStackIndex.wallet
|
||||
asynchronous: true
|
||||
sourceComponent: WalletLayout {
|
||||
objectName: "walletLayoutReal"
|
||||
store: appMain.rootStore
|
||||
contactsStore: appMain.rootStore.profileSectionStore.contactsStore
|
||||
emojiPopup: statusEmojiPopup.item
|
||||
|
@ -63,7 +63,7 @@ QtObject {
|
||||
signal activateDeepLink(string link)
|
||||
|
||||
signal setNthEnabledSectionActive(int nthSection)
|
||||
signal appSectionBySectionTypeChanged(int sectionType, int subsection, int settingsSubsection)
|
||||
signal appSectionBySectionTypeChanged(int sectionType, int subsection, int subSubsection, var data)
|
||||
|
||||
signal openSendModal(string address)
|
||||
signal switchToCommunity(string communityId)
|
||||
@ -108,8 +108,8 @@ QtObject {
|
||||
root.openDownloadModalRequested(available, version, url);
|
||||
}
|
||||
|
||||
function changeAppSectionBySectionType(sectionType, subsection = 0, settingsSubsection = -1) {
|
||||
root.appSectionBySectionTypeChanged(sectionType, subsection, settingsSubsection)
|
||||
function changeAppSectionBySectionType(sectionType, subsection = 0, subSubsection = -1, data = {}) {
|
||||
root.appSectionBySectionTypeChanged(sectionType, subsection, subSubsection, data)
|
||||
}
|
||||
|
||||
function openMenu(menuComponent, menuParent, params = {}, point = undefined) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user