Revert "Add colors to clock bar, fixes #130"
This reverts commit f481362e77
.
All these colors just look weird, aside the clock which itself
changes color. Also ligh/dark themes both have distinct issues.
Now I think it should just stay green all the time.
pull/636/head
parent
bd81e7608e
commit
01a0456cda
|
@ -1208,19 +1208,8 @@ div.table_wrap > .clock .bar span {
|
|||
display: block;
|
||||
height: 4px;
|
||||
width: 0px;
|
||||
}
|
||||
div.table_wrap > .clock .bar.green span {
|
||||
background: #759900;
|
||||
}
|
||||
div.table_wrap > .clock .bar.yellow span {
|
||||
background: #fff077;
|
||||
}
|
||||
div.table_wrap > .clock .bar.orange span {
|
||||
background: #f2a463;
|
||||
}
|
||||
div.table_wrap > .clock .bar.red span {
|
||||
background: #efaaaa;
|
||||
}
|
||||
div.table_wrap > .clock > .time {
|
||||
display: inline-block;
|
||||
border: 1px solid #ccc;
|
||||
|
|
|
@ -29,13 +29,7 @@ function formatClockTime(ctrl, time, running) {
|
|||
}
|
||||
|
||||
function showBar(ctrl, time) {
|
||||
function chooseColor(time, emergTime) {
|
||||
if (time > emergTime * 5) return 'green';
|
||||
else if (time > emergTime * 2.5) return 'yellow';
|
||||
else if (time > emergTime) return 'orange';
|
||||
else return 'red';
|
||||
}
|
||||
return ctrl.data.showBar ? m('div.bar.' + chooseColor(time, ctrl.data.emerg),
|
||||
return ctrl.data.showBar ? m('div.bar',
|
||||
m('span', {
|
||||
style: {
|
||||
width: Math.max(0, Math.min(100, (time / ctrl.data.barTime) * 100)) + '%'
|
||||
|
|
Loading…
Reference in New Issue