Use new mobileform heading
Does what is says on the tin. Use the recently merged new `MobileForm.FormHeader` component in all settings pages.
This commit is contained in:
@@ -15,14 +15,17 @@ Kirigami.ScrollablePage {
|
||||
id: root
|
||||
|
||||
title: i18nc("@title:window", "Notifications")
|
||||
topPadding: 0
|
||||
leftPadding: 0
|
||||
rightPadding: 0
|
||||
|
||||
ColumnLayout {
|
||||
id: notificationLayout
|
||||
spacing: 0
|
||||
|
||||
MobileForm.FormCard {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||
contentItem: MobileForm.FormCheckDelegate {
|
||||
text: i18n("Enable notifications for this account")
|
||||
description: i18n("Whether push notifications are generated by your Matrix server")
|
||||
@@ -34,19 +37,19 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
}
|
||||
|
||||
MobileForm.FormHeader {
|
||||
Layout.fillWidth: true
|
||||
title: i18n("Room Notifications")
|
||||
}
|
||||
MobileForm.FormCard {
|
||||
Layout.fillWidth: true
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
MobileForm.FormCardHeader {
|
||||
title: i18n("Room Notifications")
|
||||
}
|
||||
Repeater {
|
||||
model: KSortFilterProxyModel {
|
||||
sourceModel: Controller.pushRuleModel
|
||||
|
||||
filterRowCallback: function(source_row, source_parent) {
|
||||
let sectionRole = sourceModel.data(sourceModel.index(source_row, 0, source_parent), PushRuleModel.SectionRole)
|
||||
return sectionRole == PushNotificationSection.Room;
|
||||
@@ -58,19 +61,18 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
}
|
||||
|
||||
MobileForm.FormHeader {
|
||||
Layout.fillWidth: true
|
||||
title: i18n("@Mentions")
|
||||
}
|
||||
MobileForm.FormCard {
|
||||
Layout.fillWidth: true
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
MobileForm.FormCardHeader {
|
||||
title: i18n("@Mentions")
|
||||
}
|
||||
Repeater {
|
||||
model: KSortFilterProxyModel {
|
||||
sourceModel: Controller.pushRuleModel
|
||||
|
||||
filterRowCallback: function(source_row, source_parent) {
|
||||
let sectionRole = sourceModel.data(sourceModel.index(source_row, 0, source_parent), PushRuleModel.SectionRole)
|
||||
return sectionRole == PushNotificationSection.Mentions;
|
||||
@@ -82,15 +84,15 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
}
|
||||
|
||||
MobileForm.FormHeader {
|
||||
Layout.fillWidth: true
|
||||
title: i18n("Keywords")
|
||||
}
|
||||
MobileForm.FormCard {
|
||||
Layout.fillWidth: true
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
MobileForm.FormCardHeader {
|
||||
title: i18n("Keywords")
|
||||
}
|
||||
Repeater {
|
||||
model: KSortFilterProxyModel {
|
||||
sourceModel: Controller.pushRuleModel
|
||||
@@ -152,19 +154,18 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
}
|
||||
|
||||
MobileForm.FormHeader {
|
||||
Layout.fillWidth: true
|
||||
title: i18n("Invites")
|
||||
}
|
||||
MobileForm.FormCard {
|
||||
Layout.fillWidth: true
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
MobileForm.FormCardHeader {
|
||||
title: i18n("Invites")
|
||||
}
|
||||
Repeater {
|
||||
model: KSortFilterProxyModel {
|
||||
sourceModel: Controller.pushRuleModel
|
||||
|
||||
filterRowCallback: function(source_row, source_parent) {
|
||||
let sectionRole = sourceModel.data(sourceModel.index(source_row, 0, source_parent), PushRuleModel.SectionRole)
|
||||
return sectionRole == PushNotificationSection.Invites;
|
||||
|
||||
Reference in New Issue
Block a user