Client - fix activities list style & activity details display

This commit is contained in:
Sam 2019-09-01 11:04:43 +02:00
parent de5c0ada6b
commit 38bbd61eba
3 changed files with 17 additions and 12 deletions

View File

@ -35,8 +35,9 @@ class ActivityCharts extends React.Component {
componentDidUpdate(prevProps) {
if (
this.props.dataType === 'activity' &&
prevProps.activity.id !== this.props.activity.id
(this.props.dataType === 'activity' &&
prevProps.activity.id !== this.props.activity.id) ||
(this.props.dataType === 'activity' && prevProps.dataType === 'segment')
) {
this.props.loadActivityData(this.props.activity.id)
}

View File

@ -25,8 +25,9 @@ class ActivityMap extends React.Component {
componentDidUpdate(prevProps) {
if (
this.props.dataType === 'activity' &&
prevProps.activity.id !== this.props.activity.id
(this.props.dataType === 'activity' &&
prevProps.activity.id !== this.props.activity.id) ||
(this.props.dataType === 'activity' && prevProps.dataType === 'segment')
) {
this.props.loadActivityGpx(this.props.activity.id)
}

View File

@ -131,25 +131,28 @@ label {
display: none;
}
.activity-title:hover img {
.activity-title img {
border: 1px solid lightgrey;
border-radius: 4px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
display:block;
margin-left: 10px;
display: none;
margin-left: 20px;
position: absolute;
z-index: 1000;
}
.activity-title:hover .map-attribution-list {
display:block;
.activity-title .map-attribution-list {
display: none;
font-size: 11px;
margin-left: 10px;
position:relative;
top: 0;
margin-left: 20px;
position: absolute;
z-index: 1000;
}
.activity-title:hover img, .activity-title:hover .map-attribution-list {
display: block;
}
.add-activity {
margin-top: 50px;
}