When minutes or seconds zero, make string 00, fixes #188
This commit is contained in:
@ -26,16 +26,17 @@ export default class Dater extends React.Component{
|
||||
|
||||
// get left-over number of seconds
|
||||
seconds = total_seconds - ( total_minutes * 60 )
|
||||
if( seconds <= 9 ) seconds = '0'+ seconds
|
||||
if (seconds <= 9) seconds = '0'+ seconds
|
||||
if (seconds == 0) seconds = '00'
|
||||
|
||||
// get left-over number of minutes
|
||||
minutes = total_minutes - ( total_hours * 60 )
|
||||
if( minutes <= 9 && total_hours ) minutes = '0'+ minutes
|
||||
if( minutes == 0 ) minutes = '0'
|
||||
if (minutes <= 9 && total_hours) minutes = '0'+ minutes
|
||||
if (minutes == 0) minutes = '00'
|
||||
|
||||
if( total_hours ) string += total_hours+':'
|
||||
if( minutes ) string += minutes+':'
|
||||
if( seconds ) string += seconds
|
||||
if (total_hours) string += total_hours+':'
|
||||
if (minutes) string += minutes+':'
|
||||
if (seconds) string += seconds
|
||||
|
||||
return string
|
||||
}
|
||||
|
||||
@ -40,9 +40,9 @@ export default class Notifications extends React.Component{
|
||||
|
||||
renderProcess(process){
|
||||
|
||||
var progress = ((process.data.total - process.data.remaining) / process.data.total * 100).toFixed()
|
||||
if (isNaN(progress)){
|
||||
progress = 0
|
||||
var progress = 0;
|
||||
if (process.data.total && process.data.remaining){
|
||||
progress = ((process.data.total - process.data.remaining) / process.data.total * 100).toFixed()
|
||||
}
|
||||
|
||||
switch (process.status){
|
||||
|
||||
@ -138,6 +138,10 @@
|
||||
bottom: 2px;
|
||||
left: 60px;
|
||||
right: 60px;
|
||||
|
||||
.progress {
|
||||
@include animate(1s, linear);
|
||||
}
|
||||
}
|
||||
|
||||
.current {
|
||||
|
||||
Reference in New Issue
Block a user