fix(Community Permissions): Update change detected buttons labels according to the new design
Exposed new properties in `SettingsDirtyToastMessage` to customise buttons texts. Exposed new properties in `SettingsPageLayout` to customise dirty toast buttons texts. Fixes #9046
This commit is contained in:
parent
e7b746795f
commit
5e2fa14cd6
|
@ -24,6 +24,9 @@ Item {
|
||||||
property int headerWidth: 0
|
property int headerWidth: 0
|
||||||
property string previousPageName: ""
|
property string previousPageName: ""
|
||||||
property bool saveChangesButtonEnabled: !!root.contentItem && !!root.contentItem.saveChangesButtonEnabled
|
property bool saveChangesButtonEnabled: !!root.contentItem && !!root.contentItem.saveChangesButtonEnabled
|
||||||
|
property alias saveChangesText: settingsDirtyToastMessage.saveChangesText
|
||||||
|
property alias cancelChangesText: settingsDirtyToastMessage.cancelChangesText
|
||||||
|
property alias changesDetectedText: settingsDirtyToastMessage.changesDetectedText
|
||||||
|
|
||||||
readonly property Item contentItem: contentLoader.item
|
readonly property Item contentItem: contentLoader.item
|
||||||
readonly property size settingsDirtyToastMessageImplicitSize:
|
readonly property size settingsDirtyToastMessageImplicitSize:
|
||||||
|
|
|
@ -65,6 +65,8 @@ SettingsPageLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
saveChangesButtonEnabled: true
|
saveChangesButtonEnabled: true
|
||||||
|
saveChangesText: qsTr("Update permission")
|
||||||
|
cancelChangesText: qsTr("Revert changes")
|
||||||
state: d.getInitialState()
|
state: d.getInitialState()
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
|
|
|
@ -13,6 +13,9 @@ Rectangle {
|
||||||
|
|
||||||
property bool active: false
|
property bool active: false
|
||||||
property bool saveChangesButtonEnabled: false
|
property bool saveChangesButtonEnabled: false
|
||||||
|
property alias saveChangesText: saveChangesButton.text
|
||||||
|
property alias cancelChangesText: cancelChangesButton.text
|
||||||
|
property alias changesDetectedText: changesDetectedTextItem.text
|
||||||
|
|
||||||
property Flickable flickable: null
|
property Flickable flickable: null
|
||||||
|
|
||||||
|
@ -100,6 +103,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
|
id: changesDetectedTextItem
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
padding: 8
|
padding: 8
|
||||||
|
@ -109,6 +113,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusButton {
|
StatusButton {
|
||||||
|
id: cancelChangesButton
|
||||||
text: qsTr("Cancel")
|
text: qsTr("Cancel")
|
||||||
enabled: root.active
|
enabled: root.active
|
||||||
type: StatusBaseButton.Type.Danger
|
type: StatusBaseButton.Type.Danger
|
||||||
|
|
Loading…
Reference in New Issue