Verified Commit b636aa35 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Better image display

parent 8db17e4b
......@@ -52,6 +52,7 @@
<ul class="collection">
<li class="collection-item avatar" v-for="suggestion in filteredSuggestions" :key="suggestion.fullId">
<img v-if="suggestion.avatar" :src="suggestion.avatar" alt="" class="circle">
<img v-else-if="sources[suggestion.source].getSuggestionAvatar" class="circle" :src="sources[suggestion.source].getSuggestionAvatar()">
<i v-else-if="sources[suggestion.source].defaultAvatarIcon" class="material-icons purple accent-1 circle">{{ sources[suggestion.source].defaultAvatarIcon }}</i>
<a target="_blank" rel="noopener noreferrer" :href="suggestion.url" class="title">{{ suggestion.name }}</a>
<br>
......@@ -61,7 +62,7 @@
</span>
<a v-if="retributeProfiles[suggestion.fullId] === undefined" @click="lookup(suggestion.fullId)" class="secondary-content"><i class="material-icons">search</i></a>
<div v-else-if="retributeProfiles[suggestion.fullId]">
<h6>Donation platforms</h6>
<h6>Support on:</h6>
<template v-for="mean in retributeProfiles[suggestion.fullId].means">
<a
:href="mean.url"
......@@ -328,3 +329,9 @@ export default {
}
}
</script>
<style scoped>
.avatar img.circle,
.avatar i.circle {
border-radius: 10%;
}
</style>
......@@ -113,12 +113,14 @@ export default {
return `peertube ${domain} ${username}`
},
getAvatar (data) {
if (!data.raw || !data.raw.account.avatar) {
return require("../assets/sources/peertube-logo.svg")
}
return data.raw.account.avatar.path
},
getSuggestionAvatar () {
return require("../assets/sources/peertube-logo.svg")
},
getDisplayName ({username, domain}) {
return `${username}@${domain}`
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment