mirror of
https://github.com/ThisIsBenny/iOS-Widgets.git
synced 2025-06-06 13:37:41 +00:00
VRR-Monitor: show original time and the delay in red
Signed-off-by: Benny Samir Hierl <bennysamir@posteo.de>
This commit is contained in:
parent
eac7ccb7f8
commit
f4b2a3cd0c
1 changed files with 17 additions and 5 deletions
|
@ -3,9 +3,11 @@
|
||||||
// icon-color: deep-green; icon-glyph: bus-alt;
|
// icon-color: deep-green; icon-glyph: bus-alt;
|
||||||
|
|
||||||
/**************
|
/**************
|
||||||
Version 1.1.0
|
Version 1.2.0
|
||||||
|
|
||||||
Changelog:
|
Changelog:
|
||||||
|
v1.2.0:
|
||||||
|
- show original time and the delay in red
|
||||||
v1.1.0:
|
v1.1.0:
|
||||||
- Line filter support added
|
- Line filter support added
|
||||||
- Setup Wizard enhanced
|
- Setup Wizard enhanced
|
||||||
|
@ -257,7 +259,7 @@ widget.addSpacer(10)
|
||||||
|
|
||||||
let row = widget.addStack()
|
let row = widget.addStack()
|
||||||
row.layoutHorizontally()
|
row.layoutHorizontally()
|
||||||
row.spacing = 15
|
row.spacing = 10
|
||||||
|
|
||||||
let timeColumn = row.addStack()
|
let timeColumn = row.addStack()
|
||||||
timeColumn.layoutVertically();
|
timeColumn.layoutVertically();
|
||||||
|
@ -269,12 +271,22 @@ let directionColumn = row.addStack()
|
||||||
directionColumn.layoutVertically()
|
directionColumn.layoutVertically()
|
||||||
|
|
||||||
data.forEach(function(l) {
|
data.forEach(function(l) {
|
||||||
|
let timeStack = timeColumn.addStack()
|
||||||
let timeText = timeColumn.addText(`${l.hour}:${l.minute}`)
|
timeStack.layoutHorizontally()
|
||||||
|
timeStack.spacing = 2
|
||||||
|
|
||||||
|
let timeText = timeStack.addText(`${l.orgHour}:${l.orgMinute}`)
|
||||||
timeText.font = Font.mediumSystemFont(12)
|
timeText.font = Font.mediumSystemFont(12)
|
||||||
timeText.textColor = new Color(textColor)
|
timeText.textColor = new Color(textColor)
|
||||||
timeText.leftAlignText()
|
timeText.leftAlignText()
|
||||||
|
|
||||||
|
if (parseInt(l.delay) > 0) {
|
||||||
|
let delayText = timeStack.addText(`+${l.delay}`)
|
||||||
|
delayText.font = Font.mediumSystemFont(12)
|
||||||
|
delayText.textColor = Color.red()
|
||||||
|
delayText.leftAlignText()
|
||||||
|
}
|
||||||
|
|
||||||
let lineText = lineColumn.addText(l.name)
|
let lineText = lineColumn.addText(l.name)
|
||||||
lineText.font = Font.mediumSystemFont(12)
|
lineText.font = Font.mediumSystemFont(12)
|
||||||
lineText.textColor = new Color(textColor)
|
lineText.textColor = new Color(textColor)
|
||||||
|
|
Loading…
Add table
Reference in a new issue