added ProfilePicture handling
This commit is contained in:
		@ -39,13 +39,19 @@ async function modifiedResearch(){
 | 
			
		||||
  researchList.value = await fetchResearches(researcher.value.id)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getPP(){
 | 
			
		||||
  if(researcher.value.user.profilePictureUrl === null){
 | 
			
		||||
    return "/Clyde.png"
 | 
			
		||||
  }
 | 
			
		||||
  return researcher.value.user.profilePictureUrl
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template> <div class="body"><div id="main">
 | 
			
		||||
    <ResearchPostComponent :allResearcher="allResearcher" :researcher="researcher" :isOpen="isPostResearchOpened" @modal-close="isPostResearchOpened = false" @posted="modifiedResearch"></ResearchPostComponent>
 | 
			
		||||
    <div id="profilePicture">
 | 
			
		||||
      <img src="/Clyde.png" />
 | 
			
		||||
      <img :src=getPP() />
 | 
			
		||||
    </div>
 | 
			
		||||
    <div id="researcherInfos">
 | 
			
		||||
      <div class="surrounded" v-if="!changing">{{researcher.user.lastName}} {{researcher.user.firstName}}</div>
 | 
			
		||||
 | 
			
		||||
@ -18,6 +18,12 @@ let chart;
 | 
			
		||||
const researcherId = window.location.href.split("=")[1]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function getPP(){
 | 
			
		||||
  if(researcher.value.user.profilePictureUrl === null){
 | 
			
		||||
    return "/Clyde.png"
 | 
			
		||||
  }
 | 
			
		||||
  return researcher.value.user.profilePictureUrl
 | 
			
		||||
}
 | 
			
		||||
const researchList = ref(await fetchResearches(researcherId));
 | 
			
		||||
const researcher = ref(await fetchResearcher(researcherId));
 | 
			
		||||
const stats = ref(await fetchStats(researcherId))
 | 
			
		||||
@ -73,7 +79,7 @@ function update(){
 | 
			
		||||
<template>
 | 
			
		||||
  <div id="main">
 | 
			
		||||
    <div id="profilePicture">
 | 
			
		||||
      <img src="/Clyde.png" />
 | 
			
		||||
      <img :src=getPP() />
 | 
			
		||||
    </div>
 | 
			
		||||
    <div id="researcherInfos">
 | 
			
		||||
      <div class="surrounded">{{researcher.user.lastName}} {{researcher.user.firstName}}</div>
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user