Activities: minor changes
This commit is contained in:
parent
37ed5405bb
commit
979833bd07
@ -67,11 +67,9 @@ class Activity(db.Model):
|
||||
"creation_date": self.creation_date,
|
||||
"modification_date": self.modification_date,
|
||||
"activity_date": self.activity_date,
|
||||
"duration": (self.duration.total_seconds()
|
||||
if self.duration
|
||||
else None),
|
||||
"pauses": self.pauses.total_seconds() if self.pauses else None,
|
||||
"moving": self.moving.total_seconds() if self.moving else None,
|
||||
"duration": str(self.duration) if self.duration else None,
|
||||
"pauses": str(self.pauses) if self.pauses else None,
|
||||
"moving": str(self.moving) if self.moving else None,
|
||||
"distance": float(self.distance) if self.distance else None,
|
||||
"min_alt": float(self.min_alt) if self.min_alt else None,
|
||||
"max_alt": float(self.max_alt) if self.max_alt else None,
|
||||
|
@ -27,7 +27,7 @@ class ActivityDisplay extends React.Component {
|
||||
<div className="container">
|
||||
{activity && sports.length > 0 && (
|
||||
<div className="row">
|
||||
<div className="col-md-12">
|
||||
<div className="col-md-6">
|
||||
<div className="card">
|
||||
<div className="card-header">
|
||||
{sports.filter(sport => sport.id === activity.sport_id)
|
||||
@ -35,8 +35,6 @@ class ActivityDisplay extends React.Component {
|
||||
{activity.activity_date}
|
||||
</div>
|
||||
<div className="card-body">
|
||||
<div className="row">
|
||||
<div className="col-md-8">
|
||||
<p>
|
||||
<i className="fa fa-calendar" aria-hidden="true" />{' '}
|
||||
Start at {activity.activity_date}
|
||||
@ -44,13 +42,13 @@ class ActivityDisplay extends React.Component {
|
||||
<p>
|
||||
<i className="fa fa-clock-o" aria-hidden="true" />{' '}
|
||||
Duration: {activity.duration} {' '}
|
||||
{activity.pauses > 0 && (
|
||||
{activity.pauses !== '0:00:00' && (
|
||||
`(pauses: ${activity.pauses})`
|
||||
)}
|
||||
</p>
|
||||
<p>
|
||||
<i className="fa fa-road" aria-hidden="true" />{' '}
|
||||
Distance: {activity.distance}km</p>
|
||||
Distance: {activity.distance} km</p>
|
||||
<p>
|
||||
<i className="fa fa-tachometer" aria-hidden="true" />
|
||||
{' '}
|
||||
@ -66,10 +64,15 @@ class ActivityDisplay extends React.Component {
|
||||
Descent: {activity.descent}m
|
||||
</p>
|
||||
</div>
|
||||
<div className="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-md-6">
|
||||
<div className="card">
|
||||
<div className="card-header">
|
||||
Map
|
||||
</div>
|
||||
</div>
|
||||
<div className="card-body">
|
||||
to do
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user