Rearrange UI so messages are per-vehicle.
This commit is contained in:
@@ -71,17 +71,6 @@ Kirigami.ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Layouts.ColumnLayout {
|
|
||||||
anchors.fill: parent
|
|
||||||
Kirigami.InlineMessage { //TODO:connect to code to detect car alerts.
|
|
||||||
Layouts.Layout.fillWidth: true
|
|
||||||
Layouts.Layout.leftMargin: 10
|
|
||||||
Layouts.Layout.rightMargin: 10
|
|
||||||
z: 9997
|
|
||||||
type: Kirigami.MessageType.Information
|
|
||||||
id: infoMessage
|
|
||||||
showCloseButton: true
|
|
||||||
}
|
|
||||||
Kirigami.CardsListView {
|
Kirigami.CardsListView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
id: vehicleView
|
id: vehicleView
|
||||||
@@ -157,7 +146,6 @@ Kirigami.ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Kirigami.PageRoute {
|
Kirigami.PageRoute {
|
||||||
name: "about"
|
name: "about"
|
||||||
@@ -284,6 +272,20 @@ Kirigami.ApplicationWindow {
|
|||||||
router.pushRoute({"route": "addrecord", "data": serviceId});
|
router.pushRoute({"route": "addrecord", "data": serviceId});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Layouts.ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
Kirigami.InlineMessage {
|
||||||
|
Layouts.Layout.fillWidth: true
|
||||||
|
Layouts.Layout.leftMargin: 10
|
||||||
|
Layouts.Layout.rightMargin: 10
|
||||||
|
z: 9997
|
||||||
|
type: Kirigami.MessageType.Information
|
||||||
|
id: oilMessage
|
||||||
|
showCloseButton: false
|
||||||
|
Component.onCompleted: {
|
||||||
|
//TODO: check if oil change is needed.
|
||||||
|
}
|
||||||
|
}
|
||||||
ListView {
|
ListView {
|
||||||
id: serviceView
|
id: serviceView
|
||||||
model: recordModel
|
model: recordModel
|
||||||
@@ -328,6 +330,7 @@ Kirigami.ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Kirigami.PageRoute {
|
Kirigami.PageRoute {
|
||||||
name: "addrecord"
|
name: "addrecord"
|
||||||
@@ -431,6 +434,7 @@ Kirigami.ApplicationWindow {
|
|||||||
}
|
}
|
||||||
if(milesField.acceptableInput) {
|
if(milesField.acceptableInput) {
|
||||||
recordModel.addNewRecord(providerField.text, typeField.currentValue, typeText, dateObj.toISOString(), parseInt(milesField.text), notesField.text);
|
recordModel.addNewRecord(providerField.text, typeField.currentValue, typeText, dateObj.toISOString(), parseInt(milesField.text), notesField.text);
|
||||||
|
//TODO: check if emit signal to car warnings.
|
||||||
router.popRoute();
|
router.popRoute();
|
||||||
} else {
|
} else {
|
||||||
formError.text = qsTr("Invalid number of miles.");
|
formError.text = qsTr("Invalid number of miles.");
|
||||||
|
|||||||
Reference in New Issue
Block a user