- show route name instead of category name in subtitle

- reset scroll of synceed label when scroll of moving label is being reset
This commit is contained in:
Dorian Zedler 2021-07-08 12:23:55 +02:00
parent 9c979d43ab
commit acd436f000
Signed by: dorian
GPG key ID: 989DE36109AFA354
6 changed files with 16 additions and 30 deletions

View file

@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
# [0.06] - UNRELEASED # [0.06] - UNRELEASED
### Changed ### Changed
- The subtitle in results and startlists is now the route name instead of the category name
### Added ### Added
- Dark mode - Dark mode

View file

@ -21,6 +21,8 @@ Item {
onTextChanged: { onTextChanged: {
_resetScroll() _resetScroll()
if(control.syncWithLabel)
control.syncWithLabel._resetScroll()
} }
function startScroll(triggerSyncedLabel=true) { function startScroll(triggerSyncedLabel=true) {

View file

@ -76,13 +76,10 @@ DataListView {
//% "(Registration)" //% "(Registration)"
var addition = qsTrId("#registrationHeadline") var addition = qsTrId("#registrationHeadline")
if(titleString !== undefined){ if(titleString)
return addition + " " + titleString return addition + " " + titleString
} else
else {
return "" return ""
}
} }
function getText(athleteData){ function getText(athleteData){

View file

@ -124,25 +124,15 @@ DataListView {
} }
function getSubtitle() { function getSubtitle() {
var titleString var titleString = control.widgetData["route_name"]
for(var i = 0; i < control.widgetData["categorys"].length; i ++ ){
//console.log("checking " + i + ": cat: " + parseInt(control.widgetData["categorys"][i]["GrpId"]) + " searched cat: " + params.cat)
if(parseInt(control.widgetData["categorys"][i]["GrpId"]) === parseInt(params.cat)){
titleString = control.widgetData["categorys"][i]["name"]
}
}
//% "(Results)" //% "(Results)"
var addition = qsTrId("#resultsHeadline") var addition = qsTrId("#resultsHeadline")
if(titleString !== undefined){ if(titleString)
return addition + " " + titleString return addition + " " + titleString
} else
else {
return "" return ""
}
} }
function changeRoute(route) { function changeRoute(route) {

View file

@ -59,19 +59,15 @@ DataListView {
} }
function getSubtitle() { function getSubtitle() {
var titleString var titleString = control.widgetData["route_name"]
for(var i = 0; i < control.widgetData["categorys"].length; i ++ ){ //% "(Startlist)"
//console.log("checking " + i + ": cat: " + parseInt(control.widgetData["categorys"][i]["GrpId"]) + " searched cat: " + params.cat)
if(parseInt(control.widgetData["categorys"][i]["GrpId"]) === parseInt(params.cat)){
titleString = control.widgetData["categorys"][i]["name"]
}
}
//% "(Startlist)"https://l.bluerock.dev/?comp=11601&type=starters
var addition = qsTrId("#startlistHeadline") var addition = qsTrId("#startlistHeadline")
return addition + " " + titleString
if(titleString)
return addition + " " + titleString
else
return ""
} }
function changeRoute(route) { function changeRoute(route) {
@ -134,7 +130,7 @@ DataListView {
property int thisIndex: index property int thisIndex: index
property var thisData: widgetData[ "participants" ][index] property var thisData: widgetData[ "participants" ][index]
width: parent.width width: control.width
height: 50 height: 50
opacity: 0 opacity: 0

View file

@ -198,7 +198,7 @@ Window {
//openWidget({comp: 11651, cat: 26}) //openWidget({comp: 11651, cat: 26})
//openWidget({person: 6623}) //openWidget({person: 6623})
//console.log(JSON.stringify(serverConn.getParamsFromUrl(""))) //console.log(JSON.stringify(serverConn.getParamsFromUrl("")))
//openWidgetFromUrl("https://l.bluerock.dev/?comp=11601&type=starters") //openWidgetFromUrl("https://l.bluerock.dev/?comp=11501&cat=GER_M")
} }
FontLoader { FontLoader {