diff --git a/src/assets/img/default_profile_pic.png b/src/assets/img/default_profile_pic.png
new file mode 100644
index 0000000..2b8b658
Binary files /dev/null and b/src/assets/img/default_profile_pic.png differ
diff --git a/src/components/appbar/AppBar.vue b/src/components/appbar/AppBar.vue
index 7aa9ae2..5145305 100644
--- a/src/components/appbar/AppBar.vue
+++ b/src/components/appbar/AppBar.vue
@@ -7,7 +7,7 @@
-
+
GET STARTED
diff --git a/src/components/signup/Signup.vue b/src/components/signup/Signup.vue
index 453d32f..3c7f763 100644
--- a/src/components/signup/Signup.vue
+++ b/src/components/signup/Signup.vue
@@ -1,5 +1,5 @@
- Sign Up for an Account
+ Sign up for an account
@@ -24,11 +24,11 @@
v-model="user.confirmPassword" :rules="confirmPasswordRule"
:append-icon="showPassword ? 'mdi-eye' : 'mdi-eye-off'" required />
-
-
-
+
+
+
+
-
Sign up
diff --git a/src/pages/dashboard/Dashboard.scss b/src/pages/dashboard/Dashboard.scss
index 1f8983f..880ba4f 100644
--- a/src/pages/dashboard/Dashboard.scss
+++ b/src/pages/dashboard/Dashboard.scss
@@ -1,6 +1,5 @@
.profileImage {
- border: 1px solid #000;
- width: 80%;
+ width: 200px;
}
.stat-card {
diff --git a/src/pages/dashboard/Dashboard.vue b/src/pages/dashboard/Dashboard.vue
index 6e22d94..25b9f34 100644
--- a/src/pages/dashboard/Dashboard.vue
+++ b/src/pages/dashboard/Dashboard.vue
@@ -203,7 +203,7 @@
-
+
-
+
Stats
-
-
-
-
+
+
+
+
{{ stat.title }}
{{ stat.value }}
@@ -365,7 +365,7 @@ export default {
bio: '',
profilePic: '',
},
- profilePicPath: null,
+ profilePicPath: require('@/assets/img/default_profile_pic.png'),
improvement: {
timeStamp: null,
bodyWeight: null,
@@ -375,7 +375,7 @@ export default {
quadriceps: null
},
stats: [
- {title: 'Workouts', value: 10, color: 'cyan'},
+ {title: 'Workouts', value: 5, color: 'cyan'},
{title: 'Messages', value: 6, color: 'orange'},
{title: 'Notifications', value: 2, color: 'green'},
],
@@ -423,7 +423,10 @@ export default {
res => {
if (res != null) {
this.user = res
- this.profilePicPath = process.env.VUE_APP_BASE_URL + this.user.profilePic
+ if(this.user.profilePic) {
+ console.log(this.user.profilePic)
+ this.profilePicPath = process.env.VUE_APP_BASE_URL + this.user.profilePic
+ }
}
})
},
diff --git a/src/pages/home/HomePage.scss b/src/pages/home/HomePage.scss
index a8c7a87..d79cf8c 100644
--- a/src/pages/home/HomePage.scss
+++ b/src/pages/home/HomePage.scss
@@ -2,12 +2,18 @@
padding-top: 70pt;
align-items: center;
justify-content: center;
+ @media screen and (max-width: 767px) {
+ padding-top: 40pt;
+ }
}
.title {
font-size: 80px;
font-style: italic;
text-align: center;
+ @media screen and (max-width: 767px) {
+ font-size: 60px;
+ }
}
.last-char {
@@ -15,9 +21,12 @@
}
.subtitle {
- font-size: 40px;
+ font-size: 45px;
font-style: italic;
text-align: center;
+ @media screen and (max-width: 767px) {
+ font-size: 30px;
+ }
}
.image-container {
@@ -29,6 +38,9 @@
.background-image {
max-width: 35%;
animation: slideX 1s ease-in-out forwards;
+ @media screen and (max-width: 767px) {
+ max-width: 60%;
+ }
}
.up {
diff --git a/src/pages/home/HomePage.vue b/src/pages/home/HomePage.vue
index e0b6fa1..c65af3c 100644
--- a/src/pages/home/HomePage.vue
+++ b/src/pages/home/HomePage.vue
@@ -25,7 +25,10 @@
-
+
@@ -46,7 +49,7 @@
max-width="80px"
class="d-block ml-auto mr-auto mt-5"
>
- {{ feature.title }}
+ {{ feature.title }}
{{ feature.text }}
diff --git a/src/pages/profile/Profile.scss b/src/pages/profile/Profile.scss
index 0dcc70b..1b7998d 100644
--- a/src/pages/profile/Profile.scss
+++ b/src/pages/profile/Profile.scss
@@ -1,4 +1,3 @@
.profileImage {
- border: 1px solid #000;
- width: 80%;
+ width: 150px;
}
\ No newline at end of file
diff --git a/src/pages/profile/Profile.vue b/src/pages/profile/Profile.vue
index d193e08..13a8c49 100644
--- a/src/pages/profile/Profile.vue
+++ b/src/pages/profile/Profile.vue
@@ -1,6 +1,6 @@
-
+
@@ -10,14 +10,14 @@
-
+
-
-
+
+
-
+
@@ -28,7 +28,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
@@ -48,7 +48,7 @@
-
+
@@ -57,7 +57,7 @@
-
+
@@ -66,20 +66,20 @@
+ v-model="user.age">
-
+
+ label="Height (Cm)" v-model="user.height">
-
+
@@ -90,7 +90,7 @@
-
+
@@ -98,7 +98,7 @@
+ @click="updateProfile">
Save
@@ -112,14 +112,14 @@
-
+
Improvements
+ class="d-block ml-auto mr-auto mt-2"/>
@@ -127,7 +127,7 @@
{{ new Date().toLocaleDateString() }}
-
+
@@ -136,10 +136,10 @@
+ v-model="improvement.bodyWeight">
-
+
@@ -148,10 +148,10 @@
+ v-model="improvement.bodyFat">
-
+
@@ -160,30 +160,30 @@
+ :max="50">
-
+
+ :max="100">
-
+
+ :min="0" :max="100">
-
+
@@ -191,7 +191,7 @@
+ @click="addNewImprovement">
Save
@@ -230,7 +230,7 @@ export default {
},
files: null,
inputProfilePic: null,
- profilePicPath: null,
+ profilePicPath: require('@/assets/img/default_profile_pic.png'),
improvement: {
timeStamp: null,
bodyWeight: null,
@@ -248,21 +248,23 @@ export default {
methods: {
async fetchUserInfo() {
await UserService.getUserInfo(this.userId).then(
- res => {
- if (res != null) {
- this.user = res
- this.profilePicPath = process.env.VUE_APP_BASE_URL + this.user.profilePic
+ res => {
+ if (res != null) {
+ this.user = res
+ if (this.user.profilePic) {
+ this.profilePicPath = process.env.VUE_APP_BASE_URL + this.user.profilePic
+ }
+ }
}
- }
)
},
async fetchUserImprovement() {
await UserService.getUserImprovement(this.userId).then(
- res => {
- if (res != null) {
- this.improvement = res
+ res => {
+ if (res != null) {
+ this.improvement = res
+ }
}
- }
)
},
async updateProfile() {
diff --git a/src/services/auth-header.js b/src/services/auth-header.js
index 3689051..e42660b 100644
--- a/src/services/auth-header.js
+++ b/src/services/auth-header.js
@@ -7,4 +7,4 @@ function authHeader(){
}
}
-export default authHeader
\ No newline at end of file
+export default authHeader;
\ No newline at end of file
diff --git a/src/services/auth.service.js b/src/services/auth.service.js
index c8b2735..085d9c2 100644
--- a/src/services/auth.service.js
+++ b/src/services/auth.service.js
@@ -1,6 +1,8 @@
import axiosInstance from '@/utils/axios';
-class AuthService{
- async login(user){
+
+class AuthService {
+
+ async login(user) {
const response = await axiosInstance.post("/auth/login", user);
const usr = response.data.user;
if (usr) {
@@ -9,13 +11,13 @@ class AuthService{
return usr;
}
- async logout(){
+ async logout() {
const user = localStorage.getItem("user")
await axiosInstance.post("/auth/logout", user);
localStorage.removeItem('user');
}
- signup(user){
+ signup(user) {
return axiosInstance.post("/auth/signup", user)
}
}
diff --git a/src/services/goal.service.js b/src/services/goal.service.js
index bab9029..aacbf2c 100644
--- a/src/services/goal.service.js
+++ b/src/services/goal.service.js
@@ -7,12 +7,10 @@ class GoalService{
return response.data
}
async createNewGoal(userId, goal){
- const response = await axiosInstance.post("/" + userId + "/goals", goal, {headers: authHeader()})
- return response
+ return await axiosInstance.post("/" + userId + "/goals", goal, {headers: authHeader()})
}
async setGoalAsAchieved(userId, goalId){
- const response = await axiosInstance.patch("/" + userId + "/goals/" + goalId, {headers: authHeader()})
- return response
+ return await axiosInstance.patch("/" + userId + "/goals/" + goalId, {headers: authHeader()})
}
}
diff --git a/src/services/user.service.js b/src/services/user.service.js
index 4088010..331fe6d 100644
--- a/src/services/user.service.js
+++ b/src/services/user.service.js
@@ -1,13 +1,15 @@
import axiosInstance from '@/utils/axios';
import authHeader from './auth-header';
-class UserService{
+class UserService {
+
getUserInfo(userId){
return axiosInstance.get("/users/info/"+userId, {headers: authHeader() })
.then(response => {
return response.data
})
}
+
updateUserInfo(userId, userInfo){
const contentType = {'Content-Type': 'multipart/form-data'}
return axiosInstance.patch("/users/info/"+userId, userInfo,
diff --git a/src/services/workout.service.js b/src/services/workout.service.js
index 2d9ceb0..1ee8fd9 100644
--- a/src/services/workout.service.js
+++ b/src/services/workout.service.js
@@ -2,6 +2,7 @@ import axiosInstance from "@/utils/axios";
import authHeader from "@/services/auth-header";
class WorkoutService {
+
async getWorkouts(userId) {
const response = await axiosInstance.get("/" + userId + "/workouts", {
headers: authHeader(),
@@ -40,12 +41,11 @@ class WorkoutService {
}
async createWorkout(userId, workout) {
- const response = await axiosInstance.post(
- "/" + userId + "/workouts",
- workout,
- { headers: authHeader() }
+ return await axiosInstance.post(
+ "/" + userId + "/workouts",
+ workout,
+ {headers: authHeader()}
);
- return response;
}
async updateWorkout(userId, workoutId, workout) {