before recipes:update

This commit is contained in:
2022-05-11 14:48:04 +02:00
parent 1b4ca82754
commit c84ec14cb5
46 changed files with 1363 additions and 1235 deletions

View File

@@ -15,17 +15,16 @@
<div class="d-flex flex-column align-items-center text-center p-3 py-5">
Profile of {{ user.username }}
<img
class="rounded-circle mt-5"
width="150px"
src="/build/images/tracer_schmolle.png"
class="rounded-circle border-1 mt-5"
src="/build/images/tracer_schmolle150x150.png"
alt="profile image"
>
<span class="font-weight-bold">{{ user.username }}</span>
<!--<span class="font-weight-bold"><a
href="{{ path('app_main', { '_switch_user': app.user.username }) }}">switch user {{
user.username
}}</span>
-->
<!--
<span class="font-weight-bold">
<a href="{{ path('app_main', { '_switch_user': app.user.username }) }}">
switch user {{ user.username }}</span>
-->
<span class="text-white-50">
<i class="fa fa-lg fa-envelope me-1"/>{{ user.email }}
</span>
@@ -52,7 +51,7 @@
</template>
<script>
import axios from 'axios';
import axios from 'axios'
export default {
name: 'ProfileView',
@@ -63,9 +62,9 @@ export default {
computed: {
getUserEndpoint() {
if (this.$route.params.username) {
return `/api/users?username=${this.$route.params.username}`;
return `/api/users?username=${this.$route.params.username}`
}
return '/api/users?username=tracer';
return '/api/users?username=tracer'
}
},
mounted() {
@@ -73,14 +72,14 @@ export default {
.get(this.getUserEndpoint)
.then((response) => {
console.log(response);
[this.user] = response.data['hydra:member'];
[this.user] = response.data['hydra:member']
console.log(this.user);
this.isLoading = false;
console.log(this.user)
this.isLoading = false
})
.catch((error) => {
console.log(error);
});
console.log(error)
})
}
};
}
</script>

View File

@@ -1,53 +1,67 @@
<template>
<div v-if="isLoading" class="circle">
<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
<span class="sr-only">Loading </span>
</div>
<div v-else class="mt-1 mb-1">
<b-link class="align-left blog-details" :to="'/profile/' + author.username">
<img class="article-author-img rounded-circle"
:src="'build/images/' + author.avatar"
alt="profile"></b-link>
<b-link :to="'/profile/' + author.username">
{{ author.username }}
</b-link>
</div>
<div
v-if="isLoading"
class="circle"
>
<i class="fa fa-spinner fa-spin fa-3x fa-fw"/>
<span class="sr-only">Loading </span>
</div>
<div
v-else
class="mt-1 mb-1"
>
<router-link
class="align-left blog-details"
:to="'/profile/' + author.username"
>
<img
class="article-author-img rounded-circle"
:src="'build/images/' + author.avatar"
alt="profile"
>
</router-link>
<router-link :to="'/profile/' + author.username">
{{ author.username }}
</router-link>
</div>
</template>
<script>
import axios from "axios";
import axios from 'axios'
export default {
name: "Author",
data: () => ({
author: null,
isLoading: true
}),
props: ["authorIri"],
mounted() {
this.getAuthor();
},
methods: {
getAuthor() {
console.log("here" + this.authorIri);
axios
.get(this.authorIri)
.then(response => {
console.log("response");
console.log(response);
this.author = response.data;
console.log(this.author);
this.isLoading = false;
})
.catch(error => {
console.log(error);
});
console.log(this.author);
}
}
};
</script>
name: 'UserCard',
props: {
authorIri: {
type: String,
required: true
}
},
data: () => ({
author: null,
isLoading: true
}),
mounted() {
this.getAuthor()
},
methods: {
getAuthor() {
console.log(`here${this.authorIri}`)
axios
.get(this.authorIri)
.then((response) => {
console.log('response')
console.log(response)
this.author = response.data
console.log(this.author)
this.isLoading = false
})
.catch((error) => {
console.log(error)
})
console.log(this.author)
}
}
}
</script>