feat(ProfileSettings): Base layout updated
Removed unnecessary `ColumnLayout` and adjusted sizing of component inside.
This commit is contained in:
parent
d5134fe864
commit
9c3159ecd1
|
@ -51,10 +51,10 @@ SettingsContentBase {
|
||||||
|
|
||||||
dirty: (!descriptionPanel.isEnsName &&
|
dirty: (!descriptionPanel.isEnsName &&
|
||||||
descriptionPanel.displayName.text !== profileStore.displayName) ||
|
descriptionPanel.displayName.text !== profileStore.displayName) ||
|
||||||
descriptionPanel.bio.text !== profileStore.bio ||
|
descriptionPanel.bio.text !== profileStore.bio ||
|
||||||
profileStore.socialLinksDirty ||
|
profileStore.socialLinksDirty ||
|
||||||
profileHeader.icon !== profileStore.profileLargeImage ||
|
profileHeader.icon !== profileStore.profileLargeImage ||
|
||||||
priv.hasAnyProfileShowcaseChanges
|
priv.hasAnyProfileShowcaseChanges
|
||||||
saveChangesButtonEnabled: !!descriptionPanel.displayName.text && descriptionPanel.displayName.valid
|
saveChangesButtonEnabled: !!descriptionPanel.displayName.text && descriptionPanel.displayName.valid
|
||||||
|
|
||||||
toast.saveChangesTooltipVisible: root.dirty
|
toast.saveChangesTooltipVisible: root.dirty
|
||||||
|
@ -149,109 +149,108 @@ SettingsContentBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
StackLayout {
|
||||||
width: root.contentWidth
|
id: stackLayout
|
||||||
|
|
||||||
StackLayout {
|
width: contentWidth
|
||||||
id: stackLayout
|
height: contentHeight
|
||||||
currentIndex: profileTabBar.currentIndex
|
currentIndex: profileTabBar.currentIndex
|
||||||
|
|
||||||
// identity
|
// identity
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
objectName: "myProfileSettingsView"
|
objectName: "myProfileSettingsView"
|
||||||
ProfileHeader {
|
ProfileHeader {
|
||||||
id: profileHeader
|
id: profileHeader
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.leftMargin: Style.current.padding
|
Layout.leftMargin: Style.current.padding
|
||||||
Layout.rightMargin: Style.current.padding
|
Layout.rightMargin: Style.current.padding
|
||||||
|
|
||||||
store: root.profileStore
|
store: root.profileStore
|
||||||
|
|
||||||
displayName: profileStore.name
|
displayName: profileStore.name
|
||||||
pubkey: profileStore.pubkey
|
pubkey: profileStore.pubkey
|
||||||
icon: profileStore.profileLargeImage
|
icon: profileStore.profileLargeImage
|
||||||
imageSize: ProfileHeader.ImageSize.Big
|
imageSize: ProfileHeader.ImageSize.Big
|
||||||
|
|
||||||
displayNameVisible: false
|
displayNameVisible: false
|
||||||
pubkeyVisible: false
|
pubkeyVisible: false
|
||||||
emojiHashVisible: false
|
emojiHashVisible: false
|
||||||
editImageButtonVisible: true
|
editImageButtonVisible: true
|
||||||
}
|
|
||||||
|
|
||||||
ProfileDescriptionPanel {
|
|
||||||
id: descriptionPanel
|
|
||||||
|
|
||||||
readonly property bool isEnsName: profileStore.preferredName
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
displayName.focus: !isEnsName
|
|
||||||
displayName.input.edit.readOnly: isEnsName
|
|
||||||
displayName.text: profileStore.name
|
|
||||||
displayName.validationMode: StatusInput.ValidationMode.Always
|
|
||||||
displayName.validators: isEnsName ? [] : Constants.validators.displayName
|
|
||||||
bio.text: profileStore.bio
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// communities
|
ProfileDescriptionPanel {
|
||||||
ProfileShowcaseCommunitiesPanel {
|
id: descriptionPanel
|
||||||
id: profileShowcaseCommunitiesPanel
|
|
||||||
baseModel: root.communitiesModel
|
|
||||||
showcaseModel: root.profileStore.profileShowcaseCommunitiesModel
|
|
||||||
onShowcaseEntryChanged: priv.hasAnyProfileShowcaseChanges = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// accounts
|
readonly property bool isEnsName: profileStore.preferredName
|
||||||
ProfileShowcaseAccountsPanel {
|
|
||||||
id: profileShowcaseAccountsPanel
|
|
||||||
baseModel: root.walletStore.accounts
|
|
||||||
showcaseModel: root.profileStore.profileShowcaseAccountsModel
|
|
||||||
currentWallet: root.walletStore.overview.mixedcaseAddress
|
|
||||||
onShowcaseEntryChanged: priv.hasAnyProfileShowcaseChanges = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// collectibles
|
Layout.fillWidth: true
|
||||||
ProfileShowcaseCollectiblesPanel {
|
|
||||||
id: profileShowcaseCollectiblesPanel
|
displayName.focus: !isEnsName
|
||||||
baseModel: root.profileStore.collectiblesModel
|
displayName.input.edit.readOnly: isEnsName
|
||||||
showcaseModel: root.profileStore.profileShowcaseCollectiblesModel
|
displayName.text: profileStore.name
|
||||||
|
displayName.validationMode: StatusInput.ValidationMode.Always
|
||||||
|
displayName.validators: isEnsName ? [] : Constants.validators.displayName
|
||||||
|
bio.text: profileStore.bio
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// communities
|
||||||
|
ProfileShowcaseCommunitiesPanel {
|
||||||
|
id: profileShowcaseCommunitiesPanel
|
||||||
|
baseModel: root.communitiesModel
|
||||||
|
showcaseModel: root.profileStore.profileShowcaseCommunitiesModel
|
||||||
|
onShowcaseEntryChanged: priv.hasAnyProfileShowcaseChanges = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// accounts
|
||||||
|
ProfileShowcaseAccountsPanel {
|
||||||
|
id: profileShowcaseAccountsPanel
|
||||||
|
baseModel: root.walletStore.accounts
|
||||||
|
showcaseModel: root.profileStore.profileShowcaseAccountsModel
|
||||||
|
currentWallet: root.walletStore.overview.mixedcaseAddress
|
||||||
|
onShowcaseEntryChanged: priv.hasAnyProfileShowcaseChanges = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// collectibles
|
||||||
|
ProfileShowcaseCollectiblesPanel {
|
||||||
|
id: profileShowcaseCollectiblesPanel
|
||||||
|
baseModel: root.profileStore.collectiblesModel
|
||||||
|
showcaseModel: root.profileStore.profileShowcaseCollectiblesModel
|
||||||
addAccountsButtonVisible: root.profileStore.profileShowcaseAccountsModel.hiddenCount > 0
|
addAccountsButtonVisible: root.profileStore.profileShowcaseAccountsModel.hiddenCount > 0
|
||||||
|
|
||||||
onShowcaseEntryChanged: priv.hasAnyProfileShowcaseChanges = true
|
onShowcaseEntryChanged: priv.hasAnyProfileShowcaseChanges = true
|
||||||
onNavigateToAccountsTab: profileTabBar.currentIndex = 2
|
onNavigateToAccountsTab: profileTabBar.currentIndex = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
// assets
|
||||||
|
ProfileShowcaseAssetsPanel {
|
||||||
|
id: profileShowcaseAssetsPanel
|
||||||
|
|
||||||
|
baseModel: root.walletAssetsStore.groupedAccountAssetsModel // TODO: instantiate an assets model in profile module
|
||||||
|
showcaseModel: root.profileStore.profileShowcaseAssetsModel
|
||||||
|
addAccountsButtonVisible: root.profileStore.profileShowcaseAccountsModel.hiddenCount > 0
|
||||||
|
formatCurrencyAmount: function(amount, symbol) {
|
||||||
|
return root.currencyStore.formatCurrencyAmount(amount, symbol)
|
||||||
}
|
}
|
||||||
|
|
||||||
// assets
|
onShowcaseEntryChanged: priv.hasAnyProfileShowcaseChanges = true
|
||||||
ProfileShowcaseAssetsPanel {
|
onNavigateToAccountsTab: profileTabBar.currentIndex = 2
|
||||||
id: profileShowcaseAssetsPanel
|
}
|
||||||
|
|
||||||
baseModel: root.walletAssetsStore.groupedAccountAssetsModel // TODO: instantiate an assets model in profile module
|
// web
|
||||||
showcaseModel: root.profileStore.profileShowcaseAssetsModel
|
ProfileSocialLinksPanel {
|
||||||
addAccountsButtonVisible: root.profileStore.profileShowcaseAccountsModel.hiddenCount > 0
|
profileStore: root.profileStore
|
||||||
formatCurrencyAmount: function(amount, symbol) {
|
socialLinksModel: root.profileStore.temporarySocialLinksModel
|
||||||
return root.currencyStore.formatCurrencyAmount(amount, symbol)
|
}
|
||||||
}
|
|
||||||
|
|
||||||
onShowcaseEntryChanged: priv.hasAnyProfileShowcaseChanges = true
|
Component {
|
||||||
onNavigateToAccountsTab: profileTabBar.currentIndex = 2
|
id: profilePreview
|
||||||
}
|
ProfileDialog {
|
||||||
|
publicKey: root.contactsStore.myPublicKey
|
||||||
// web
|
|
||||||
ProfileSocialLinksPanel {
|
|
||||||
profileStore: root.profileStore
|
profileStore: root.profileStore
|
||||||
socialLinksModel: root.profileStore.temporarySocialLinksModel
|
contactsStore: root.contactsStore
|
||||||
}
|
networkConnectionStore: root.networkConnectionStore
|
||||||
|
onClosed: destroy()
|
||||||
Component {
|
|
||||||
id: profilePreview
|
|
||||||
ProfileDialog {
|
|
||||||
publicKey: root.contactsStore.myPublicKey
|
|
||||||
profileStore: root.profileStore
|
|
||||||
contactsStore: root.contactsStore
|
|
||||||
networkConnectionStore: root.networkConnectionStore
|
|
||||||
onClosed: destroy()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue