diff --git a/fittrackee_client/src/components/App.css b/fittrackee_client/src/components/App.css
index d7a82f24..f4e52a86 100644
--- a/fittrackee_client/src/components/App.css
+++ b/fittrackee_client/src/components/App.css
@@ -428,7 +428,7 @@ label {
}
.no-picture {
- color: #40578a;
+ color: #405976;
}
.page-title {
@@ -524,49 +524,11 @@ label {
.user-filters {
font-size: 0.9em;
- margin-bottom: 5px;
+ margin-bottom: 10px;
}
-
-
-/* adapted from https://uglyduck.ca/making-tables-responsive-with-minimal-css/ */
-.heading-span {
- background: #eee;
- color: dimgrey;
- display: none;
- font-size: 10px;
- font-weight: bold;
- padding: 5px;
- position: absolute;
- text-transform: uppercase;
- top: 0;
- left: 0;
-}
-
-@media(max-width: 1024px) {
- table thead {
- left: -9999px;
- position: absolute;
- visibility: hidden;
- }
- table tr {
- border-bottom: 0;
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- margin-bottom: 40px;
- }
- table td {
- border: 1px solid lightgrey;
- margin: 0 -1px -1px 0;
- padding-top: 35px !important;
- position: relative;
- text-align: center;
- width: 50%;
- }
- .heading-span {
- display: block;
- }
+.user-label {
+ font-weight: bold;
}
.weather-img {
@@ -588,8 +550,45 @@ label {
padding: 0.1em;
}
-.user-table {
- font-size: 0.9em;
+/* responsive table */
+/* adapted from https://uglyduck.ca/making-tables-responsive-with-minimal-css/ */
+.heading-span {
+ background: #eee;
+ color: dimgrey;
+ display: none;
+ font-size: 10px;
+ font-weight: bold;
+ padding: 5px;
+ position: absolute;
+ text-transform: uppercase;
+ top: 0;
+ left: 0;
+}
+
+@media(max-width: 1024px) {
+ table thead {
+ left: -9999px;
+ position: absolute;
+ visibility: hidden;
+ }
+ table tr {
+ border-bottom: 0;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ margin-bottom: 40px;
+ }
+ table td {
+ border: 1px solid lightgrey;
+ margin: 0 -1px -1px 0;
+ padding-top: 35px !important;
+ position: relative;
+ text-align: center;
+ width: 50%;
+ }
+ .heading-span {
+ display: block;
+ }
}
/* calendar */
diff --git a/fittrackee_client/src/components/Dashboard/index.jsx b/fittrackee_client/src/components/Dashboard/index.jsx
index 4ff840c3..c2732f63 100644
--- a/fittrackee_client/src/components/Dashboard/index.jsx
+++ b/fittrackee_client/src/components/Dashboard/index.jsx
@@ -49,6 +49,7 @@ class DashBoard extends React.Component {
) : (
activities &&
+ user.total_duration &&
sports.length > 0 && (
diff --git a/fittrackee_client/src/components/NavBar/index.jsx b/fittrackee_client/src/components/NavBar/index.jsx
index dc89aa68..5dcec83a 100644
--- a/fittrackee_client/src/components/NavBar/index.jsx
+++ b/fittrackee_client/src/components/NavBar/index.jsx
@@ -117,14 +117,20 @@ class NavBar extends React.PureComponent {
)}
- {picture === true && (
-
- )}
{isAuthenticated && (
+ <>
+ {picture === true ? (
+
+ ) : (
+
+ )}
- )}
- {isAuthenticated && (
+ >
)}
diff --git a/fittrackee_client/src/components/User/ProfileDetail.jsx b/fittrackee_client/src/components/User/ProfileDetail.jsx
index 2bd6a8df..c18fbe75 100644
--- a/fittrackee_client/src/components/User/ProfileDetail.jsx
+++ b/fittrackee_client/src/components/User/ProfileDetail.jsx
@@ -3,7 +3,6 @@ import React from 'react'
import { Helmet } from 'react-helmet'
import { withTranslation } from 'react-i18next'
import { connect } from 'react-redux'
-import { Link } from 'react-router-dom'
import Message from '../Common/Message'
import { deletePicture, uploadPicture } from '../../actions/user'
@@ -40,57 +39,64 @@ function ProfileDetail({
- {user.username}{' '}
- {editable && (
-
-
-
- )}{' '}
- {isDeletable && (
- displayModal(true)}
- />
- )}
+ {user.username}
- {t('user:Email')}: {user.email}
+ {/* eslint-disable-next-line max-len */}
+
+ {t('user:Email')}
+ : {user.email}
- {t('user:Registration Date')}: {createdAt}
+
+ {t('user:Registration Date')}
+
+ : {createdAt}
- {t('user:First Name')}: {user.first_name}
+ {t('user:First Name')}
+ : {user.first_name}
- {t('user:Last Name')}: {user.last_name}
+ {/* eslint-disable-next-line max-len */}
+
+ {t('user:Last Name')}
+ : {user.last_name}
- {t('user:Birth Date')}: {birthDate}
+ {t('user:Birth Date')}
+ : {birthDate}
- {t('user:Location')}: {user.location}
+ {/* eslint-disable-next-line max-len */}
+
+ {t('user:Location')}
+ : {user.location}
- {t('user:Bio')}: {user.bio}
+ {t('user:Bio')}:{' '}
+ {user.bio}
- {t('user:Language')}: {user.language}
+ {/* eslint-disable-next-line max-len */}
+
+ {t('user:Language')}
+ : {user.language}
- {t('user:Timezone')}: {user.timezone}
+ {/* eslint-disable-next-line max-len */}
+
+ {t('user:Timezone')}
+ : {user.timezone}
- {t('user:First day of week')}:{' '}
- {user.weekm ? t('user:Monday') : t('user:Sunday')}
+
+ {t('user:First day of week')}
+
+ : {user.weekm ? t('user:Monday') : t('user:Sunday')}
@@ -136,12 +142,28 @@ function ProfileDetail({
)}{' '}
-
history.push('/profile/edit')}
+ >
+ {t('common:Edit')}
+
+ )}
+ {isDeletable && (
+
+ )}
+
diff --git a/fittrackee_client/src/locales/en/common.json b/fittrackee_client/src/locales/en/common.json
index a3e6b037..04d9bfaf 100644
--- a/fittrackee_client/src/locales/en/common.json
+++ b/fittrackee_client/src/locales/en/common.json
@@ -4,6 +4,7 @@
"admin rights": "admin rights",
"ascending": "ascending",
"Back": "Back",
+ "Back to home": "Back to home",
"Cancel": "Cancel",
"Confirmation": "Confirmation",
"Dashboard": "Dashboard",
diff --git a/fittrackee_client/src/locales/en/user.json b/fittrackee_client/src/locales/en/user.json
index 405a484e..ddf580bb 100644
--- a/fittrackee_client/src/locales/en/user.json
+++ b/fittrackee_client/src/locales/en/user.json
@@ -6,6 +6,7 @@
"Birth Date": "Birth Date",
"Delete my account": "Delete my account",
"Delete picture": "Delete picture",
+ "Delete user account": "Delete user account",
"Edit Profile": "Edit Profile",
"Email": "Email",
"Enter a username": "Enter a username",
diff --git a/fittrackee_client/src/locales/fr/common.json b/fittrackee_client/src/locales/fr/common.json
index 9794feaf..b0a31eb2 100644
--- a/fittrackee_client/src/locales/fr/common.json
+++ b/fittrackee_client/src/locales/fr/common.json
@@ -4,6 +4,7 @@
"admin rights": "droits d'admin",
"ascending": "ascendant",
"Back": "Revenir à la page précédente",
+ "Back to home": "Retour à l'accueil",
"Cancel": "Annuler",
"Confirmation": "Confirmation",
"Dashboard": "Tableau de Bord",
diff --git a/fittrackee_client/src/locales/fr/user.json b/fittrackee_client/src/locales/fr/user.json
index e6b80497..5b891b72 100644
--- a/fittrackee_client/src/locales/fr/user.json
+++ b/fittrackee_client/src/locales/fr/user.json
@@ -6,6 +6,7 @@
"Birth Date": "Date de naissance",
"Delete my account": "Supprimer mon compte",
"Delete picture": "Supprimer l'image",
+ "Delete user account": "Supprimer le compte",
"Edit Profile": "Editer le profil",
"Email": "Email",
"Enter a username": "Saisir un nom",