mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-22 11:38:57 +00:00
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 string previousPageName: ""
|
||||
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 size settingsDirtyToastMessageImplicitSize:
|
||||
|
@ -65,6 +65,8 @@ SettingsPageLayout {
|
||||
}
|
||||
|
||||
saveChangesButtonEnabled: true
|
||||
saveChangesText: qsTr("Update permission")
|
||||
cancelChangesText: qsTr("Revert changes")
|
||||
state: d.getInitialState()
|
||||
states: [
|
||||
State {
|
||||
|
@ -13,6 +13,9 @@ Rectangle {
|
||||
|
||||
property bool active: false
|
||||
property bool saveChangesButtonEnabled: false
|
||||
property alias saveChangesText: saveChangesButton.text
|
||||
property alias cancelChangesText: cancelChangesButton.text
|
||||
property alias changesDetectedText: changesDetectedTextItem.text
|
||||
|
||||
property Flickable flickable: null
|
||||
|
||||
@ -100,6 +103,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
id: changesDetectedTextItem
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
padding: 8
|
||||
@ -109,6 +113,7 @@ Rectangle {
|
||||
}
|
||||
|
||||
StatusButton {
|
||||
id: cancelChangesButton
|
||||
text: qsTr("Cancel")
|
||||
enabled: root.active
|
||||
type: StatusBaseButton.Type.Danger
|
||||
|
Loading…
x
Reference in New Issue
Block a user