Commit 206b4c87 authored by Nicolas Fella's avatar Nicolas Fella

Treat waiting and transfer same as walking

parent 705dbc0a
......@@ -39,7 +39,15 @@ Kirigami.Page
model: journey.sections
delegate: Loader {
sourceComponent: modelData.mode == JourneySection.Walking ? walking : card
sourceComponent: {
console.log(modelData.mode)
switch(modelData.mode) {
case JourneySection.Walking: return walking
case JourneySection.Waiting: return waiting
case JourneySection.Transfer: return transfer
default: return card
}
}
property var theData: modelData
}
}
......@@ -53,6 +61,24 @@ Kirigami.Page
}
}
Component {
id: waiting
Label {
text: i18np("Waiting (%1 minute)", "Waiting (%1 minutes)", theData.duration / 60)
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
}
}
Component {
id: transfer
Label {
text: i18np("Transfer (%1 minute)", "Transfer (%1 minutes)", theData.duration / 60)
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
}
}
Component {
id: card
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment