This commit is contained in:
j3d1 2023-11-01 01:39:58 +01:00
parent 6248a7ef2f
commit 0b46fb152c
3 changed files with 93 additions and 0 deletions

View file

@ -0,0 +1,55 @@
<template>
<div>
<!--img src=""-->
data:{{ image_data }}<br>
owner:{{ owner }}<br>
src:{{ src }}<br>
servers:{{ servers }}
</div>
</template>
<style scoped>
img {
width: 190px;
height: 107px;
object-fit: contain;
}
</style>
<script>
import {mapActions, mapGetters} from "vuex";
export default {
name: "AuthenticatedImage",
props: {
src: {
type: String,
required: true
},
owner: {
type: String,
required: true
}
},
data() {
return {
image_data: "",
servers: []
}
},
computed: {
...mapGetters(["signAuth"])
},
methods: {
...mapActions(["getFriendServers"])
},
async mounted() {
try {
this.servers = await this.getFriendServers({username: this.owner});
this.image_data = await this.servers.get(this.signAuth, this.src);
} catch (e) {
console.log(e);
}
}
}
</script>