Commit 7832f2f48cadbec8164e413a9188b5785a449110
1 parent
a4373a004e
Exists in
master
randmise avatar
Showing
1 changed file
with
23 additions
and
7 deletions
Show diff stats
src/components/Profile.vue
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div class="popup-set" id="add-profile" style="display: none"> |
7 | 7 | <div class="popup-header"> |
8 | 8 | <div class="user-photo common_color"> |
9 | - <img src="../assets/images/m-user.svg" /> | |
9 | + <img :src="userData.profilePic" /> | |
10 | 10 | </div> |
11 | 11 | <!-- header user --> |
12 | 12 | |
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | </li> |
21 | 21 | <li> |
22 | 22 | <a href="javasript:void(0);" |
23 | - ><img src="../assets/images/randomise.svg" /><span | |
23 | + @click="getRandomAvatar()"><img src="../assets/images/randomise.svg" /><span | |
24 | 24 | >Randomise Avatar</span |
25 | 25 | ></a |
26 | 26 | > |
... | ... | @@ -331,7 +331,7 @@ |
331 | 331 | <a href="javasript:void(0);" class="update_profile"><span></span> Update Profile</a> |
332 | 332 | <div class=""> |
333 | 333 | |
334 | - <a href="javascript:void(0);" class="user-profile-photo common_color" @click="userprofileshowDialog"><img src="../assets/images/m-user.svg" /></a> | |
334 | + <a href="javascript:void(0);" class="user-profile-photo common_color" @click="userprofileshowDialog"><img :src="userData.profilePic" /></a> | |
335 | 335 | <div class="sub-menu-user" id="userprofileshow" style="display: none"> |
336 | 336 | <ul> |
337 | 337 | <li> |
... | ... | @@ -348,7 +348,7 @@ |
348 | 348 | <div class="row profile-tab-spc-top"> |
349 | 349 | <div class="col-sm-8 col-md-12 col-lg-8 col-xl-8"> |
350 | 350 | <div class="inner-profile-ps common_color"> |
351 | - <img src="../assets/images/m-user.svg" class="" /> | |
351 | + <img :src="userData.profilePic" class="" /> | |
352 | 352 | </div> |
353 | 353 | <!-- user profile --> |
354 | 354 | |
... | ... | @@ -430,8 +430,8 @@ |
430 | 430 | <div class="container-fluid data-wrp" id="case-study-0"> |
431 | 431 | <div class="row" v-if="caseStudies.length == 0"> |
432 | 432 | <div class="col-6 col-lg-6"> |
433 | - <div class="full-w-height-profile ex-light seats_bg"> | |
434 | - <a href="javasript:void(0);" class="profile-md-bt center-and-spc bt-spc-top">Explore Spotlights</a> | |
433 | + <div class="full-w-height-profile ex-light seats_bg" > | |
434 | + <a href="javasript:void(0);" class="profile-md-bt center-and-spc bt-spc-top" @click="openUrl('https://www.productgrowth.org/spotlight')">Explore Spotlights</a> | |
435 | 435 | <p>Explore the spotlights others has put together</p> |
436 | 436 | </div><!-- full width --> |
437 | 437 | </div><!-- col 6 --> |
... | ... | @@ -439,7 +439,7 @@ |
439 | 439 | <div class="full-w-height-profile ex-light spotlight_bg"> |
440 | 440 | <img src="../assets/images/add-role.svg" class="add-role" /> |
441 | 441 | <div class="clearfix"></div><!-- clearfix --> |
442 | - <a href="javasript:void(0);" class="profile-md-bt center-and-spc">Publish Spotlight</a> | |
442 | + <a href="javasript:void(0);" class="profile-md-bt center-and-spc" @click="openUrl('https://www.productgrowth.org/spotlight#typeform-spotlight')">Publish Spotlight</a> | |
443 | 443 | <p>Share your own insights through Spotlight</p> |
444 | 444 | </div><!-- full width --> |
445 | 445 | </div><!-- col 6 --> |
... | ... | @@ -640,6 +640,19 @@ export default { |
640 | 640 | }) |
641 | 641 | .catch((error) => console.log(error)); |
642 | 642 | }, |
643 | + getRandomAvatar() { | |
644 | + axios | |
645 | + .get("/randomAvatar", { | |
646 | + headers: { | |
647 | + Authorization: "Bearer " + this.usertoken, | |
648 | + }, | |
649 | + }) | |
650 | + .then((response) => { | |
651 | + this.userData.profilePic = response.data.imageURL; | |
652 | + console.log(response.data.imageURL); | |
653 | + }) | |
654 | + .catch((error) => console.log(error)); | |
655 | + }, | |
643 | 656 | getCaseStudies() { |
644 | 657 | axios |
645 | 658 | .get("/caseStudy/all", { |
... | ... | @@ -830,6 +843,9 @@ export default { |
830 | 843 | userprofileshowDialog() { |
831 | 844 | $("#userprofileshow").toggle(); |
832 | 845 | }, |
846 | + openUrl(url){ | |
847 | + window.open(url); | |
848 | + }, | |
833 | 849 | }, |
834 | 850 | }; |
835 | 851 | </script> | ... | ... |