feat(WalletFirst): Rearrange left nav bar and open wallet section by default
1. Wallet section is the default section 2. Wallet section is the first section in the left nav bar
This commit is contained in:
parent
793aeb15c3
commit
a39728ba94
|
@ -501,8 +501,8 @@ method load*[T](
|
|||
|
||||
var activeSection: SectionItem
|
||||
var activeSectionId = singletonInstance.localAccountSensitiveSettings.getActiveSection()
|
||||
if (activeSectionId == ""):
|
||||
activeSectionId = singletonInstance.userProfile.getPubKey()
|
||||
if activeSectionId == "" or activeSectionId == conf.SETTINGS_SECTION_ID:
|
||||
activeSectionId = conf.WALLET_SECTION_ID
|
||||
|
||||
let loadingItem = initItem(
|
||||
LOADING_SECTION_ID,
|
||||
|
@ -647,8 +647,6 @@ method onChatsLoaded*[T](
|
|||
let myPubKey = singletonInstance.userProfile.getPubKey()
|
||||
var activeSection: SectionItem
|
||||
var activeSectionId = singletonInstance.localAccountSensitiveSettings.getActiveSection()
|
||||
if activeSectionId == "" or activeSectionId == conf.SETTINGS_SECTION_ID:
|
||||
activeSectionId = myPubKey
|
||||
|
||||
# Create personal chat section
|
||||
self.chatSectionModules[myPubKey] = chat_section_module.newModule(
|
||||
|
|
|
@ -10,9 +10,9 @@ import ../../../app_service/service/community_tokens/community_collectible_owner
|
|||
|
||||
type
|
||||
SectionType* {.pure.} = enum
|
||||
Chat = 0
|
||||
Wallet = 0,
|
||||
Chat,
|
||||
Community,
|
||||
Wallet,
|
||||
ProfileSettings,
|
||||
NodeManagement,
|
||||
CommunitiesPortal,
|
||||
|
|
|
@ -11,8 +11,8 @@ Rectangle {
|
|||
id: root
|
||||
objectName: "statusAppNavBar"
|
||||
|
||||
property alias chatItemsModel: chatItemsListView.model
|
||||
property alias chatItemDelegate: chatItemsListView.delegate
|
||||
property alias topSectionModel: topSectionListview.model
|
||||
property alias topSectionDelegate: topSectionListview.delegate
|
||||
|
||||
property alias communityItemsModel: communityItemsListView.model
|
||||
property alias communityItemDelegate: communityItemsListView.delegate
|
||||
|
@ -51,7 +51,7 @@ Rectangle {
|
|||
spacing: d.spacing
|
||||
|
||||
ListView {
|
||||
id: chatItemsListView
|
||||
id: topSectionListview
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
@ -75,7 +75,7 @@ Rectangle {
|
|||
Layout.alignment: Qt.AlignHCenter
|
||||
color: Theme.palette.directColor7
|
||||
|
||||
visible: chatItemsListView.count && communityItemsListView.contentHeight > communityItemsListView.height
|
||||
visible: topSectionListview.count && communityItemsListView.contentHeight > communityItemsListView.height
|
||||
}
|
||||
|
||||
ListView {
|
||||
|
@ -101,7 +101,7 @@ Rectangle {
|
|||
Layout.preferredWidth: d.separatorWidth
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
color: Theme.palette.directColor7
|
||||
visible: chatItemsListView.count || communityItemsListView.count
|
||||
visible: topSectionListview.count || communityItemsListView.count
|
||||
}
|
||||
|
||||
ListView {
|
||||
|
|
|
@ -87,10 +87,6 @@ Item {
|
|||
d.displayAllAddresses()
|
||||
|
||||
d.resetRightPanelStackView()
|
||||
|
||||
if(!hideSignPhraseModal && !RootStore.hideSignPhraseModal){
|
||||
signPhrasePopup.open();
|
||||
}
|
||||
}
|
||||
|
||||
function openDesiredView(leftPanelSelection, rightPanelSelection, data) {
|
||||
|
@ -189,6 +185,7 @@ Item {
|
|||
id: signPhrasePopup
|
||||
onRemindLaterClicked: hideSignPhraseModal = true
|
||||
onAcceptClicked: { RootStore.setHideSignPhraseModal(true); }
|
||||
visible: !root.hideSignPhraseModal && !RootStore.hideSignPhraseModal
|
||||
}
|
||||
|
||||
SeedPhraseBackupWarning {
|
||||
|
|
|
@ -669,12 +669,18 @@ Item {
|
|||
anchors.fill: parent
|
||||
|
||||
leftPanel: StatusAppNavBar {
|
||||
chatItemsModel: SortFilterProxyModel {
|
||||
topSectionModel: SortFilterProxyModel {
|
||||
sourceModel: appMain.rootStore.mainModuleInst.sectionsModel
|
||||
filters: [
|
||||
ValueFilter {
|
||||
roleName: "sectionType"
|
||||
value: Constants.appSection.chat
|
||||
AnyOf {
|
||||
ValueFilter {
|
||||
roleName: "sectionType"
|
||||
value: Constants.appSection.wallet
|
||||
}
|
||||
ValueFilter {
|
||||
roleName: "sectionType"
|
||||
value: Constants.appSection.chat
|
||||
}
|
||||
},
|
||||
ValueFilter {
|
||||
roleName: "enabled"
|
||||
|
@ -682,7 +688,7 @@ Item {
|
|||
}
|
||||
]
|
||||
}
|
||||
chatItemDelegate: navbarButton
|
||||
topSectionDelegate: navbarButton
|
||||
|
||||
communityItemsModel: SortFilterProxyModel {
|
||||
sourceModel: appMain.rootStore.mainModuleInst.sectionsModel
|
||||
|
@ -814,7 +820,7 @@ Item {
|
|||
filters: [
|
||||
RangeFilter {
|
||||
roleName: "sectionType"
|
||||
minimumValue: Constants.appSection.wallet
|
||||
minimumValue: Constants.appSection.profile
|
||||
maximumValue: Constants.appSection.loadingSection
|
||||
},
|
||||
ValueFilter {
|
||||
|
@ -1435,6 +1441,7 @@ Item {
|
|||
networkConnectionStore: appMain.networkConnectionStore
|
||||
appMainVisible: appMain.visible
|
||||
swapEnabled: featureFlagsStore.swapEnabled
|
||||
hideSignPhraseModal: userAgreementLoader.active
|
||||
}
|
||||
onLoaded: {
|
||||
item.resetView()
|
||||
|
|
|
@ -320,9 +320,9 @@ QtObject {
|
|||
readonly property int chatSectionLeftColumnWidth: 304
|
||||
|
||||
readonly property QtObject appSection: QtObject {
|
||||
readonly property int chat: 0
|
||||
readonly property int community: 1
|
||||
readonly property int wallet: 2
|
||||
readonly property int chat: 1
|
||||
readonly property int community: 2
|
||||
readonly property int wallet: 0
|
||||
readonly property int profile: 3
|
||||
readonly property int node: 4
|
||||
readonly property int communitiesPortal: 5
|
||||
|
|
Loading…
Reference in New Issue