feat(ProfileShowcase): Some properties prepared for task #13997 development
Part of #13997
This commit is contained in:
parent
c93a8d2c6f
commit
1d9c136bf8
|
@ -78,6 +78,10 @@ StatusSectionLayout {
|
|||
|
||||
readonly property bool isProfilePanelActive: profileContainer.currentIndex === Constants.settingsSubsection.profile
|
||||
readonly property bool sideBySidePreviewAvailable: root.Window.width >= 1840 // design
|
||||
|
||||
// Used to alternatively add an error message to the dirty bubble if ephemeral notification
|
||||
// can clash at smaller viewports
|
||||
readonly property bool toastClashesWithDirtyBubble: root.Window.width <= 1650 // design
|
||||
}
|
||||
|
||||
headerBackground: AccountHeaderGradient {
|
||||
|
@ -142,6 +146,7 @@ StatusSectionLayout {
|
|||
sectionTitle: root.store.getNameForSubsection(Constants.settingsSubsection.profile)
|
||||
contentWidth: d.contentWidth
|
||||
sideBySidePreview: d.sideBySidePreviewAvailable
|
||||
toastClashesWithDirtyBubble: d.toastClashesWithDirtyBubble
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ SettingsContentBase {
|
|||
property var communitiesModel
|
||||
|
||||
property bool sideBySidePreview
|
||||
property bool toastClashesWithDirtyBubble
|
||||
|
||||
property QtObject dirtyValues: QtObject {
|
||||
property string displayName: descriptionPanel.displayName.text
|
||||
|
@ -72,6 +73,9 @@ SettingsContentBase {
|
|||
toast.saveChangesTooltipText: saveChangesButtonEnabled ? "" : qsTr("Invalid changes made to Identity")
|
||||
autoscrollWhenDirty: profileTabBar.currentIndex === MyProfileView.Identity
|
||||
toast.loading: priv.expectedBackendResponses > 0
|
||||
toast.additionalComponent.visible: false // TODO:Issue #13997 // !toast.loading && root.toastClashesWithDirtyBubble && priv.saveRequestFailed
|
||||
toast.additionalComponent.text: qsTr("Changes could not be saved. Try again")
|
||||
toast.additionalComponent.color: Theme.palette.dangerColor1
|
||||
|
||||
onResetChangesClicked: priv.reset()
|
||||
|
||||
|
|
Loading…
Reference in New Issue